Home:ALL Converter>below 23 android xiaomi devices permission

below 23 android xiaomi devices permission

Ask Time:2016-09-23T15:13:45         Author:Rumour

Json Formatter

So I have camera permission in manifest , Still when app goes to start camera it crashes .this happens beacuse user had denied the permission in permission manager for camera that comes with xiaomi devices

So the app Crashes , can someone help about how to handle this.

with the normal way of getting permisions , it does not give correct result

String permission = "android.permission.CAMERA"; int res = getContext().checkCallingOrSelfPermission(permission);

res is always 0(has Permission) for below 23 devices , if user has manually denied permission by going to permission manager then also

Author:Rumour,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/39654809/below-23-android-xiaomi-devices-permission
yy