Re: [android-developers] Re: Jelly bean accessibility service needing android.permission.BIND_ACCESSIBILITY_SERVICE. Backwards compatibility

2012-07-30 Thread Andrew Moore
I know it's not ideal for my app either and means there's lots of
additional activity taking place because I can't restrict the package
monitoring as much as i would like.
On 30 Jul 2012 12:30, "Pent"  wrote:

> > I find it works, but only if declaring the settings in xml and not in
> code.
>
> Oh no... the user needs to be able to specify the settings...
>
> Thanks for the info in any case.
>
> Pent
>
> --
> 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
>

-- 
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

[android-developers] Re: Jelly bean accessibility service needing android.permission.BIND_ACCESSIBILITY_SERVICE. Backwards compatibility

2012-07-30 Thread Pent
> I find it works, but only if declaring the settings in xml and not in code.

Oh no... the user needs to be able to specify the settings...

Thanks for the info in any case.

Pent

-- 
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


Re: [android-developers] Re: Jelly bean accessibility service needing android.permission.BIND_ACCESSIBILITY_SERVICE. Backwards compatibility

2012-07-30 Thread Andrew Moore
I find it works, but only if declaring the settings in xml and not in code.
On 30 Jul 2012 10:57, "Pent"  wrote:

> I've setup a new accessibility service with the BIND permission:
>
>  android:label="Tasker - JB"
> android:name=".MyAccessibilityService"
> android:enabled="@bool/is_jellybean_or_higher"
>android:permission="android.permission.BIND_ACCESSIBILITY_SERVICE"
> >
> 
>  android:name="android.accessibilityservice.AccessibilityService" />
> 
> 
>
> I can see that this service is being used since the name in Android
> accessibility settings is correct.
>
> However, I'm still getting the problem described here:
>
> http://code.google.com/p/android/issues/detail?id=33934
>
> Don't see any security exceptions in the log. Are others still getting
> this 'must turn accessibility off and on after a reboot' problem with
> the BIND permission specified ?
>
> Pent
>
> --
> 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
>

-- 
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

[android-developers] Re: Jelly bean accessibility service needing android.permission.BIND_ACCESSIBILITY_SERVICE. Backwards compatibility

2012-07-30 Thread Pent
I've setup a new accessibility service with the BIND permission:







I can see that this service is being used since the name in Android
accessibility settings is correct.

However, I'm still getting the problem described here:

http://code.google.com/p/android/issues/detail?id=33934

Don't see any security exceptions in the log. Are others still getting
this 'must turn accessibility off and on after a reboot' problem with
the BIND permission specified ?

Pent

-- 
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


[android-developers] Re: Jelly bean accessibility service needing android.permission.BIND_ACCESSIBILITY_SERVICE. Backwards compatibility

2012-07-25 Thread Pent
> Another alternative would be to set up a pair of boolean resources
> (bools.xml). One, is_jelly_bean, would be set to true in -v16 and
> false in the default set. The other, is_not_jelly_bean, would be set
> to false in -v16 and true in the default set. Then, have two 
> elements in the manifest. One would have your
> android:permission="android.permission.BIND_ACCESSIBILITY_SERVICE" and
> android:enabled="@bool/is_jelly_bean". The other  would not
> have your android:permission attribute and would have
> android:enabled="@bool/is_not_jelly_bean"

Great tip Mark, thanks. Expect it will be useful in the future too.

Pent

-- 
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


[android-developers] Re: Jelly bean accessibility service needing android.permission.BIND_ACCESSIBILITY_SERVICE. Backwards compatibility

2012-07-17 Thread Andy dev
There's no harm trying :-)

On Tuesday, July 17, 2012 9:53:52 AM UTC+1, Pent wrote:
>
> Ah, you were subtly side-promoting, very good :-) 
>
> Pent 
>

-- 
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

[android-developers] Re: Jelly bean accessibility service needing android.permission.BIND_ACCESSIBILITY_SERVICE. Backwards compatibility

2012-07-17 Thread Pent
Ah, you were subtly side-promoting, very good :-)

Pent

-- 
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


[android-developers] Re: Jelly bean accessibility service needing android.permission.BIND_ACCESSIBILITY_SERVICE. Backwards compatibility

2012-07-17 Thread Andy dev
Thanks, I'm aware of that. Is was me who raised it :-)

On Tuesday, July 17, 2012 7:42:15 AM UTC+1, Pent wrote:
>
> > 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. 
>
> In case you didn't see it: 
>
> http://code.google.com/p/android/issues/detail?id=23105 
>
> Pent

-- 
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

[android-developers] Re: Jelly bean accessibility service needing android.permission.BIND_ACCESSIBILITY_SERVICE. Backwards compatibility

2012-07-16 Thread Pent
> 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.

In case you didn't see it:

http://code.google.com/p/android/issues/detail?id=23105

Pent

-- 
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


Re: [android-developers] Re: Jelly bean accessibility service needing android.permission.BIND_ACCESSIBILITY_SERVICE. Backwards compatibility

2012-07-16 Thread Streets Of Boston
Ah, I guess that's how the compatibility is done for accessibility features 
of v16 running on lower-versioned Android devices...
It was worth a try :-)

Back to Mark's solutions :-)

