Closed IsslamElkasah closed 3 years ago
Hey @IsslamEl could you please create a repository reproducing this error? I tried to do it by myself, but I can't reproduce the error and I guess I'm missing any detail. You can fork Dexter example if you want 😃 Thank you in advance!
Hi @pedrovgs I have created this repo with the described issue above. More details in the README file. Hope it helps
Hi @IsslamEl I'm afraid there is no thing we can do to help you with this issue. I do not understand why, but whenever you remove some permissions already granted, the main activity is recreated. You can check how this is not related to Dexter if you modify your code to use the following onCreate
implementation:
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Log.d(TAG, "onCreate");
//checkPermissions();
openSettings();
}
If you do this, you'll see how after starting the app and denying the already granted permissions (you don't need Dexter to do this) the MainActivity is recreated. I'm so sorry, but I'm closing the issue now that we know there is nothing we can do to fix it in the library repository.
Thank you so much for creating the sample project.
Expected behaviour
Changing existing permission in app permissions settings from Allow to Deny then returning to the activity where settings was called should call onResume.
Actual behaviour
1- After clicking the back arrow from app settings and returning to my app, it gets recreated and Logcat shows onCreate being called not onResume. 2- When I click Go to Settings from my app and change a required permission from Deny to Allow, returning to app calls onResume. This should be the same as step 1 right?
Steps to reproduce
1- Grant one permission beforehand
2- Checking multiple permission in MainActivity inside onCreate
3- Deny granted permission and return using back arrows from app settings 4- Observe onCreate being called
Version of the library
6.2.1