android-6.0-marshmallow

Android M - custom permission dialog style

落爺英雄遲暮 提交于 2020-01-11 10:21:37
问题 While implementing the new Android M permission model I noticed that the permissions dialog does not respect the theming of my styles.xml. In my styles.xml I override the dialog and alertdialog style like this: <item name="android:dialogTheme">@style/Theme.dialog</item> <item name="android:alertDialogTheme">@style/Theme.dialog</item> Is it possible to change the theming? Or is it because this is a system dialog like in the device settings? 回答1: No, it's not possible. The permissions dialog is

Application is getting killed after enable/disable permissions from settings on Android M nexus 6

为君一笑 提交于 2020-01-11 08:31:05
问题 Application is restarting after enable/disble the permissions from Settings->apps->my app->Permissions. Adb can see Permission related app op changed... , 08-31 14:30:29.480 I/ActivityManager( 8206): Displayed com.google.android.packageinstaller/com.android.packageinstaller.permission.ui.ManagePermissionsActivity: +392ms 08-31 14:30:29.496 D/OpenGLRenderer(15990): endAllStagingAnimators on 0x9a60bd80 (ListView) with handle 0x97d4c1f0 08-31 14:30:30.477 D/audio_hw_primary( 7972): out_set

Android M Camera Intent + permission bug?

此生再无相见时 提交于 2020-01-08 13:56:13
问题 I'm trying to get my app ready for the new Android M permissions changes and found some weird behaviour. My app uses the Camera intent mechanism to allow the user to get a picture form the camera. But in another activity needs to make use of the camera itself with Camera permission (because of a library dependency card.io that requires this). However with M in the activity that only needs a camera intent when I try to launch the Camera intent I see the following crash (this does not happen if

Android M Camera Intent + permission bug?

我怕爱的太早我们不能终老 提交于 2020-01-08 13:56:03
问题 I'm trying to get my app ready for the new Android M permissions changes and found some weird behaviour. My app uses the Camera intent mechanism to allow the user to get a picture form the camera. But in another activity needs to make use of the camera itself with Camera permission (because of a library dependency card.io that requires this). However with M in the activity that only needs a camera intent when I try to launch the Camera intent I see the following crash (this does not happen if

HttpPost giving error in API 23 android

回眸只為那壹抹淺笑 提交于 2020-01-07 09:48:08
问题 I have a method in my android app which uses HttpPost class. It was working fine with targeted sdk 4.4.2 but i've made some changes and made the targeted sdk to 23(6.0). Now HttpPost class is giving error. I've also read about HttpUrlConnection but don't know how to use it. Here is my code private String getJSON(String URL, JSONObject obj) throws JSONException { String responseString = null; try { HttpPost httppost = new HttpPost(URL); StringEntity se = new StringEntity(obj.toString(), HTTP

How to determine/get correct S Voice packet in Android

陌路散爱 提交于 2020-01-05 04:03:07
问题 I am using Android to turn on my S Voice application in Android. As previous work, I will use the follows code to turn on it String SVOICE_PACKAGE_NAME = "com.vlingo.midas"; String SVOICE_LISTEN_ACTION = "com.sec.action.SVOICE"; Intent intent = new Intent(); intent.setPackage(SVOICE_PACKAGE_NAME); intent.setAction(SVOICE_LISTEN_ACTION); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP); try { getApplication().startActivity(intent); } catch (final

Can a service request for permission in Android M?

亡梦爱人 提交于 2020-01-04 01:59:08
问题 I figured that in M requestPermissions() can only be called by an Activity class. I have an app that has no UI screen. It runs as a background service. Does this mean that I have to put a spinner screen if checkSelfPermissions returns denied? 回答1: I have an app that has no UI screen. Then it will never run, unless it is preinstalled on an Android device or custom ROM, or it is a plugin to some other app. Otherwise, your app will remain in the stopped state forever. Pretty much every app

How to update android emulator to 6.0.1

烈酒焚心 提交于 2020-01-03 10:33:03
问题 I am getting error 'E/Surface: getSlotFromBufferLocked: unknown buffer: 0xab7cffe0'. Upon research, I got understood that it is known issue in android 6.0. How to update android emulator from 6.0 to 6.0.1? In SDK manager I can see Android 7.0 and android 6.0 are installed ,but 6.0.1 is not there. How should I update 6.0 to 6.0.1? Also in AVD manager I cannot see any system image other that 6.0. I have installed other versions also, then how to select those versions of android for my AVD? Also

How to update android emulator to 6.0.1

江枫思渺然 提交于 2020-01-03 10:31:44
问题 I am getting error 'E/Surface: getSlotFromBufferLocked: unknown buffer: 0xab7cffe0'. Upon research, I got understood that it is known issue in android 6.0. How to update android emulator from 6.0 to 6.0.1? In SDK manager I can see Android 7.0 and android 6.0 are installed ,but 6.0.1 is not there. How should I update 6.0 to 6.0.1? Also in AVD manager I cannot see any system image other that 6.0. I have installed other versions also, then how to select those versions of android for my AVD? Also

SMS does not send in Marshmallow

爷,独闯天下 提交于 2020-01-03 06:37:31
问题 I am trying to open System default Messaging activity when clicking on a button. Here is my code: smsUri = Uri.parse("tel:" + teacherPhone2); Intent intent = new Intent(Intent.ACTION_VIEW, smsUri); intent.putExtra("address", teacherPhone); intent.setType("vnd.android-dir/mms-sms"); startActivity(intent); It works fine below MarshMallow. But in MarshMallow the app crashes when clicking that button. I have set the user-permission and also requested send sms permission. Can anyone tell me why