New Google Play services stuff like low power location

Dadeda

Member
Licensed User
Longtime User
Today i've updated google play services to version 22.

Before everything was working fine, but now it breaks the app.
I've updated google play jar into lib folder, copy res folder and it compiles ok but when i run the app i got :

B4X:
** Activity (main) Create, isFirst = true **


** Activity (main) Resume **


Updated: (ArrayList) []


** Service (locationtracker) Create **


java.lang.RuntimeException: Unable to create service pt.dadeda.hotelbooking.locationtracker: java.lang.RuntimeException: java.lang.NoClassDefFoundError: uk.co.martinpearman.b4a.android.gms.location.subclasses.LocationClient


    at android.app.ActivityThread.handleCreateService(ActivityThread.java:2277)
    at android.app.ActivityThread.access$1600(ActivityThread.java:128)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1215)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:137)
    at android.app.ActivityThread.main(ActivityThread.java:4517)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:511)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:993)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:760)
    at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.RuntimeException: java.lang.NoClassDefFoundError: uk.co.martinpearman.b4a.android.gms.location.subclasses.LocationClient


    at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:148)
    at anywheresoftware.b4a.BA.raiseEvent(BA.java:159)
    at pt.dadeda.hotelbooking.locationtracker.onCreate(locationtracker.java:45)
    at android.app.ActivityThread.handleCreateService(ActivityThread.java:2267)
    ... 10 more
Caused by: java.lang.NoClassDefFoundError: uk.co.martinpearman.b4a.android.gms.location.subclasses.LocationClient
    at uk.co.martinpearman.b4a.android.gms.location.LocationClient.Initialize(LocationClient.java:112)
    at pt.dadeda.hotelbooking.locationtracker._service_create(locationtracker.java:201)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:511)
    at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:636)
    at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:302)
    at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:238)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:511)
    at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:121)
    ... 13 more
Program compiled in debug mode, can only run with debugger attached.


** Service (locationtracker) Create **


java.lang.RuntimeException: Unable to create service pt.dadeda.hotelbooking.locationtracker: java.lang.RuntimeException: java.lang.Exception: Sub service_create signature does not match expected signature.


    at android.app.ActivityThread.handleCreateService(ActivityThread.java:2277)
    at android.app.ActivityThread.access$1600(ActivityThread.java:128)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1215)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:137)
    at android.app.ActivityThread.main(ActivityThread.java:4517)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:511)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:993)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:760)
    at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.RuntimeException: java.lang.Exception: Sub service_create signature does not match expected signature.
    at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:148)
    at anywheresoftware.b4a.BA.raiseEvent(BA.java:159)
    at pt.dadeda.hotelbooking.locationtracker.onCreate(locationtracker.java:45)
    at android.app.ActivityThread.handleCreateService(ActivityThread.java:2267)
    ... 10 more
Caused by: java.lang.Exception: Sub service_create signature does not match expected signature.
    at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:123)
    ... 13 more
 
Upvote 0

Dadeda

Member
Licensed User
Longtime User
Help! i can't make this work... and i can't go to rev 21 of google play services where everything was working...
 
Upvote 0

warwound

Expert
Licensed User
Longtime User
There's a problem with the ExternalDisplays library too and i'm sure that's related to a recent Google Play Services update.
Unfortunately i just don't have the time to find a solution.

Hopefully someone else can thru trial and error find a solution.
 
Upvote 0

Dadeda

Member
Licensed User
Longtime User
I have manage to revert google play services to rev 21, and all is working again, DO NOT UPDATE GOOGLE PLAY TO REV 22 or it will break your app!!
hoppefully someone will be able to solve this!!
 
Upvote 0

Croïd

Active Member
Licensed User
Longtime User
For information with my version 22

B4X:
Installing file.
** Activity (main) Pause, UserClosed = false **
PackageAdded: package:uk.co.martinpearman.b4a.locationapidemo
Copying updated assets files (1)
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
** Service (locationtracker) Create **
java.lang.RuntimeException: Unable to create service uk.co.martinpearman.b4a.locationapidemo.locationtracker: java.lang.RuntimeException: java.lang.NoClassDefFoundError: uk.co.martinpearman.b4a.android.gms.location.subclasses.LocationClient
    at android.app.ActivityThread.handleCreateService(ActivityThread.java:2741)
    at android.app.ActivityThread.access$1800(ActivityThread.java:144)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1361)
    at android.os.Handler.dispatchMessage(Handler.java:102)
    at android.os.Looper.loop(Looper.java:135)
    at android.app.ActivityThread.main(ActivityThread.java:5221)
    at java.lang.reflect.Method.invoke(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:372)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
Caused by: java.lang.RuntimeException: java.lang.NoClassDefFoundError: uk.co.martinpearman.b4a.android.gms.location.subclasses.LocationClient
    at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:148)
    at anywheresoftware.b4a.BA.raiseEvent(BA.java:159)
    at uk.co.martinpearman.b4a.locationapidemo.locationtracker.onCreate(locationtracker.java:45)
    at android.app.ActivityThread.handleCreateService(ActivityThread.java:2731)
    ... 9 more
Caused by: java.lang.NoClassDefFoundError: uk.co.martinpearman.b4a.android.gms.location.subclasses.LocationClient
    at uk.co.martinpearman.b4a.android.gms.location.LocationClient.Initialize(LocationClient.java:112)
    at uk.co.martinpearman.b4a.locationapidemo.locationtracker._service_create(locationtracker.java:189)
    at java.lang.reflect.Method.invoke(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:372)
    at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:636)
    at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:302)
    at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:238)
    at java.lang.reflect.Method.invoke(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:372)
    at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:121)
    ... 12 more
** Activity (main) Resume **
 
Last edited:
Upvote 0

Croïd

Active Member
Licensed User
Longtime User
Warwound, all sample api_location crash on Lollipop (with play services R21 or R22) !

do you think it comes from android 5 ?

and thank you for all your work
 
Upvote 0

Dadeda

Member
Licensed User
Longtime User
Upvote 0

coslad

Well-Known Member
Licensed User
Longtime User
Just a question, this library return the location only if the " Location services settings" is on? am i right? so if i use the toggle button that is next the wifi icon, the app doesn't works anymore! great work google! !!
 
Upvote 0
Top