views:

627

answers:

1

Hi,

I have searched the net quite a bit and haven't found a single resource that can help me call my custom keyboard in my application. I am using the android/sdk examples/soft keyboard and have commented out the first row of keys in the qwerty.xml file for testing purposes.

I have tried making changes in the AndroidManifest.xml but still can't call my custom keyboard. Any help in this regard will be helpful.

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
 package="com.android.artoo" android:versionCode="1"
 android:versionName="1.0">
 <application android:icon="@drawable/icon" android:label="Virtual Keyboard">
  <activity android:name=".MainActivity" android:label="Virtual Keyboard"
   android:windowSoftInputMode="adjustResize">
   <intent-filter>
    <action android:name="android.intent.action.MAIN" />
    <category android:name="android.intent.category.LAUNCHER" />
   </intent-filter>
  </activity>
  <service android:name=".SoftKeyboard" android:permission="android.permission.BIND_INPUT_METHOD">
   <intent-filter>
    <action android:name="android.view.InputMethod" />
   </intent-filter>
   <meta-data android:name="android.view.im" android:resource="@xml/method" />
  </service>
 </application>
 <uses-sdk android:minSdkVersion="4"></uses-sdk>

</manifest>

Thanks for your help!

+1  A: 

You might need to enable the keyboard on the phones keyboard settings after installing your apk.

  1. Settings > Language and Keyboard
  2. Select your keyboard (maybe un-check the default Android keyboard as well)
sgarman
I am doing this on the emulator and using the long press to change the android keyboard selection; However i get only the following standard emulator-options:-> Chinese-> Android Keyboard-> Japanese IMEAny other suggestions?
Sameer Segal
My mistake, I needed to enable the keyboard from Settings > Language/Keyboard and come back and long press to enable the input method.
Sameer Segal