Skip to content

Instantly share code, notes, and snippets.

@talosdev
Created May 29, 2018 08:35
Show Gist options
  • Select an option

  • Save talosdev/20118194db4c555d4c4583041402389e to your computer and use it in GitHub Desktop.

Select an option

Save talosdev/20118194db4c555d4c4583041402389e to your computer and use it in GitHub Desktop.
@Override
public Single<PermissionRequestResult> requestPermission() {
subject = AsyncSubject.create();
if (activityWeakReference.get() != null) {
ActivityCompat.requestPermissions(
activityWeakReference.get(),
new String[] {permission},
requestCode);
}
return subject.firstOrError();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment