Hi I am working on soft keyboard.
I am getting exception of permission when I am accessing my service class from my simple activity class.
Stack Trace of exception is shown below,

In above image InputServiceMethod class = Underlined by Green color.
Activity class = Underlined by Blue color.
I am getting this exception when I am calling InputServiceMethod class from activity class.
For this I used the below code which gives me exception,
Intent intent = new Intent(v.getContext(),SoftKeyboard.class); startService(intent); finish(); My manifest file as shown below,
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.android.softkeyboard" android:installLocation="preferExternal"> <uses-permission android:name="android.permission.VIBRATE" /> <!-- <permission android:name="android.permission.BIND_INPUT_SERVICE" --> <!-- android:exported="true"></permission> --> <application android:label="@string/ime_name"> <service android:name="com.example.android.softkeyboard.SoftKeyboard" android:permission="android.permission.BIND_INPUT_METHOD" android:exported="true"> <intent-filter> <action android:name="android.view.InputMethod" /> </intent-filter> <meta-data android:name="android.view.im" android:resource="@xml/method" /> </service> <activity android:name="com.configuration.Configuration" android:label="@string/title_activity_configuration" > </activity> </application> I don't understand as even if I give permission about BIND_INPUT_METHOD it is throwing exception.
How to fix it? Thanks