[android-developers] Re: Handling remote control buttons
set your main activity to android:launchMode="singleTask" android:alwaysRetainTaskState="true"
and all your other activities to android:noHistory="true" (if applicable)
On Thursday, April 26, 2012 4:09:25 AM UTC-4, Jeremy Villalobos wrote:
--Hello:I followed the advice from this blog to receive the bluetooth buttons for my app:http://android-developers.blogspot.com/2010/06/allowing- applications-to-play-nicer. html The buttons work on the average case. However, if the user opens two instances of my app (one by starting the app, and another through an Intent call like open file, open attashment etc.) now I have two instances running, and they both run the button code. I get two calls.I tried limiting the number of instances in the Manifest, but it does no effect ( Tried android:launchMode="singleTop" and "singleInstance" ).What is the clean way to get this to work ?Thanks
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home