HefnySco / andruav_android_app

14 stars 7 forks source link

CheckAppPermissions.checkPermissionAndRequest #17

Closed Jai-GAY closed 1 year ago

Jai-GAY commented 1 year ago

Is there contains a logic error for this logic check?

https://github.com/HefnySco/andruav_android_app/blob/3c968ae342686c4d646d9dd9c9278edcc3bdfe7e/app/src/main/java/ap/andruav_ap/helpers/CheckAppPermissions.java#L54

when PackageManager.PERMISSION_GRANTED it will return true yet it goes into the if statement to request for permission. https://github.com/HefnySco/andruav_android_app/blob/3c968ae342686c4d646d9dd9c9278edcc3bdfe7e/app/src/main/java/ap/andruav_ap/helpers/CheckAppPermissions.java#L46

So, the check should be this way, right, missing !? if ( ! checkPermission(activity,permission))

Note: If your app targets Build.VERSION_CODES.R or higher, WRITE_EXTERNAL_STORAGE permission has no effect.

Jai-GAY commented 1 year ago

Suggestions and modifications are done.

HefnySco commented 5 months ago

@Jai-GAY please email me on mohammad.hefny@gmail.com I need your help in Andruav. O am targeting to add SMS and I need your support to update permission proberly. The idea is to use SMS to report location in case of emergency and to use SMS to activate RTL in case of signal loss.