Android Question Question about Android Tutorial Background location tracking SDK34

Solution


It will not show after the user selected this option.

If the user selects the second option - Allow only while using the app, then the example will still work as long as the tracker service was started while the app is in the foreground. This means that it will not work automatically after a device boot (see the code in StartAtBootReceiver).

Wolli013

Well-Known Member
Licensed User
Longtime User
B4X:
            If Starter.rp.Check(Starter.BACKGROUND_LOCATION_PERMISSION) = False Then
                MsgboxAsync("Please allow app to always allow location services", "")
                Wait For Msgbox_Result (unused As Int)
                Dim in As Intent
                in.Initialize("android.settings.LOCATION_SOURCE_SETTINGS", "")
                StartActivity(in)
                'catch the Activity_Resume event to prevent an endless loop if the user denies the permission.
                Wait For Activity_Resume
            End If
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User


It will not show after the user selected this option.

If the user selects the second option - Allow only while using the app, then the example will still work as long as the tracker service was started while the app is in the foreground. This means that it will not work automatically after a device boot (see the code in StartAtBootReceiver).
 
Upvote 0
Solution
Cookies are required to use this site. You must accept them to continue using the site. Learn more…