在Android中看不到我的自定义IME

时间:2015-09-16 09:05:53

标签: android

我正在尝试在Android中创建一个非常简单的QR输入法。我试图在我的Nexus 6设备上运行自定义QR键盘应用程序,而不是实际上可以在" production"中运行,至少可以看到它会崩溃的位置。

但是,在将APK部署到设备后,我无法选择自定义输入。

以下是清单:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="org.zighinetto.qrkey" >

    <uses-permission android:name="android.permission.CAMERA" />

    <uses-feature
        android:name="android.hardware.camera"
        android:required="true" />
    <uses-feature android:name="android.hardware.camera.autofocus" />

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <service
            android:name=".services.QrInputService"
            android:enabled="true"
            android:permission="android.permissions.BIND_INPUT_METHOD" >
            <intent-filter>
                <action android:name="android.view.InputMethod" />
            </intent-filter>

            <meta-data
                android:name="android.view.im"
                android:resource="@xml/ime" />
        </service>

        <activity
            android:name=".ui.SettingsActivity"
            android:label="@string/title_activity_settings" >
        </activity>
    </application>

</manifest>

并且...... ime.xml

<?xml version="1.0" encoding="utf-8"?>
<input-method
    android:isDefault="true"
    xmlns:android="http://schemas.android.com/apk/res/android">
</input-method>

到目前为止,我有:   - 启用CAMERA权限,因为我需要使用相机   - 创建了IME服务并将其链接到BIND_INPUT_METHOD权限,以便只有系统可以绑定到它   - 未将BIND_INPUT_METHOD声明为我的应用程序使用的权限,因为只有系统需要该权限。

我希望新的QR输入服务能够在Android&#34; Language&input&#34;屏幕,但我看不到它。

我的清单出了什么问题?

0 个答案:

没有答案
相关问题