ListPermission: with this extension it is possible to make a whitelist at once

1.Introduction

Extension Name: listPermission
With this extension it is possible to make a whitelist at once. It also verify the permissions granted in a practical way.

Latest Version: 2.1
Released:2020-05-21T07:03:00Z
Last Updated:2020-05-25T13:54:00Z

2.Blocks

Methods/Functions

component_method (5)
component_method (6)
component_method (1)
component_method (7)

Events

component_event (4)

component_event (5)

3.Documentation

Methods

  • Request Permissions
    In a list of permissions, a window will open for the user, whether or not to allow permissions that have not been granted.
    component_method (5)
    listPermissions ~ list
  • Check Multiple Permissions
    Parses a whitelist and returns an event (ResultCheckMultiplePermission) with a denied and allowed whitelist.
    component_method (6)
    listPermissions ~ list
  • Check Garanted All
    When Verifying that all the permissions mentioned in the list have been allowed.
    component_method (1)
    listPermissions ~ list
    Returns : boolean
  • Check Single Permission
    Checks whether the mentioned permission has been granted.
    component_method (7)
    listPermissions ~ list
    Returns : boolean

Events

  • Result Check Multiple Permissions
    CheckMultiplePermission result.‘isDoneCounting’
    component_event (4)
    listPermissionsGrated~ list
    listPermissionsDanied~ list
  • Result Permission Request
    RequestListPermission result.
    component_event (5)
    listPermissionsGrated~ list
    listPermissionsDanied~ list
    grantedAll~ boolean (new)

4.Screenshot

5.Downloads

Aix file

Download Link1: com.jdl.Permission.aix (12,2,KB)

Aia file

Download Link1: ListPermission.aia (36,3,KB)

6.Open Source

7.Credits

Thanks @vknow360, I ended up inspiring the extension in your post. This extension, together with CustomWebView, will bring something impressive.

Thank you very much Kodular, for being part of my life :heart:

8. References

32 Likes

Nice work. I see you didn’t put a license on your page at GitHub, maybe add one.

8 Likes

Is something different or additional to my approach (without an extension)?

See also here: How to grant multiple permissions at Screen.Initialize / Do NOT use "Package Utilities" (until fixed)

3 Likes

The approach is practically the same, but what differentiates it is the ability to list permissions at once, instead of call by call.


In the future, when I resolve the issue with the OnRequestPermission block, it will look like this:

For now, I’m using the stopwatch to check that all permissions have been allowed, but when the OnRequestPermission block issue is resolved, it will be much simpler and more practical. As shown above.

3 Likes

Yes, by using a clock, no problem with my approach.

As a rule, an extension should do something that either doesn’t exist yet or something that can be simplified a lot. Look at your blocks:

Anyway, thank you for this extension and that you provided the java code!

This number of blocks is precisely due to the problem mentioned. With the form you mentioned, there is no way to list it (check out the video). With multiple permissions the performance drops a little, because you are opening and closing the dialog.

1 Like

Ok, what do you mean with:

What is the result of this list and at what time?

The list I’m talking about is a sequence of permissions in the same dialog. When the sequence is finished, the OnRequestPermission block will be called with the list of permissions granted and another with the permissions denied.

image

2 Likes

Good work.

1 Like

As you said that is not a list, but a dialog.
Since you initially created a list of the required permissions

and then queried them one after the other and displayed how many of them are granted or denied. The same can definitely be done with my approach, I don’t need to show it.

Obviously, I’m not criticizing your approach, I’m just showing you another way to execute a whitelist in the same dialog. Looking at the video I uploaded, you’ll see a list of permissions in the same dialog, all in a single request.

1 Like

No, I don’t see a list, just the item in a dialog box during a particular request.

@jarlissonlira2 means in the dialog you can see this

So the number of permissions that have to be accepted to make the app work. I like the idea of that.

4 Likes

Thank you very much​:smiley:
I waited a long time for such an extension

1 Like

Yes, I understand that. However, it is not a list, just a kind of notification that iteratively counts the granted or denied permissions from a list. Namely from a previously defined list of 3 items (the required permissions, i.e. a list of length 3). The same should be possible using notifier.

But of course, it’s more elegant this way.

2 Likes

The same seems to be also possible with this event (currently functioning event):
ListPermission2.aia (34.0 KB)

However, have you found the reason why this doesn’t work?

2 Likes

Nice! i’ve been wanting this for a long time :100:

1 Like

Very good!!! Yes, I found it, I will publish the new version.

2 Likes

Then please tell us / me where the problem was. Maybe I’ll learn something to improve my sparse knowledge of Java.

My knowledge in java is also not one of the best. The problem was that I was not getting a response from the requestPermission method in the main class and there was no way to extend the class to Activity. So, I chose to create a new class by extending the Activity to be able to call the requestPermission method and get the result in onRequestPermissionsResult.

2 Likes