Android Question Android Things v1.0.2

csjoe72

Member
Licensed User
Longtime User
Hi Erel,
I upgraded my rpi board to Android Things v1.0.2 today. (API:27)

1) I installed my legacy app again but i got a new error log message:

main$ResumableSub_Activity_Createresume (java line: 453)
java.lang.SecurityException: Caller lacks required permission com.google.android.things.permission.USE_PERIPHERAL_IO
at android.os.Parcel.readException(Parcel.java:2005)
at android.os.Parcel.readException(Parcel.java:1951)
at com.google.android.things.pio.IPeripheralManagerClient$Stub$Proxy.GetGpioClient(IPeripheralManagerClient.java:759)
at com.google.android.things.pio.GpioImpl.<init>(GpioImpl.java:50)
at com.google.android.things.pio.PeripheralManager.openGpio(PeripheralManager.java:197)
at anywheresoftware.b4a.objects.PeripheralManagerWrapper.OpenGpio(PeripheralManagerWrapper.java:45)
at b4a.example.main$ResumableSub_Activity_Create.resume(main.java:453)
at b4a.example.main._activity_create(main.java:394)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:186)
at b4a.example.main.afterFirstLayout(main.java:104)
at b4a.example.main.access$000(main.java:17)
at b4a.example.main$WaitForLayout.run(main.java:82)
at android.os.Handler.handleCallback(Handler.java:790)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6494)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
java.lang.SecurityException: Caller lacks required permission com.google.android.things.permission.USE_PERIPHERAL_IO

I used the pin4 and pin11. If I remove these lines everything will be ok.

I have refreshed "things" library to 1.10 I'm using B4A v8.0.

2) No autostart on board now. If I switch off/on the power the app no starts again. (I have to install it again)

Any idea?
 

csjoe72

Member
Licensed User
Longtime User
Thanks! The next line is missed:
AddPermission(com.google.android.things.permission.USE_PERIPHERAL_IO)

Autostart:
I changed one line in the manifest file:
<category android:name="android.intent.category.IOT_LAUNCHER"/>
to
<category android:name="android.intent.category.HOME"/>
Its works!
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…