Android Question GoogleFit(ness) Client try in 2021

peacemaker

Expert
Licensed User
Longtime User
HI, All
Who tried recently the lib ?

@DonManfred , hi, didn't you try your lib in 2021 ?
Please, just try to start, seems, some changes in API, and "readData" or "Subscribe" make error:
B4X:
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
no extras
onConnected GoogleApiClient
** Activity (main) Pause, UserClosed = false **
4: 4:
sending message to waiting queue (fitness_onaccount)
running waiting messages (1)
Fitness_onAccount(false)
BeginTime = 1514750400000
  EndTime = 1615310781101
Error occurred on line: 67 (Main)
java.lang.NullPointerException: null reference
    at com.google.android.gms.common.internal.Preconditions.checkNotNull(com.google.android.gms:play-services-basement@@17.6.0:1)
    at com.google.android.gms.fitness.Fitness.getRecordingClient(com.google.android.gms:play-services-fitness@@20.0.0:8)
    at de.donmanfred.FitnessClientWrapper.Subscribe(FitnessClientWrapper.java:134)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.shell.Shell.runVoidMethod(Shell.java:777)
    at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:354)
    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.BA$2.run(BA.java:387)
    at anywheresoftware.b4a.BA.setActivityPaused(BA.java:459)
    at de.donmanfred.fitness.main$ResumeMessage.run(main.java:313)
    at android.os.Handler.handleCallback(Handler.java:938)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:246)
    at android.app.ActivityThread.main(ActivityThread.java:8443)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:596)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1130)
** Activity (main) Resume **
 

DonManfred

Expert
Licensed User
Longtime User
hi, didn't you try your lib in 2021 ?
no. And even not in 2020

Guess the dependecies have changed. Check the xml and look for DependsOn. Adapt them.
 
Upvote 0
Top