nabinbhandari / Android-Permissions

Library for easy handling of android run-time permissions.
410 stars 84 forks source link

Check() with Application context #5

Closed Nailik closed 6 years ago

nabinbhandari commented 6 years ago

Hello there,

I checked the current code and I cannot reproduce the problem.

Please post a minimal code to reproduce the crash so that I can have a look at it.

Nailik commented 6 years ago

Hi, when i use it like with Application context it crashes on Android 6. like: Permissions.check(application, new String[]{ Manifest.permission.WRITE_EXTERNAL_STORAGE}, "....", new Permissions.Options() .setSettingsDialogTitle("...").setRationaleDialogTitle("..."), initPermissionHandler(permissionHandler) ); where application is typeof android.app.Application.

nabinbhandari commented 6 years ago

I am still unable to reproduce the crash. Please post the stacktrace too.

Nailik commented 6 years ago

Caused by: android.util.AndroidRuntimeException: Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want? at com.nabinbhandari.android.permissions.Permissions.check(Permissions.java:118) on Android 6.0 devices

nabinbhandari commented 6 years ago

Hello, I am extremely sorry for the late response.

While I appreciate your efforts, I still am unable to reproduce the crashes. Please provide me with a minimal code that leads to these crashes.