Why is my onResume being called twice?

if you trying request permissions every time it can cause such problems, just check if you already granted them

requestPermissions can cause it:

onCreate
onStart
onResume
onPause
onResume

Use this method ContextCompat.checkSelfPermission(context, permission) to check if permission was granted or not before requesting it

This method returns int and you can check it with PackageManager.PERMISSION_GRANTED constant

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)