Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding my own keyboard instead of default keyboard in Android device as input

I have developed one android keyboard. It's working properly as separate app on any device. Now I need to show my app in:

(Setting->Input)

Below image shows external keyboard added in device:

enter image description here

As you see in image Android keyboard is default.

Example: Swiftkey 3 is added externally.

But I don't know how to add my own keyboard so I can choose this?

like image 351
Aniket Avatar asked Jul 04 '13 14:07

Aniket


2 Answers

You should first take a look here. Then continue with this thread here, as stated there:

Some tips:

  • Read this tutorial: Creating an Input Method
  • clone this repo: LatinIME

An inputMethod is basically an Android Service, so yes, you can do HTTP and all the stuff you can do in a Service.

You can open Activities and dialogs from the InputMethod. Once again, it's just a Service.

Here's another tutorial on the topic. I hope all this is helpful for you.

Cheers

like image 143
g00dy Avatar answered Oct 05 '22 16:10

g00dy


You have to create InputMethodService... and just add below code in Menifest.xml file

<service android:name="FastInputIME"
        android:label="@string/fast_input_label"
        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>

Permisson:

<uses-permission android:name="android.permission.BIND_INPUT_METHOD"/>
like image 35
Niranj Patel Avatar answered Oct 05 '22 17:10

Niranj Patel