Hello,
I was trying to do this service mock location from this post https://www.b4x.com/android/forum/threads/mock-locationprovider-lib.14266/, but the example don't work.
I'm getting this error
I searched on internet and found this https://stackoverflow.com/questions...not-being-set-despite-all-parameters/30381074
How can i fix the problem?
My manifest
I tried with older sdkVersion, but also did not work.
I also already checked in developer option the app of mock location
Thanks.
I was trying to do this service mock location from this post https://www.b4x.com/android/forum/threads/mock-locationprovider-lib.14266/, but the example don't work.
I'm getting this error
B4X:
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
*** Service (mlpservice) Create ***
** Service (mlpservice) Start **
Error occurred on line: 110 (MLPservice)
java.lang.IllegalArgumentException: Incomplete location object, missing timestamp or accuracy? Location[gps 52,569035,13,196660 hAcc=2 et=?!? alt=84.0 vel=0.0 bear=75.0 vAcc=??? sAcc=??? bAcc=???]
at android.location.LocationManager.setTestProviderLocation(LocationManager.java:1279)
at esolutions4you.B4A.moclocationprovider.moclocationprovider.publishMockLocation(moclocationprovider.java:153)
at de.esolutions4you.mlpdemo.mlpservice._my_timer_tick(mlpservice.java:177)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:732)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:348)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144)
at anywheresoftware.b4a.objects.Timer$TickTack.run(Timer.java:105)
at android.os.Handler.handleCallback(Handler.java:794)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:176)
at android.app.ActivityThread.main(ActivityThread.java:6662)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:873)
** Activity (main) Pause, UserClosed = true **
** Service (mlpservice) Destroy **
I searched on internet and found this https://stackoverflow.com/questions...not-being-set-despite-all-parameters/30381074
How can i fix the problem?
My manifest
B4X:
AddManifestText(
<uses-sdk android:minSdkVersion="5" android:targetSdkVersion="28"/>
<supports-screens android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:anyDensity="true"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
CreateResourceFromFile(Macro, Themes.DarkTheme)
'End of default text.
AddPermission(android.permission.ACCESS_FINE_LOCATION)
AddPermission(android.permission.ACCESS_COARSE_LOCATION)
AddPermission(android.permission.ACCESS_MOCK_LOCATION)
I tried with older sdkVersion, but also did not work.
I also already checked in developer option the app of mock location
Thanks.
Last edited: