One application (for Android) calls Service, made in a separate project.

startService(new Intent("myServ1").putExtra("name", "value"));

First, run the Service, everything is fine. Then I run the program, press the button and get an error.

Here is the log:

 01-15 13:29:24.702: W/ActivityManager(482): Permission Denial: Accessing service ComponentInfo{ru.servicekillserver/ru.servicekillserver.MyService} from pid=1220, uid=10086 requires android.permission.BIND_TEXT_SERVICE 01-15 13:29:24.706: W/dalvikvm(1220): threadid=1: thread exiting with uncaught exception (group=0xa4cacb20) 

It seems to me that something is wrong in the manifest file. And what exactly, I do not understand.
Below part of the manifesto:

 <service android:permission="android.permission.BIND_TEXT_SERVICE" android:name="MyService"> <intent-filter> <action android:name="myServ1"/> <category android:name="android.intent.category.DEFAULT"/> </intent-filter> </service> 
  • everything seems to be right ... tried on different devices? - Vladyslav Matviienko
  • It's not very clear what your service does. In general, the specified perm is used for spell-checker. The documentation states:> Applications with a spell checker service must declare. The service must also declare an intent filtering <android: name = "android.service.textservice.SpellCheckerService" /> that declares the configuration information for the spell checker. - Barmaley
  • here's an example of AndroidManifest.xml gitorious.org/rowboat/packages-inputmethods-latinime/source/… - Vladyslav Matviienko

1 answer 1

Try not to set the resolution in the property of the service tag, but inside the manifest tag:

 <manifest> ... <uses-permission android:name="android.permission.BIND_TEXT_SERVICE" /> ... </manifest> 
  • I tried, it did not help. Eclips swears, says that it is impossible. - kaaa
  • @YuriSPb, this perm is never specified in uses-permission. - Vladyslav Matviienko
  • Stop using Eclipse, if you start developing and have never used it before, then I advise you to switch to Android Studio before it is too late. - andreich
  • @metalurgus, I was just wondering about the coffee grounds) So as not to confuse people, it is necessary to remove them or just convert them into comments? =) - JuriySPb
  • one
    It helped if inside the manifest tag. Many thanks. - kaaa