I am starting to upgrade my apps for the upcoming Google SDK of 26+ requirement and am having an issue with call run time permissions. When my app starts, it checks for the existence of a few files and creates them if they are not there. The issue I am having is on new installs where the permissions haven't been granted yet. The user is still answering the permission questions while the files are trying to be created and the app crashes because it doesn't have permission yet to write to the storage.
I currently have a single activity (Main). I was thinking of moving all the code in Main to a second activity (GUI) and do the permission check in Main. Once the questions are answered, it would start GUI. The next time through, Main would read a flag set the first time and just start the GUI activity.
What is the best practice on waiting for the user to answer these prompts before moving on?
I currently have a single activity (Main). I was thinking of moving all the code in Main to a second activity (GUI) and do the permission check in Main. Once the questions are answered, it would start GUI. The next time through, Main would read a flag set the first time and just start the GUI activity.
What is the best practice on waiting for the user to answer these prompts before moving on?