On Monday, July 16, 2012 6:23:51 PM UTC-4, Andy dev wrote:
>
> I tried setting back to a targetSdkVersion of 15, but when I've got that 
> and my app directs to the accessibly settings page, my app isn't listed in 
> the accessibility list. As soon as I change it to 16 it shows up.
>
> On Monday, July 16, 2012 11:04:33 PM UTC+1, Mark Murphy (a Commons Guy) 
> wrote:
>>
>> On Mon, Jul 16, 2012 at 5:00 PM, Streets Of Boston 
>> > wrote: 
>> > The targetSdkVersion value only determines the compatibility mode of 
>> your 
>> > app (depending on the device it is running on), which influences the 
>> default 
>> > theme or your app, default behavior of permissions, etc. 
>>
>> The only way this would have an impact is if they are only checking 
>> that permission for apps with targetSdkVersion 16 or higher. That's 
>> entirely possible, but it is not documented either way. 
>>
>> Though I should have thought of that -- thanks, Streets! 
>>
>> -- 
>> Mark Murphy (a Commons Guy) 
>> http://commonsware.com | http://github.com/commonsguy 
>> http://commonsware.com/blog | http://twitter.com/commonsguy 
>>
>> Android Training in NYC: http://marakana.com/training/android/ 
>>
>

-- 
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

Re: [android-developers] Re: Jelly bean accessibility service needing android.permission.BIND_ACCESSIBILITY_SERVICE. Backwards compatibility

2012-07-16 Thread Andy dev
I tried setting back to a targetSdkVersion of 15, but when I've got that 
and my app directs to the accessibly settings page, my app isn't listed in 
the accessibility list. As soon as I change it to 16 it shows up.

On Monday, July 16, 2012 11:04:33 PM UTC+1, Mark Murphy (a Commons Guy) 
wrote:
>
> On Mon, Jul 16, 2012 at 5:00 PM, Streets Of Boston 
>  wrote: 
> > The targetSdkVersion value only determines the compatibility mode of 
> your 
> > app (depending on the device it is running on), which influences the 
> default 
> > theme or your app, default behavior of permissions, etc. 
>
> The only way this would have an impact is if they are only checking 
> that permission for apps with targetSdkVersion 16 or higher. That's 
> entirely possible, but it is not documented either way. 
>
> Though I should have thought of that -- thanks, Streets! 
>
> -- 
> Mark Murphy (a Commons Guy) 
> http://commonsware.com | http://github.com/commonsguy 
> http://commonsware.com/blog | http://twitter.com/commonsguy 
>
> Android Training in NYC: http://marakana.com/training/android/ 
>

-- 
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

Re: [android-developers] Re: Jelly bean accessibility service needing android.permission.BIND_ACCESSIBILITY_SERVICE. Backwards compatibility

2012-07-16 Thread Mark Murphy
On Mon, Jul 16, 2012 at 5:00 PM, Streets Of Boston
 wrote:
> The targetSdkVersion value only determines the compatibility mode of your
> app (depending on the device it is running on), which influences the default
> theme or your app, default behavior of permissions, etc.

The only way this would have an impact is if they are only checking
that permission for apps with targetSdkVersion 16 or higher. That's
entirely possible, but it is not documented either way.

Though I should have thought of that -- thanks, Streets!

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android Training in NYC: http://marakana.com/training/android/

-- 
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


[android-developers] Re: Jelly bean accessibility service needing android.permission.BIND_ACCESSIBILITY_SERVICE. Backwards compatibility

2012-07-16 Thread Streets Of Boston
That should not be a problem. You can set the android:targetSdkVersion to a 
different (lower or higher) version that the one you are compiling/building 
against.

E.g. you can setup your developement/Eclipse environment to compile and 
build against api-level 16 and set targetSdkVersion to 15 (or any other 
number). This will work fine.

The targetSdkVersion value only determines the compatibility mode of your 
app (depending on the device it is running on), which influences the 
default theme or your app, default behavior of permissions, etc.

On Monday, July 16, 2012 3:01:45 PM UTC-4, Andy dev wrote:
>
> I think that would have been ok, but I wanted to use some new features 
> from v16
>
> On Monday, July 16, 2012 7:51:07 PM UTC+1, Streets Of Boston wrote:
>>
>> 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

[android-developers] Re: Jelly bean accessibility service needing android.permission.BIND_ACCESSIBILITY_SERVICE. Backwards compatibility

2012-07-16 Thread Andy dev
I think that would have been ok, but I wanted to use some new features from 
v16

On Monday, July 16, 2012 7:51:07 PM UTC+1, Streets Of Boston wrote:
>
> 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

[android-developers] Re: Jelly bean accessibility service needing android.permission.BIND_ACCESSIBILITY_SERVICE. Backwards compatibility

2012-07-16 Thread Streets Of Boston
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

[android-developers] Re: Jelly bean accessibility service needing android.permission.BIND_ACCESSIBILITY_SERVICE. Backwards compatibility

2012-07-16 Thread Andy dev
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

[android-developers] Re: Jelly bean accessibility service needing android.permission.BIND_ACCESSIBILITY_SERVICE. Backwards compatibility

2012-07-15 Thread Andy dev
Forgot to say my versions in the manifest are set as follows:

android:minSdkVersion="8"
android:targetSdkVersion="16" 

Plus I've updated to the latest android-support-v13.jar file in the project

-- 
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