You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to run on 0.5.1-preview I get the following exception:
com.example.androidthings.bluetooth.audio E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.androidthings.bluetooth.audio, PID: 1948
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.androidthings.bluetooth.audio/com.example.androidthings.bluetooth.audio.A2dpSinkActivity}: java.lang.SecurityException: Caller lacks required permission com.google.android.things.permission.MANAGE_INPUT_DRIVERS
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2817)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2892)
at android.app.ActivityThread.-wrap11(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1593)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6541)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
Caused by: java.lang.SecurityException: Caller lacks required permission com.google.android.things.permission.MANAGE_INPUT_DRIVERS
at android.os.Parcel.readException(Parcel.java:1942)
at android.os.Parcel.readException(Parcel.java:1888)
at com.google.android.things.userdriver.IInputDriverService$Stub$Proxy.createInputDevice(IInputDriverService.java:140)
at com.google.android.things.userdriver.InputDriver.initialize(InputDriver.java:241)
at com.google.android.things.userdriver.InputDriverManager.addInputDriver(InputDriverManager.java:47)
at com.google.android.things.userdriver.UserDriverManager.registerInputDriver(UserDriverManager.java:83)
at com.google.android.things.contrib.driver.button.ButtonInputDriver.register(ButtonInputDriver.java:83)
at com.example.androidthings.bluetooth.audio.A2dpSinkActivity.configureButton(A2dpSinkActivity.java:311)
at com.example.androidthings.bluetooth.audio.A2dpSinkActivity.initA2DPSink(A2dpSinkActivity.java:247)
at com.example.androidthings.bluetooth.audio.A2dpSinkActivity.onCreate(A2dpSinkActivity.java:173)
So it needs me to request the MANAGE_INPUT_DRIVERS permission. And if I do that: ActivityCompat.requestPermissions(this, new String[]{"com.google.android.things.permission.MANAGE_INPUT_DRIVERS"}, 0);
Then the UI displays an "Allow ... to perform" dialog. But if my IoT device doesn't have screen and input then you can't click the allow button.
The text was updated successfully, but these errors were encountered:
When trying to run on 0.5.1-preview I get the following exception:
So it needs me to request the MANAGE_INPUT_DRIVERS permission. And if I do that:
ActivityCompat.requestPermissions(this, new String[]{"com.google.android.things.permission.MANAGE_INPUT_DRIVERS"}, 0);
Then the UI displays an "Allow ... to perform" dialog. But if my IoT device doesn't have screen and input then you can't click the allow button.
The text was updated successfully, but these errors were encountered: