I have incorporated the Starter module from Erel's GPS Example HERE in an app that incorporates Google Mapping. The required manifest text is also present. All the intended functionality works correctly apart from the fact that the app causes a brief system level crash when it exits. (A blank Android home screen is displayed for a few seconds before it sorts itself out and returns to normal)
In debug mode I get the error:
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = true **
Error occurred on line: 0 (Starter)
java.lang.Exception: Sub activity_pause signature does not match expected signature.
public static anywheresoftware.b4a.pc.RemoteObject com.xxxxx.yyyyyyy.main_subs_0._activity_pause() throws java.lang.Exception class java.lang.Boolean,
Sub Activity_Pause
CallSubDelayed(Starter, "StopGPS")
End Sub
'From the starter module (unchanged from the quoted example)
Public Sub StopGps
If gpsStarted Then
GPS1.Stop
gpsStarted = False
End If
End Sub