another extension from me to make it easier to work with permissions when launching the application. it allows you not to clutter the application with blocks to implement the start of work on the installed
application. all that needs to be done is to list the necessary permissions, and the extension itself will determine the android version, whether such permission is used in it, whether it can be requested and it was requested earlier. it will also skip permission if the system does not respond to it. as a result, it significantly reduces the process of working with permissions.
all blocs:
the main functional unit RequestPermission function:
it is necessary to list the permissions that must be requested from the user. in a specific example, I marked with color the permissions for which the system may hang or make a request untimely asynchronously. i.e., problems could arise.
through this extension, the request (and its verification for the permission received earlier) in cases of “freezes” will be ignored and will continue to be executed according to the list.
both the full and abbreviated form of the permission record is allowed.
this block also provides permission processing for working with files, which will work in accordance with the sdk
the final event after RequestPermission function working out the list of permissions:
an event that is triggered after processing a request for a list of permissions. in fact, this is the continuation of the execution of your application after checking all the permissions list.
these events are for processing user responses. I remind you that they are triggered only after the user responds to the permission request. and they won’t work without a request.
auxiliary unit:
with this block, we can find out all the permissions specified in the application manifest in the form of a list. if desired, we can apply it in the RequestPermission function
auxiliary functions:
get approved permissions and check the specific permission
auxiliary events:
events for the RequestPermission function in which we get a list of permissions that had to be skipped (were not acceptable by the system or the system did not give an answer.
events for the RequestPermission function.In this event, you can see the logging of the permission request processing. I made it to sometimes understand the process of getting a specific permission during the editing process.
the waiting time for receiving a response from the system to the requested permission. in case the system is not responding. the change is available both in the code and in the editor. default =500ms. you probably don’t need to put any more.
download:
PermissionTool.aix (11.7 KB)