Issue
I'm Writing the app in pure c++ and i have the code to open the camera. and set-up the AndroidManifest.xml as:
<uses-permission android:name="android.permission.CAMERA"/>
<uses-feature android:name="android.hardware.camera2" android:required="true" />
when running the app for the first time it does not provide the prompt to turn permission on. after the installation i have to do it manually by, Settings->Apps->"MyApp"->Permissions.
How do I provide the prompt in c++, without introducing java code? All help is greatly Appreciated.
Solution
So I have seen this as well.
To do it manually you can also do it via command line with
adb shell pm grant com.package.name android.permission.CAMERATo check if permissions are there
adb shell dumpsys package com.package.nameThis is the series of steps to ask for permissions with Java
To figure out how to do it without Java, you will need to dig into the AOSP to find how it is working under the hood... which isn't trivial and no examples to be found.
Answered By - FrickeFresh
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.