private void requestNotification() {
        AndPermission.with(this)
            .notification()
            .permission()
            .rationale(new NotifyRationale())
            .onGranted(new Action<Void>() {
                @Override
                public void onAction(Void data) {
                    toast(R.string.successfully);
                }
            })
            .onDenied(new Action<Void>() {
                @Override
                public void onAction(Void data) {
                    toast(R.string.failure);
                }
            })
            .start();
    }
private void requestNotification ( ) { AndPermission . with ( this ) . notification ( ) . permission ( ) . rationale ( new NotifyRationale ( ) ) . onGranted ( new Action < Void > ( ) { @ Override public void onAction ( Void data ) { toast ( R . string . successfully ) ; } } ) . onDenied ( new Action < Void > ( ) { @ Override public void onAction ( Void data ) { toast ( R . string . failure ) ; } } ) . start ( ) ; }
Request notification permission.