tbruyelle / RxPermissions

Android runtime permissions powered by RxJava2
Apache License 2.0
10.48k stars 1.31k forks source link

Why did the app return false when it was installed for the first time, and no permission was applied #330

Open snowf07 opened 4 years ago

snowf07 commented 4 years ago
    RxPermissions rxPermissions=new RxPermissions(this);

    rxPermissions.shouldShowRequestPermissionRationale(this,type).subscribe(new Consumer<Boolean>() {
        @Override
        public void accept(Boolean aBoolean) throws Exception {
            if(!aBoolean){
                Intent intent=new Intent(PrivacyHomeActivity.this,PrivacyHomeDetailsActivity.class);
                intent.putExtra("permissionType",type);
                startActivity(intent);
            }else {

            }
        }
    });