Hi I wanted to get the location once as soon as the app gets started.So i implemented GoogleApiClient in Main Activity.And i added toast to display the Location in onConnected() of GoogleApiClient.onConnectionCallbacks.And hurrah i got the Toast filled with info as soon the app gets started.But I observed an issue that when i change the activity (For e.g Main Activity to Setting Actvity or any Activity) and return back to main activity the toast gets displayed again. And gets displayed again and again as i change the activity and return back. And same happens if i change the orientation of device. Is there any way to do this? I only want that the location should be fetched only once and displayed only once as the app gets started not with changing the activity or orientation.It is also affecting app performance.
-- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. To post to this group, send email to android-developers@googlegroups.com. Visit this group at https://groups.google.com/group/android-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/android-developers/5ff5da09-6a4a-47ec-a861-97f5572ec9ce%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.