Hi,

I have an application that allows the user to enable GPS.

In order to do it, first in the main activity I do:

        lm = (LocationManager)
            getSystemService(Context.LOCATION_SERVICE);   
       
        if (!lm.isProviderEnabled(LocationManager.GPS_PROVIDER)){
            showGpsOptions();
        }

showGpsOptions() is:

   private void showGpsOptions()
   {
      Intent gpsOptionsIntent = new Intent(android.provider.Settings.
ACTION_LOCATION_SOURCE_SETTINGS);
      startActivityForResult(gpsOptionsIntent, BACK_FROM_GPS_ACT);
   }

and finally I override main activity onActivityResult in this way:

   protected void onActivityResult(int requestCode, int resultCode, Intent 
data) {
      if (requestCode == BACK_FROM_GPS_ACT){
         ;
      }
      super.onActivityResult(requestCode, resultCode, data);
   }

Problem: the page show up and works, but when I press back I get back to home 
screen.

Question: how can I get back to my application?

Thanks a lot

Ciao

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