Closed sagar091 closed 5 years ago
Hi sagar. TedPermission creates its own Activity. So I guess that when this Activity is closed, the onResume of your fragment is called.
@sagar091 Why you use TedPermission
in onReumse()
I recommend use in onCreateView()
Hello @ParkSangGwon
In my case, there is a fragment and I called an API on its onResume method. Depends on a response, I asked runtime permission for location through TedPermission and when its granted, it will again call onResume method of that fragment and keep calling API again and again.
Even I commented API calling code, and just put TedPermission, then it's throwing my debug point at onResume method again and again.
When I manually enable permission for the app and comment ted permission code, it works. API calling occurs once instead of repeating.
So, what's the logic behind this? Is TedPermission's onPermissionGranted method called the onResume method itself? Need help.