Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PermissionModelBuilder in ActivityMain? #24

Closed
digitalprecision opened this issue Oct 7, 2016 · 11 comments
Closed

PermissionModelBuilder in ActivityMain? #24

digitalprecision opened this issue Oct 7, 2016 · 11 comments

Comments

@digitalprecision
Copy link

Can you post an example of how to reference an array element from SamplePagerActivity in SampleActivity? I am trying to customize the boxes, but when I call

permissionHelper .setForceAccepting(false) .request(MULTI_PERMISSIONS);

No customizations appear. Just the default alerts.

@k0shk0sh
Copy link
Owner

k0shk0sh commented Oct 7, 2016

SimplePagerActivity extends PermissionHelper base activity which in return it handle that for you. You must extend that activity to accomplish the guide through pagination. Please follow that class and you should be good to go.

@digitalprecision
Copy link
Author

Does it match automatically based on permission name?

@k0shk0sh
Copy link
Owner

k0shk0sh commented Oct 7, 2016

if you actually wants to have it totally customized then you should check the base activity and then see how does it work and use it as you wish, however i suggest that you extend that activity as it handle all the stuff for you. please let me know what use case you trying to achieve without extending the base activity

@digitalprecision
Copy link
Author

I am trying to do something like this: https://gist.github.com/digitalprecision/dce876fb3a2d0c444e9f883b0d15bf35

@k0shk0sh
Copy link
Owner

k0shk0sh commented Oct 7, 2016

well, you shouldn't not use PermissionModelBuilder in this case as its redundant, it does not but construct a model class that is used by the BasePermissionAcitivity, if you like to request permissions by yourself then you should follow the SampleActivity without caring about Pagination, if you do case about having like some sort of education kind of UI and requesting an individual permissions separately then you should follow SimplePagerActivity

@k0shk0sh
Copy link
Owner

k0shk0sh commented Oct 7, 2016

well, im kinda sorry if my comment does not make sense as im using phone to reply you.

@digitalprecision
Copy link
Author

Np, I appreciate you responding. It sort of makes sense. If I got the SampleActivity route, how would I add the explanation? The alert dialog code in the SampleActivity file only passes in the permission, no explanation message. Should I just do a switch case on permission string?

@k0shk0sh
Copy link
Owner

k0shk0sh commented Oct 7, 2016

In this case permissions explanation are required when only the permission
is being declined and then you asked for the permission again, in thise you
should show the explanation, if you had like to show an explanation before
promoting for accepting the permission, maybe you better go with an
AlerDialog with an explanation message and upon clicking on a button within
the dialog, you actually ask permissionHelper to request the permission for
you.

On Oct 8, 2016 12:06 AM, "Mike Purcell" notifications@github.com wrote:

Np, I appreciate you responding. It sort of makes sense. If I got the
SampleActivity route, how would I add the explanation? The alert dialog
code in the SampleActivity file only passes in the permission, no
explanation message. Should I just do a switch case on permission string?


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#24 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AA6o_3A_Sr_pOJG-xp4smGb4GQCkPElvks5qxm3zgaJpZM4KRLie
.

@digitalprecision
Copy link
Author

Gotcha. Ok, thanks. Working on implementing the pager to add styling.

@k0shk0sh
Copy link
Owner

k0shk0sh commented Oct 7, 2016

good luck, anything please do ask back here and if im available i will try my best to help. meantime i will be closing this issue.

@k0shk0sh k0shk0sh closed this as completed Oct 7, 2016
@digitalprecision
Copy link
Author

Awesome, thanks! Appreciate the api.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants