android-6.0-marshmallow

Requesting Android M permissions from Activity with noHistory=“true” and/or showOnLockScreen=“true”

坚强是说给别人听的谎言 提交于 2019-12-04 22:43:32
问题 I'm working on a video calling app and I have an 'incoming call' screen which alerts the user when someone is calling them. This screen is an Activity triggered by an incoming GCM and has noHistory="true" and showOnLockScreen="true" set in the manifest so that the user can engage in calls without having to unlock their device. If the user chooses to accept the call, I launch another activity to engage in the actual call. However, before I launch the second activity I check that the necessary

Android 6 revoked permissions checked as granted

断了今生、忘了曾经 提交于 2019-12-04 21:28:14
Got a problem hat I'm not sure is a bug or not. If the user grants a permission and then subsequently revokes it, it appears that checkSelfPermission returns GRANTED on the revoked permission. e.g. it appears that after revoking permission.CAMERA: true == ActivityCompat.checkSelfPermission(context, permission.CAMERA) == PackageManager.PERMISSION_GRANTED The only way i seem to find out that camera was revoked is by an exception: 10-20 14:25:54.330: E/AndroidRuntime(13954): java.lang.SecurityException: Permission Denial: starting Intent { act=android.media.action.IMAGE_CAPTURE flg=0x3 cmp=com

DragEventListener not working on Samsung S7 (6.0)

╄→гoц情女王★ 提交于 2019-12-04 20:15:36
I'm looking for a direction to go with this one. I have a card melding game ( Five Kings ) which has been up for about 6 months; my latest version 0.9.22 has been stable since March. However, recently I have been getting reports of users unable to drag discards to the discard pile, and the common thread seems to be Samsung S7 with Android 6.0 . When you drag a card from your hand, the places you can drag turn transparent and when you drag over them they go back to normal (alpha=1). Other places you can drag seem to be working ok, but the discard pile doesn't go dim or bright, which makes me

Android 6.0 Write to external SD Card

五迷三道 提交于 2019-12-04 19:16:57
I tried everything to write on external SD card on Android 6.0, but I am not able to write on it. I did research on stackoverflow and found lot of things but none works. Here is my code String extPath = System.getenv("SECONDARY_STORAGE") + "/Android/data/com.gvm.externalstorage.externalstoragetest/"; File file = new File(extPath,"myFiles"); if (!file.exists()) { boolean dirResult = file.mkdirs(); Log.e("Directory Exist", dirResult + " Directory created"); } else { Log.e("Directory Exist", "Exist"); Log.e("Direcotry Path",file.getAbsolutePath()); } //String displayname = fileName.replace("%20",

location.getSpeed() not coming for Marshmallow, using Fused Location API

回眸只為那壹抹淺笑 提交于 2019-12-04 19:16:47
I'm using Fused Location API in my app ( getLatitude() , getLongitude() , getSpeed() , getElevation() , and distanceTo() ). It was working fine until I updated my phone (Moto X2 2014) to Marshmallow. Now I don't receive speed in the location object in my app, rest methods are responding normally. However, if I run navigation on google maps in the background, I seem to receive speed inside my app as well. Also, my app seems to work without any issues on Nexus 5X (Marshmallow) and other below API 23 phones. What could be the problem? Has anyone faced something similar before? On devices running

Android 6 EditText.setError not working correctly

只谈情不闲聊 提交于 2019-12-04 17:40:26
问题 I have upgraded to android 6 and seeing some strange things when trying to set validation for some editTexts. I am using android-saripaar for validation: @Email(messageResId = R.string.error_email) private EditText email; @Password(min = 6, scheme = Password.Scheme.ALPHA_NUMERIC_MIXED_CASE_SYMBOLS) private EditText password; @ConfirmPassword private EditText repassword; @NotEmpty(messageResId = R.string.error_name) private EditText firstname; @NotEmpty(messageResId = R.string.error_name)

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

蓝咒 提交于 2019-12-04 17:24:51
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? Update news : I find one solution boolean s_bSamsung; if (Build.VERSION_CODES.M <= Build.VERSION.SDK_INT && s_bSamsung){ uri = Uri.parse("content://logs/call"

Unplugging the device via ADB: “can't find service”

早过忘川 提交于 2019-12-04 16:43:22
I have to test how my app behaves in doze mode. According to the documentation , I first must make the device think it's unplugged by entering the following command in the terminal: $ adb shell dumpsys battery unplug However, nothing happens and it logs: Can't find service: battery What should I do? There is no battery service as the log points out (this may be device specific). Enter the following command to find existing battery related services: $ adb shell service list | grep battery it will result in something like this $ adb shell service list | grep battery 88 batterymanager: [android

Marshmallow FINE and COARSE location permission

佐手、 提交于 2019-12-04 16:11:05
问题 I'm trying to access ACCESS_FINE_LOCATION and if it cannot be found access ACCESS_COARSE_LOCATION . So I request for those 2 permission, but they give me the same dialog asking for location permission. I know those are both in the same group but Google says: Note: Your app still needs to explicitly request every permission it needs, even if the user has already granted another permission in the same group. In addition, the grouping of permissions into groups may change in future Android

Cordova camera plugin permission denial in android 6.0

五迷三道 提交于 2019-12-04 16:07:23
I am using ionic to develop a mobile application. The application requires camera. I added Cordova camera plugin to my project. Also I am using ngCordova wrapper. The application was working fine. Last day I used one device with android version 6.0 (Marshmallow) to test my app. when I click on the button it directly triggers the error. I done USB debugging, I got the error that Camera Error "Permission Denial: starting Intent { act=android.media.action.IMAGE_CAPTURE flg=0x3 cmp=com.google.android.GoogleCamera/com.android.camera.CaptureActivity clip={text/uri-list U:file:///storage/emulated/0