Open arsadeghi opened 7 years ago
I don't know if you have already found an answer but this is not a bug. What happens is that the savedInstanceState value becomes invalid because your app process got killed and restarted after you revoke the permission. The current fix I have for my app is passing null to my onCreate activity. This is because even after your process is killed the savedInstanceState still remains and is returned after you go back to the app. If you did the same thing without having the app open, it won't crash because savedInstanceState is null. This is a Marshmellow and bove problem. It is because of Google changing how users give access to permission and that they now have the ability to revoke it.
Ok, that make sence. But how to know, if the savedInstanceState has invalid value?
And what is the disadvantage by passing null to super.onCreate() method?
Hey Shaftar, haven't time to continue work on this branch.
If you're interested in the scanning part only, I might share an unpublished, which works on Android 10 (scanning, not uploading though)
What steps will reproduce the problem? 1- Revoke the location permission for the app (In Android OS >= M, it is revoked by default after app installation) 2- Start a new session.
Here is the screenshot:![openbmap](https://cloud.githubusercontent.com/assets/11197005/21507462/5169eab4-cc2d-11e6-86d0-de8700adf6a8.gif)
What is the expected output? What do you see instead? If the "Location" permission is not granted upon creating a new session, should show the permission dialog and ask the user to grant the missing (i.e. Location) permission.
What version are you using? On what operating system? Master branch on Nexus 5, API 23
Please provide any additional information below. stack trace after the crash: