Android Question Intercept onRequestPermissionsResult to separate class

Ivica Golubovic

Active Member
Licensed User
I have a problem that has been bothering me for days. Is it possible in a separate class, not in the Activity, to intercept the event:

Java event:
@Override
public void onRequestPermissionsResult(int requestCode,String permissions[], int[] grantResults)

So I know it is possible to intercept the onActivityResult event via the anywheresoftware.b4a.IOnActivityResult class. Is there any similar principle for onRequestPermissionsResult?

Thanks.
 

DonManfred

Expert
Licensed User
Longtime User
The correct way is to use RuntimePermissions Library and let the User use it.
Implementing it in another way is not the correct way in B4A.
 
Upvote 0

Ivica Golubovic

Active Member
Licensed User
The correct way is to use RuntimePermissions Library and let the User use it.
Implementing it in another way is not the correct way in B4A.
Of course I know it is, but in my case it's impossible via Activity_PermissionResult or B4XPage_PermissionResult, that's why I'm forced to ask this question.
 
Upvote 0

Ivica Golubovic

Active Member
Licensed User
what permission you can not get in this way?
I am working on a RuntimePermission class that will simplify my work in future projects. If the class proves to be effective, I will probably create a library that I will post on the forum. The condition is that I succeed in the idea, and that's why I need access to the mentioned event.
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Upvote 0

Ivica Golubovic

Active Member
Licensed User
You can check the Runtimepermissionslibrary-code at Github if you get an an Idea

Yes, I used certain parts of the library, but the problem is that the compiler calls the specified event that is bound to the Activity. So, this library does not call directly specified event.
 
Upvote 0
Top