android-6.0-marshmallow

What is system API for stoping Doze for an App on Android Marshmallow

别来无恙 提交于 2019-12-10 18:21:00
问题 I am looking for android system API implementation for avoiding Doze for particular application. Rather requesting user to confirm adding in whitelisted app for doze. 来源: https://stackoverflow.com/questions/39873417/what-is-system-api-for-stoping-doze-for-an-app-on-android-marshmallow

Android: Check whether runtime permissions must be asked or not

為{幸葍}努か 提交于 2019-12-10 18:14:22
问题 I would like to check whether a particular app need to handle Android Marshmallow runtime permissions in runtime or not. Is it the following assumption correct? /** * Checks whether runtime permissions must be handled or not. * * @param context Application context. * @return Handle runtime permissions or not. */ public static boolean shouldCheckRuntimePermissions(Context context) { return isApplicationWithMarshmallowTargetSdkVersion(context) && Build.VERSION.SDK_INT >= Build.VERSION_CODES.M;

Can't load vlcjni library on Android 6.0

柔情痞子 提交于 2019-12-10 17:57:25
问题 I build a player based VLC,and when I want to build a verson for Android 6.0,player can't start on Android 6.0 device.Here are the log: Can't load vlcjni library:java.lang.UnsatisfiedLinkError:dlopen failed:/data/app/lib/arm/libvlcjni.so: has text relocations. And I have tried so many ways to solve it,but I haven't solve it yet. I hope anyone can tell me about the problem. 回答1: Here is similar question and answers: libavcodec.so: has text relocations Today, I got the same error messages when

Shared Libraries in Developer M Preview

人盡茶涼 提交于 2019-12-10 17:32:48
问题 I am trying to test out my application on the Android M dev preview. My application is using a Shared library, which I have placed in jni/libs/armeabi inside of Android Studio. I believe when it calls System.loadLibrary("myLib") it is throwing the following UnsatisfiedLinkError. Is anyone else having this issue? Android 5.x has no problem with this. 06-02 08:24:28.004 16505-16505/com.me.workflow E/AndroidRuntime﹕ FATAL EXCEPTION: main Process: com.me.workflow, PID: 16505 java.lang

Android Marshmallow: How to avoid Wi-Fi drop if No Internet access

纵饮孤独 提交于 2019-12-10 16:43:33
问题 I have a Nexus 5x running MarshMallow 6.0 that is associated to the Wi-Fi of a device that has no Internet access. Android keeps dropping the connection and won't even automatically reconnect after a few tries because it detects that there is no Internet access. How can I force Android to keep the connection with this Wi-Fi even if there is no Internet access? The device is not rooted, but I can change "things" programmatically in the application that actually picks up this Wi-Fi spot. Edit

FingerprintManager.isHardwareDetected() throwing java.lang.SecurityException?

冷暖自知 提交于 2019-12-10 16:19:59
问题 I have an App that offers the usage of fingerprints for authentication. Before asking if the user wants to enable it, I verify if it is available at all and it is done via: FingerprintManager fingerprintManager = context.getSystemService(FingerprintManager.class); return fingerprintManager.isHardwareDetected() && fingerprintManager.hasEnrolledFingerprints(); Both FingerprintManager 's methods are annotated with: @RequiresPermission(USE_FINGERPRINT) But, the USE_FINGERPRINT permission is a

Android Studio not showing dangerous permissions warnings

ぐ巨炮叔叔 提交于 2019-12-10 15:59:50
问题 I have an Android Studio project and I'm trying to update it to Android 23. I changed the target to 23 in build.gradle and I was expecting Android Studio or lint to show warnings in the code blocks that need to use dangerous permissions. But neither Android Studio or Lint are showing the warnings. Does anybody know what could be the reason of this problem? I'm using Android Studio 1.4.1. Thanks in advance. 来源: https://stackoverflow.com/questions/33611120/android-studio-not-showing-dangerous

How to ask permission (RunTime) again if the user deny for the first time

时间秒杀一切 提交于 2019-12-10 15:40:17
问题 I want to re ask the permission to the user in the situation if he/she deny for the first time. I have set the permission but my app runs even if I press deny option. I have a code which should do the things which I want to do but I get Cant resolve symbol Snackbar when I hit Alt+Enter it created another activity and remaining -make and -permision_available_camera gets red error. @Override public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[]

Android Marshmallow: permissions change for running app

人盡茶涼 提交于 2019-12-10 14:48:44
问题 I know, with Android Marshmallow, we have to ask permissions every time we need a functionality that require a permission. I do this for new App, but for old BIG App is more complicated. For old BIG App, I ask all permissions in "MainActivity". So, my app is started and shows a Map Fragment. I ask for Location Permission with no problem. The user agrees. The user puts it in background, goes in the App Settings and denies permission. Then he puts the App in foreground: App crashes!! I know,

All the permissions of my app are revoked after pressing “Reset app preferences”

时间秒杀一切 提交于 2019-12-10 14:42:28
问题 I develop an app and support Android 6.0. When I reset app preferences in Settings -> Apps -> Reset app preferences, all permissions of my app are revoked and the app is not restarted. Failure to restart the app after revoking its permissions can cause many unexpected crashes. How should I handle this case? The app is restarted when I revoke its permissions manually (Settings -> Apps -> My app -> Permissions). 回答1: I can reproduce the problem. I have filed an issue in regards to it. How