I am making my first android app, and I need it to be a keyboard service. As best as I can tell, the manifest looks good, and I have a file, WifiJoy.java (in the com.zwad3.wifijoy package) as well as all other files.
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.zwad3.wifijoy"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="9"
android:targetSdkVersion="15" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"></uses-permission>
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<service android:name="com.zwad3.wifijoy.WifiJoy"
android:label="Wifi Joystick"
android:permission="android.permission.BIND_INPUT_METHOD">
<intent-filter>
<action android:name="android.view.InputMethod" />
</intent-filter>
</service>
<activity
android:name=".settings"
android:label="@string/title_activity_settings" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
Here is the beginning of WifiJoy.java
package com.zwad3.wifijoy;
import android.util.Log;
import android.view.KeyEvent;
import android.view.View;
import android.view.inputmethod.EditorInfo;
import android.view.inputmethod.InputConnection;
import android.inputmethodservice.InputMethodService;
public class WifiJoy extends InputMethodService {
I know this is incomplete so if you need more info let me know, I just didn’t want to overload the post.
Try adding a
<meta-data>element in your<service>, such as the one shown in this manifest from the SoftKeyboard SDK sample:That would point to an XML file in
res/xml/(namedmethod.xmlin the above sample), that contains descriptive information about your IME, like this file from the same SDK sample: