Hi everyone,
I am testing the original kiosk mode example.
I have compiled and run it on an android 4.4.4 tablet, first time works ok.
If I then press the button on the tablet that returns me to the desktop, when the Kiosk service tries to run the app again, I get the error:
"sorry - Unfortunately Kiosk App has stopped"
can anyone help me ? thanks.
B4A v 12.80
Android v4.4.4
Jdk 14.0.1
resources 11_22
log:
FATAL EXCEPTION: main
Process: anywheresoftware.b4a.kiosk, PID: 5243
java.lang.RuntimeException: Unable to create service anywheresoftware.b4a.kiosk.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:2679)
at android.app.ActivityThread.access$2100(ActivityThread.java:141)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1330)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5336)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:871)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:687)
at dalvik.system.NativeStart.main(Native Method)
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:258)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:201)
at anywheresoftware.b4a.kiosk.kioskservice.onCreate(kioskservice.java:56)
at android.app.ActivityThread.handleCreateService(ActivityThread.java:2659)
... 10 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:92)
at anywheresoftware.b4a.objects.NotificationWrapper.setValue(NotificationWrapper.java:124)
at anywheresoftware.b4a.objects.NotificationWrapper.setSound(NotificationWrapper.java:109)
at anywheresoftware.b4a.kiosk.kioskservice._service_create(kioskservice.java:180)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:221)
... 13 more
I am testing the original kiosk mode example.
Android "Kiosk mode" tutorial
Edit: A better kiosk implementation is available: https://www.b4x.com/android/forum/threads/device-owner-tasklock-kiosk-apps-2017.81765/#post-518018 Kiosk mode applications are applications that lock the device and do not allow the user to run any other application other than the kiosk...
www.b4x.com
If I then press the button on the tablet that returns me to the desktop, when the Kiosk service tries to run the app again, I get the error:
"sorry - Unfortunately Kiosk App has stopped"
can anyone help me ? thanks.
B4A v 12.80
Android v4.4.4
Jdk 14.0.1
resources 11_22
log:
FATAL EXCEPTION: main
Process: anywheresoftware.b4a.kiosk, PID: 5243
java.lang.RuntimeException: Unable to create service anywheresoftware.b4a.kiosk.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:2679)
at android.app.ActivityThread.access$2100(ActivityThread.java:141)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1330)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5336)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:871)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:687)
at dalvik.system.NativeStart.main(Native Method)
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:258)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:201)
at anywheresoftware.b4a.kiosk.kioskservice.onCreate(kioskservice.java:56)
at android.app.ActivityThread.handleCreateService(ActivityThread.java:2659)
... 10 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:92)
at anywheresoftware.b4a.objects.NotificationWrapper.setValue(NotificationWrapper.java:124)
at anywheresoftware.b4a.objects.NotificationWrapper.setSound(NotificationWrapper.java:109)
at anywheresoftware.b4a.kiosk.kioskservice._service_create(kioskservice.java:180)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:221)
... 13 more