Android Question [solved] "Watchfacewear" error message only with B4A 12.50

Watchkido1

Active Member
Licensed User
Longtime User
I have used Watchfacewear in B4A12.00 and no problems.
However, when I load my program with B4A 12.50 I get the following error message.
What can I do?


Sub Service_Create Digital:
Sub Service_Create
    DigitalWFManager.Initialize("WF", 1000)
    JavaObject.InitializeContext
    ' Stellen Sie sicher, dass das B4A DateTime-Objekt Zeitänderungsereignisse erhält
    DateTime.ListenToExternalTimeChanges
Sub
beenden


WatchfaceWear-Fehlermeldung nur in B4A12.50:
** Aktivität (Track) Lebenslauf **
Zifferblatt unsichtbar
*** Dienst (digitalwatchface) Erstellen ***
digitalwatchface_service_create (Java-Zeile: 156)
java.lang.NoSuchFieldError: Kein Feld isService vom Typ Z in der Klasse Lanywheresoftware/b4a/BA$SharedProcessBA; oder seine Superklassen (Deklaration von 'anywheresoftware.b4a.BA$SharedProcessBA' erscheint in /data/app/de.watchkido.aviuhr-Rg7sDeX-HS7OLV3ajaRqvQ==/base.apk)
    bei de.amberhome.wearwrapper.WatchFaceService$WFManager.Initialize(WatchFaceService.java:98)
    unter de.watchkido.aviuhr.digitalwatchface._service_create(digitalwatchface.java:156)
    bei java.lang.reflect.Method.invoke(Native Methode)
    bei irgendwosoftware.b4a.BA.raiseEvent2(BA.java:221)
    bei irgendwosoftware.b4a.BA.raiseEvent(BA.java:201)
    bei de.watchkido.aviuhr.digitalwatchface.onCreate(digitalwatchface.java:59)
    bei android.app.ActivityThread.handleCreateService(ActivityThread.java:3533)
    bei android.app.ActivityThread.access$1300(ActivityThread.java:200)
    bei android.app.ActivityThread$H.handleMessage(ActivityThread.java:1667)
    bei android.os.Handler.dispatchMessage(Handler.java:106)
    bei android.os.Looper.loop(Looper.java:193)
    bei android.app.ActivityThread.main(ActivityThread.java:6680)
    bei java.lang.reflect.Method.invoke(Native Methode)
    unter com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
    unter com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
digitalwatchface_service_create (Java-Zeile: 156)
java.lang.NoSuchFieldError: Kein Feld isService vom Typ Z in der Klasse Lanywheresoftware/b4a/BA$SharedProcessBA; oder seine Superklassen (Deklaration von 'anywheresoftware.b4a.BA$SharedProcessBA' erscheint in /data/app/de.watchkido.aviuhr-Rg7sDeX-HS7OLV3ajaRqvQ==/base.apk)
    at de.amberhome.wearwrapper.WatchFaceService$WFManager.Initialize(WatchFaceService.java:98)
    at de.watchkido.aviuhr.digitalwatchface._service_create(digitalwatchface.java:156)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:221)
    at anywheresoftware.b4a.BA.raiseEvent(BA.java:201)
    at de.watchkido.aviuhr.digitalwatchface.onCreate(digitalwatchface.java:59)
    at android.app.ActivityThread.handleCreateService(ActivityThread.java:3533)
    at android.app.ActivityThread.access$1300(ActivityThread.java:200)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1667)
    at android.os.Handler.dispatchMessage(Handler.java:106)
    at android.os.Looper.loop(Looper.java:193)
    at android.app.ActivityThread.main(ActivityThread.java:6680)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
*** Service (digitalwatchface) Create ***
digitalwatchface_service_create (java line: 156)
java.lang.NoSuchFieldError: No field isService of type Z in class Lanywheresoftware/b4a/BA$SharedProcessBA; or its superclasses (declaration of 'anywheresoftware.b4a.BA$SharedProcessBA' appears in /data/app/de.watchkido.aviuhr-Rg7sDeX-HS7OLV3ajaRqvQ==/base.apk)
    at de.amberhome.wearwrapper.WatchFaceService$WFManager.Initialize(WatchFaceService.java:98)
    at de.watchkido.aviuhr.digitalwatchface._service_create(digitalwatchface.java:156)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:221)
    at anywheresoftware.b4a.BA.raiseEvent(BA.java:201)
    at de.watchkido.aviuhr.digitalwatchface.onCreate(digitalwatchface.java:59)
    at android.app.ActivityThread.handleCreateService(ActivityThread.java:3533)
    at android.app.ActivityThread.access$1300(ActivityThread.java:200)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1667)
    at android.os.Handler.dispatchMessage(Handler.java:106)
    at android.os.Looper.loop(Looper.java:193)
    at android.app.ActivityThread.main(ActivityThread.java:6680)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
digitalwatchface_service_create (java line: 156)
java.lang.NoSuchFieldError: No field isService of type Z in class Lanywheresoftware/b4a/BA$SharedProcessBA; or its superclasses (declaration of 'anywheresoftware.b4a.BA$SharedProcessBA' appears in /data/app/de.watchkido.aviuhr-Rg7sDeX-HS7OLV3ajaRqvQ==/base.apk)
    at de.amberhome.wearwrapper.WatchFaceService$WFManager.Initialize(WatchFaceService.java:98)
    at de.watchkido.aviuhr.digitalwatchface._service_create(digitalwatchface.java:156)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:221)
    at anywheresoftware.b4a.BA.raiseEvent(BA.java:201)
    at de.watchkido.aviuhr.digitalwatchface.onCreate(digitalwatchface.java:59)
    at android.app.ActivityThread.handleCreateService(ActivityThread.java:3533)
    at android.app.ActivityThread.access$1300(ActivityThread.java:200)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1667)
    at android.os.Handler.dispatchMessage(Handler.java:106)
    at android.os.Looper.loop(Looper.java:193)
    at android.app.ActivityThread.main(ActivityThread.java:6680)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
*** Service (digitalwatchface) Create ***
digitalwatchface_service_create (java line: 156)
java.lang.NoSuchFieldError: No field isService of type Z in class Lanywheresoftware/b4a/BA$SharedProcessBA; or its superclasses (declaration of 'anywheresoftware.b4a.BA$SharedProcessBA' appears in /data/app/de.watchkido.aviuhr-Rg7sDeX-HS7OLV3ajaRqvQ==/base.apk)
    at de.amberhome.wearwrapper.WatchFaceService$WFManager.Initialize(WatchFaceService.java:98)
    at de.watchkido.aviuhr.digitalwatchface._service_create(digitalwatchface.java:156)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:221)
    at anywheresoftware.b4a.BA.raiseEvent(BA.java:201)
    at de.watchkido.aviuhr.digitalwatchface.onCreate(digitalwatchface.java:59)
    at android.app.ActivityThread.handleCreateService(ActivityThread.java:3533)
    at android.app.ActivityThread.access$1300(ActivityThread.java:200)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1667)
    at android.os.Handler.dispatchMessage(Handler.java:106)
    at android.os.Looper.loop(Looper.java:193)
    at android.app.ActivityThread.main(ActivityThread.java:6680)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
digitalwatchface_service_create (java line: 156)
java.lang.NoSuchFieldError: No field isService of type Z in class Lanywheresoftware/b4a/BA$SharedProcessBA; or its superclasses (declaration of 'anywheresoftware.b4a.BA$SharedProcessBA' appears in /data/app/de.watchkido.aviuhr-Rg7sDeX-HS7OLV3ajaRqvQ==/base.apk)
    at de.amberhome.wearwrapper.WatchFaceService$WFManager.Initialize(WatchFaceService.java:98)
    at de.watchkido.aviuhr.digitalwatchface._service_create(digitalwatchface.java:156)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:221)
    at anywheresoftware.b4a.BA.raiseEvent(BA.java:201)
    at de.watchkido.aviuhr.digitalwatchface.onCreate(digitalwatchface.java:59)
    at android.app.ActivityThread.handleCreateService(ActivityThread.java:3533)
    at android.app.ActivityThread.access$1300(ActivityThread.java:200)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1667)
    at android.os.Handler.dispatchMessage(Handler.java:106)
    at android.os.Looper.loop(Looper.java:193)
    at android.app.ActivityThread.main(ActivityThread.java:6680)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
