android-6.0-marshmallow

Is it possible to check if another app has been granted a permission on Android 6.0+?

醉酒当歌 提交于 2019-12-12 20:14:29
问题 I want to check if another app has been granted a "dangerous" or "system" level permission. I have tried loading another app's context and calling packageContext.checkCallingPermission(permission). However, the documentation says it returns PERMISSION_GRANTED if the calling pid/uid is allowed that permission, or PERMISSION_DENIED if it is not. Is it possible to check if another app has been granted a permission? Here is my attempt (I wrote it before realizing it checks the calling pid/uid and

Android Emulator doesn't start for emulating devices with Android API less than 23

≡放荡痞女 提交于 2019-12-12 19:05:15
问题 I'm experiencing a problem with the Android Emulator: when I try to run an emulated device with an Android API version 22 or lower (Lollipop or older), the Emulator doesn't show up and on Android Studio the message "waiting target device to come online" stands still. I had the same problem previously with all the devices emulated, but from when I switched the graphics rendering to "software" instead of "automatic", the problem doesn't show up on the emulated devices with Android API 23 or

Android permissions - Manifest or android.manifest

不问归期 提交于 2019-12-12 18:19:19
问题 I begin development with Android. I use SDK 23 with Android M permissions's system. On internet'examples, when I want to checkPermission, I found : this.checkSelfPermission(Manifest.permission.READ_CONTACTS) But It doesn't work for me. I need to write : this.checkSelfPermission(android.manifest.permission.READ_CONTACTS) I would like to know the difference and why it doesn't work. If it could help, this is my Manifest file (only permissions): <uses-permission android:name="android.permission

Where is the App permission for “identity” in android marshmallow

戏子无情 提交于 2019-12-12 14:15:32
问题 I am trying to use an emulator with which comes with Android Studio, to see what permissions a user can enable / disable from this device. While a developer can declare he needs access to "Identity" or contact card, it seems that in the emulator, there is no option to display the apps that have disabled access to "identity". Does this mean that there is no option for a user to refuse access to identity ? Or is it just that it does not appear in the emulator unless you create an app that

How to repeat alarm in android 6.0

你。 提交于 2019-12-12 13:23:57
问题 I am using the setExactAndAllowWhileIdle() to set the alarm. But it works for only one time. How will I set the repeating alarm with interval 1 day? Before the API Level 23 setInexactRepeating method working fine. 回答1: Recharge your alarm when you broadcast receiver event is executing. I mean, public class CustomBroadcast extends WakefulBroadcastReceiver { public static final String somekey = "somekey.somekey.somekey"; @Override public void onReceive(Context ctx, Intent intent) { // TODO Auto

Android 6.0 Native tgkill Crash

我只是一个虾纸丫 提交于 2019-12-12 12:22:51
问题 I'm having this native crash from today. It has been reported on only Android 6.0. with the stacktrace: native: pc 0000000000049c34 /system/lib/libc.so (tgkill+12) native: pc 00000000000474cd /system/lib/libc.so (pthread_kill+36) native: pc 000000000001bbe3 /system/lib/libc.so (raise+10) native: pc 000000000001848d /system/lib/libc.so (__libc_android_abort+36) native: pc 00000000000164ec /system/lib/libc.so (abort+4) native: pc 0000000000331875 /system/lib/libart.so (_ZN3art7Runtime5AbortEv

Cordova App 'Android permission Cordova plugin' is not showing permission dialog

人走茶凉 提交于 2019-12-12 12:05:11
问题 i am attending to use 'imagepicker' plugin for my cordova app to get images from the mobile gallery and use them . i am testing my app on android 6.0 device and this is the problem, marshmallow Android 6.0 require in run-time permission not like the older versions "it is working on older versions" ,but on api 23 or higher when it attend to open gallery it close immediately and the app crashes . when i searched i found that i need permission to do it . so i started to use "Android permission

DatePickerDialog header background color

给你一囗甜甜゛ 提交于 2019-12-12 11:19:37
问题 I've setup a style for a DatePickerDialog background, and it shows up differently on Nexus 5 (Marshmallow): The style I'm using is: <style name="datepicker"> <item name="android:background">@color/android:white</item> <item name="android:textColorPrimaryInverse">@color/android:black</item> <item name="android:textColorPrimary">@color/android:black</item> <item name="android:textColorSecondary">@color/colorAccent</item> <item name="android:textColorSecondaryInverse">@color/colorAccent</item>

Which permission do we need at runtime in android 6.0

帅比萌擦擦* 提交于 2019-12-12 09:44:54
问题 I have an android code which can work well on Android 5.0 version. My AndroidManifest.xml is <uses-permission android:name="android.permission.BLUETOOTH" /> <uses-permission android:name="android.permission.BROADCAST_STICKY" /> <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" /> <uses-permission android:name="android.permission.RECORD_AUDIO" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission

Samsung android 6.0 how to get dual sim call logs with sim slot id?

北城余情 提交于 2019-12-12 09:11:23
问题 Samsung(dual sim) before offical android 6.0(not cm) device, I could get call logs with sim slot id, but Samsung(dual sim) android 6.0+ device I get an issue: String slotId = cursor.getString(cursor.getColumnIndex(CallLog.Calls.PHONE_ACCOUNT_ID)); <i>slotId</i> = null; but in another device (Huawei mate 8) is work fine Did samsung modify the com.android.providers.contacts and contacts2.db? Can someone guide through the solution for this? 回答1: Update news : I find one solution boolean s