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

App doesn't check permissions #117

Open
Ccettura opened this issue Nov 21, 2020 · 0 comments
Open

App doesn't check permissions #117

Ccettura opened this issue Nov 21, 2020 · 0 comments

Comments

@Ccettura
Copy link

Ccettura commented Nov 21, 2020

Hi, i created a public method in one of my activities:

public void checkPermission(){
        PermissionListener permissionListener=new PermissionListener() {
            @Override
            public void onPermissionGranted() {
                Toast.makeText(HomeActivity.this, "Permission Granted", Toast.LENGTH_SHORT).show();
            }
            @Override
            public void onPermissionDenied(List<String> deniedPermissions) {
                Toast.makeText(HomeActivity.this, "Permission Denied", Toast.LENGTH_SHORT).show();
            }
        };

        TedPermission.with(HomeActivity.this)
                .setPermissionListener(permissionListener)
                .setDeniedTitle("Permission denied")
                .setDeniedMessage(
                        "If you reject permission,you can not use this service\n\nPlease turn on permissions at [Setting] > [Permission]")
                .setGotoSettingButtonText("Settings")
                .setPermissions(Manifest.permission_group.PHONE, Manifest.permission_group.MICROPHONE)
                .check();
    }

The problem is that if permissions are denied it doesn't ask in-app to check them, it just skip and goes to the denied message. How can I solve that?

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

No branches or pull requests

1 participant