*** Service (digitalwatchface) Create ***
digitalwatchface_service_create (java line: 156)
java.lang.NoSuchFieldError: No field isService of type Z in class Lanywheresoftware/b4a/BA$SharedProcessBA; or its superclasses (declaration of 'anywheresoftware.b4a.BA$SharedProcessBA' appears in /data/app/de.watchkido.aviuhr-Rg7sDeX-HS7OLV3ajaRqvQ==/base.apk)
    at de.amberhome.wearwrapper.WatchFaceService$WFManager.Initialize(WatchFaceService.java:98)
    at de.watchkido.aviuhr.digitalwatchface._service_create(digitalwatchface.java:156)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:221)
    at anywheresoftware.b4a.BA.raiseEvent(BA.java:201)
    at de.watchkido.aviuhr.digitalwatchface.onCreate(digitalwatchface.java:59)
    at android.app.ActivityThread.handleCreateService(ActivityThread.java:3533)
    at android.app.ActivityThread.access$1300(ActivityThread.java:200)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1667)
    at android.os.Handler.dispatchMessage(Handler.java:106)
    at android.os.Looper.loop(Looper.java:193)
    at android.app.ActivityThread.main(ActivityThread.java:6680)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
digitalwatchface_service_create (java line: 156)
java.lang.NoSuchFieldError: No field isService of type Z in class Lanywheresoftware/b4a/BA$SharedProcessBA; or its superclasses (declaration of 'anywheresoftware.b4a.BA$SharedProcessBA' appears in /data/app/de.watchkido.aviuhr-Rg7sDeX-HS7OLV3ajaRqvQ==/base.apk)
    at de.amberhome.wearwrapper.WatchFaceService$WFManager.Initialize(WatchFaceService.java:98)
    at de.watchkido.aviuhr.digitalwatchface._service_create(digitalwatchface.java:156)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:221)
    at anywheresoftware.b4a.BA.raiseEvent(BA.java:201)
    at de.watchkido.aviuhr.digitalwatchface.onCreate(digitalwatchface.java:59)
    at android.app.ActivityThread.handleCreateService(ActivityThread.java:3533)
    at android.app.ActivityThread.access$1300(ActivityThread.java:200)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1667)
    at android.os.Handler.dispatchMessage(Handler.java:106)
    at android.os.Looper.loop(Looper.java:193)
    at android.app.ActivityThread.main(ActivityThread.java:6680)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)

JAVA:
#If JAVA

import android.content.Intent;
import android.content.IntentFilter;
import android.os.BatteryManager;

public String BatteryLevel()
{
    float retVal = 0;
    IntentFilter iFilter = new IntentFilter(Intent.ACTION_BATTERY_CHANGED);
    Intent batteryStatus = registerReceiver(null, iFilter);
    retVal = batteryStatus.getIntExtra(BatteryManager.EXTRA_LEVEL, -1);
    return Integer.toString(Math.round(retVal));
}

//import android.os.Vibrator;
//
//Public void Vibrate()
//{
//    Vibrator Vibrate = (Vibrator) getSystemService(VIBRATOR_SERVICE);
//    // Vibrate For 100 milliseconds
//    Vibrate.vibrate(100);
//}

#End If
 
Last edited:

agraham

Expert
Licensed User
Longtime User
I'm afraid that it look like Erel has removed a field called "isService" from the ProcessBA class, perhaps owing to the de-emphasis of services in preference to receivers. The "initialize" method of the WatchFace library checks this field when starting the WatchFaceService to check that it really is running in a service.

The bottom line is that without a modification this seven year old library is obsolete and now useless with current versions of B4A.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…