Hi,

Add this android:configChanges="keyboardHidden|orientation|keyboard"
to <activity> element in AndroidManifest.xml file. I hope that this is
what
you want.



On Apr 28, 7:39 am, NicoToc <nicolas.mayn...@gmail.com> wrote:
> Hi,
>
> I have an activity that checks stuffs online when it's created (is the
> GPS on and if not it asks if the user wants to turn it on).
>
> The problem I'm having is that it is also doing it everytime I change
> the orientation of the screen.
>
> I've read some comments on onConfigurationChanged() but is there a
> better way to be sure I'm checking the GPS only when the activity is
> first created?
>
> Thanks a lot
>
> Nicolas
>
> --
> 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 
> athttp://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

Reply via email to