I am recompiling an app in B4A version 8.0, using the Kiosk Service. All was well using B4A version 7.80. But now I am getting this error in the Log.
This is the link to the Kiosk Service I am using:
https://www.b4x.com/android/forum/threads/android-kiosk-mode-tutorial.10839/
I have read the tutorial re Automatic Foreground Mode, but I am not sure of what changes need to be made in the Kiosk Service. I have searched the forum to see if there is any reference to this problem, and can find none. Can anyone help me with this?
Regards
B4X:
*** Service (kioskservice) Create ***
kioskservice_service_create (java line: 174)
java.lang.RuntimeException: Cannot change properties after call to SetInfo. Initialize the notification again.
at anywheresoftware.b4a.objects.NotificationWrapper.getND(NotificationWrapper.java:91)
at anywheresoftware.b4a.objects.NotificationWrapper.setValue(NotificationWrapper.java:122)
at anywheresoftware.b4a.objects.NotificationWrapper.setSound(NotificationWrapper.java:108)
at mail.purge.whapp.kioskservice._service_create(kioskservice.java:174)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:186)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:166)
at mail.purge.whapp.kioskservice.onCreate(kioskservice.java:56)
at android.app.ActivityThread.handleCreateService(ActivityThread.java:2877)
at android.app.ActivityThread.-wrap4(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1427)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
java.lang.RuntimeException: Unable to create service mail.purge.whapp.kioskservice: java.lang.RuntimeException: java.lang.RuntimeException: Cannot change properties after call to SetInfo. Initialize the notification again.
at android.app.ActivityThread.handleCreateService(ActivityThread.java:2887)
at android.app.ActivityThread.-wrap4(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1427)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Caused by: java.lang.RuntimeException: java.lang.RuntimeException: Cannot change properties after call to SetInfo. Initialize the notification again.
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:223)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:166)
at mail.purge.whapp.kioskservice.onCreate(kioskservice.java:56)
at android.app.ActivityThread.handleCreateService(ActivityThread.java:2877)
... 8 more
Caused by: java.lang.RuntimeException: Cannot change properties after call to SetInfo. Initialize the notification again.
at anywheresoftware.b4a.objects.NotificationWrapper.getND(NotificationWrapper.java:91)
at anywheresoftware.b4a.objects.NotificationWrapper.setValue(NotificationWrapper.java:122)
at anywheresoftware.b4a.objects.NotificationWrapper.setSound(NotificationWrapper.java:108)
at mail.purge.whapp.kioskservice._service_create(kioskservice.java:174)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:186)
... 11 more
https://www.b4x.com/android/forum/threads/android-kiosk-mode-tutorial.10839/
I have read the tutorial re Automatic Foreground Mode, but I am not sure of what changes need to be made in the Kiosk Service. I have searched the forum to see if there is any reference to this problem, and can find none. Can anyone help me with this?
Regards
Last edited: