android-6.0-marshmallow

AOSP Marshmallow modify/set default permission

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-08 05:13:57
问题 I have built my own AOSP Marshmallow on my Nexus 5 device and got trouble with the permissions. If I add a new permission into the AndroidManifest.xml of an existing application, this permission will be by default turned off. I have to manually set it. The other permission for example Contacts is being active (the once I did not modify and seems to be standard even after factory reset). So there has to be a file which gives conclusion about the standard permission of the applications. I just

Getting Error while requesting READ_CONTACTS permission Android M

淺唱寂寞╮ 提交于 2019-12-08 04:34:06
问题 i am trying to get READ_CONTACTS permission Android M and on calling: ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.READ_CONTACTS}, 1); app crash with following exception: 05-12 17:08:24.578: E/AndroidRuntime(2846): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.android.packageinstaller/com.android.packageinstaller.permission.ui.GrantPermissionsActivity}: java.lang.NullPointerException: Attempt to get length of null array 05-12 17:08:24.578:

How to set multiple colors to a floating Edittext's hint?

我是研究僧i 提交于 2019-12-08 02:27:44
问题 Is there a way to set multiple colors to the edittext's hint when wrapped by android.support.design.widget.TextInputLayout without compromising the behaviour of floating edittexts? AFAIK The only way to set multiple colors to the edittext hint is by using SpannableStringBuilder. But when the editext is wrapped by TextInputLayout and the hint set programmatically using a SpannableStringBuilder, it behaves like a normal editext which does not float (the labels aren't floating) Whereas if the

Android Marshmallow : java.lang.RuntimeException: Fail to connect to camera service

六眼飞鱼酱① 提交于 2019-12-07 18:05:27
I am using https://github.com/dlazaro66/QRCodeReaderView (QR code scanner ) in my android application My mainfest permission looks like this : <uses-permission android:name="android.permission.CAMERA" /> <uses-feature android:name="android.hardware.camera" /> <uses-feature android:name="android.hardware.camera.autofocus"/> and in Gradle I have the following code : compileSdkVersion 23 buildToolsVersion "23.0.2" defaultConfig { applicationId "com.gurkhatech.schoolmanagement" minSdkVersion 15 targetSdkVersion 23 versionCode 1 versionName "1.0" } I have implemented the code in Java as : @Override

Android firebase app invites SecurityException not allowed to perform SYSTEM_ALERT_WINDOW

ε祈祈猫儿з 提交于 2019-12-07 17:27:58
问题 I have successfully implemented the Android firebase app invites functionality using this link and it is working fine for most of the devices. But on marshmallow device (6.0.1) when I click on the sms contact, the system crashes with message "Unfortunately Google Play Services has Stopped.". In log I get the following error: 11-08 15:09:29.854 1364-1364/? E/AndroidRuntime: FATAL EXCEPTION: main Process: com.google.android.gms.ui, PID: 1364 java.lang.SecurityException: com.google.android.gms

How to add Multiple permissions in the permissions Request [duplicate]

你。 提交于 2019-12-07 07:18:27
This question already has answers here : Android 6.0 multiple permissions (22 answers) Closed last year . I would like to know how to add multiple permissions on a single request. This is regarding the Marshmallow version of android. You need to create an arraylist of permission required List<String> permissionsNeeded = new ArrayList<String>(); final List<String> permissionsList = new ArrayList<String>(); if (!addPermission(permissionsList, Manifest.permission.READ_PHONE_STATE)) permissionsNeeded.add("android.permission.READ_PHONE_STATE"); if (!addPermission(permissionsList, Manifest

AlarmManager can't work on android 6.0

ⅰ亾dé卋堺 提交于 2019-12-07 06:16:58
问题 I am working with AlarmManager, It is not working on android os 6.0. This is my code: private void startAlarmManager(String id) { userID = GlobalValue.getUserName(GuideNavigationActivity.this); Context context = getBaseContext(); alarmManager = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE); gpsTrackerIntent = new Intent(context, GpsTrackerAlarmReceiver.class); gpsTrackerIntent.putExtra("id", id); gpsTrackerIntent.putExtra("userID", userID); gpsTrackerIntent.putExtra("idCourse

How come a GCM permission isn't granted on Android 6?

风格不统一 提交于 2019-12-07 05:08:15
问题 Background I'm trying to investigate what an app at the office needs to change about its permissions, in order to support Android 6 nicely. The problem I've found which permission needs confirmation and which isn't, except for one : <uses-permission android:name=".permission.C2D_MESSAGE"/> It seems that this permission isn't mentioned anywhere that I look for, as one that's not granted automatically and yet I can't find where the user can enable it as a confirmation. What I tried In order to

How to create wifi tethering Hotspot in Android Marshmallow?

旧城冷巷雨未停 提交于 2019-12-07 04:59:07
问题 I've tried to create a Wi-Fi tethering hotspot in Android Marshmallow using the following code. public class WifiAccessManager { private static final String SSID = "1234567890abcdef"; public static boolean setWifiApState(Context context, boolean enabled) { //config = Preconditions.checkNotNull(config); try { WifiManager mWifiManager = (WifiManager) context.getSystemService(Context.WIFI_SERVICE); if (enabled) { mWifiManager.setWifiEnabled(false); } WifiConfiguration conf =

Request permission on Android M only when targeting lower API

淺唱寂寞╮ 提交于 2019-12-07 04:10:31
问题 So in my app i would like to add an option to selectively add a permission (say, direct dial) when the user is on Android M but, at the same time, i would like to have that permission NOT showing as required in API 22 or lower simply because its not essential so i prefer not asking for it during install (so de facto making that feature available on M only). So, i understand the new model of M is that it will allow optional permissions when user is on M and it will make those permissions