Topic locked

Restart Vuforia on Android after camera permission is granted

October 13, 2021 - 1:21pm #1

Hi everyone. I am trying to gracefully handle a case when an Android user is denying recording permissions on app start.

My current approach is the following:

  • When user denies camera permission I get a Vuforia initialization error with code PERMISSION_ERROR
  • If the PERMISSION_ERROR was received in OnVuforiaInitialized callback I show a screen explaining that camera permission is required and display a button that navigates the user to the app settings
  • When user changes the permissions and navigates back to the app I try to re-initialize Vuforia with VuforiaApplication.Instance.Initialize()

The problem I am facing is that even though the user has granted camera access in application settings re-initialization of Vuforia still fails with PERMISSION_ERROR. I was wondering if there is any way of handling that or I should just resort to something else like closing the application. I am currently using SDK 10.1.4.

Topic locked