Android Question Close GPS and MapFragment

netsistemas

Active Member
Licensed User
Longtime User
I have a GPS and MapFragment in same activity.
I need close GPS STATUS when activity.finish but not works. GPS status are ON.

I do this:

GPS1.Stop

Activity.Finish

but i don't know MapFragment CLOSE.
how do MapFragment close?

i use this items for view a map and get position.

Dim Geocoder1 As Geocoder
Dim GPS1 As GPS
Dim mFragment As MapFragment
Dim gmap As GoogleMap
 

eurojam

Well-Known Member
Licensed User
Longtime User
GPS1.stop does not disable the GPS in the android system. this is not possible by code. You habe to start the intent, that the user can switch it off manually:
B4X:
StartActivity(GPS1.LocationSettingsIntent)
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…