I'm just guessing here: What if you set thee  android:targetSdkVersion to a 
value less than 16? 

On Monday, July 16, 2012 2:43:47 PM UTC-4, Andy dev wrote:
>
> Thanks Mark, your answer was perfect!
>
> After playing around the solution that worked for me was to use the bool 
> flags with the values-v16 directory and subclassing the service with with a 
> MainRunningServicePreJellyBean class.
> Although compiling didn't complain with using the same service class 
> twice, the jelly bean version just didn't work (which was declared 2nd in 
> the file) so I guess it found the first reference and just set it to 
> disabled.
>
> I agree on the documentation though. The SDK samples are for v16 and open 
> source projects like talkback have a pre and post ice cream sandwich set of 
> apps, so there wasn't any examples to go off.
>
> Now if I could only find out the reason why since ice cream sandwich 
> accessibility has caused some phones to start talking to them as soon as 
> the accessibility service of my app is enabled even though talkback is off 
> and I don't use any TTS in the app.
>
> On Sunday, July 15, 2012 11:51:22 PM UTC+1, Andy dev wrote:
>>
>> I've got an app in the market which uses the accessibility service. For 
>> it to work correctly in Jelly bean I need to add 
>> the android.permission.BIND_ACCESSIBILITY_SERVICE permission to the service 
>> declaration in the android manifest file.
>>
>> Doing this is fine and gets things working for jelly bean, but then going 
>> back to my gingerbread Nexus One, it ends up crashing with the following 
>> error:
>>
>> 07-15 22:15:56.090: E/ACRA(1168): Caused by: java.lang.SecurityException: 
>> Not allowed to start service Intent { cmp=com.example/.MainRunningService 
>> (has extras) } without permission 
>> android.permission.BIND_ACCESSIBILITY_SERVICE
>>
>> I can't think how to get around this. Any suggestions. I would have thought 
>> it would have got silently ignored in older builds.
>>
>>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to