android-6.0-marshmallow

Read browser history in Marshmallow And Nougat Android

本秂侑毒 提交于 2019-12-25 08:39:44
问题 I am trying to use Android Browser.BOOKMARKS_URI in Android Marshmallow. Until Lollipop, there is a way to read the history from the Chrome Browser using the permission. But in Marshmallow the permission is removed. Does any other alternative available for reading the browser history on a Marshmallow device? I referred This Official Android Documentation, But not get a clear idea. Thanks. 回答1: Due to security reason the browser history read/write are now not accessible by to the app. This

Android Marshmallow sound only Notification?

╄→尐↘猪︶ㄣ 提交于 2019-12-25 07:36:17
问题 In Lollipop and below, you could easily send a sound only notification by omitting the icon, content title and content text when constructing, like so: NotificationCompat.Builder builder = new NotificationCompat.Builder(getApplicationContext()); builder.setSound(Uri.parse(ringtone)); notificationManager.notify(9998, builder.build()); In Marshmallow, I'm forced to include at least an icon, or I get a 'no valid small icon' exception. I want to use the Notification system, but don't always want

Add app icon on Contact not working in Marshmallow

家住魔仙堡 提交于 2019-12-25 05:51:38
问题 I am adding icon of my app in phonebook. now the problem is that its working fine in Api level < 23 but not working on Api level > 23. in API 23 it creates new Contact with number. in Api 21 in Api 23 String MIMETYPE = "vnd.android.cursor.item/com.appiconincontact"; ArrayList<ContentProviderOperation> ops = new ArrayList<ContentProviderOperation>(); // insert account name and account type ops.add( ContentProviderOperation .newInsert(addCallerIsSyncAdapterParameter(RawContacts.CONTENT_URI,

Android RingtoneManager wont work in API 23 and above.

怎甘沉沦 提交于 2019-12-25 05:23:45
问题 I have been trying to get the system's default notification sound to play using RingtoneManager. The code works fine until API 22 but just stops working beyond that. This is how I am doing it, Uri notificationTone = RingtoneManager.getActualDefaultRingtoneUri(context, RingtoneManager.TYPE_NOTIFICATION); Ringtone r = RingtoneManager.getRingtone(context, notificationTone); r.play(); What am I missing ? Any help would be appreciated. 回答1: it's permission issue in >22, you need to request

Integrate new permission in android marshmallow

我的梦境 提交于 2019-12-25 03:38:15
问题 As we all know some changes have been made in api level 23(Android Marshmallow) in which we have to request for some permissions at run time that is on dangerous level like camera,read/write external storage etc. Is there any way to get Granular permissions from AndroidManifest file? 回答1: Android Marshmallow introduces an entirely new spin on application permissions,Users now have the ability to revoke runtime permissions whenever they desire. This means that you can’t assume the app has

permission for accessing WIFI in android 6

ε祈祈猫儿з 提交于 2019-12-24 06:44:26
问题 I am new to android studio, i was previously working on android version 5.1 for my app and it worked fine but now in 6 i am not able to get permission or i am not sure if my method is wrong. I am making an app which uses the list of access points available for my mobile. But even though i am granted permission my app does not show me the wifi list but the same code works well for earlier versions. Mainactivity: package com.wiferange.wifi_test; import android.Manifest; import android.content

permission for accessing WIFI in android 6

巧了我就是萌 提交于 2019-12-24 06:44:19
问题 I am new to android studio, i was previously working on android version 5.1 for my app and it worked fine but now in 6 i am not able to get permission or i am not sure if my method is wrong. I am making an app which uses the list of access points available for my mobile. But even though i am granted permission my app does not show me the wifi list but the same code works well for earlier versions. Mainactivity: package com.wiferange.wifi_test; import android.Manifest; import android.content

Getting permission denied on Android M

雨燕双飞 提交于 2019-12-24 05:53:12
问题 I'm getting PERMISSION_DENIED for WRITE_EXTERNAL_STORAGE that is in fact active: I'm using a library called Permiso to retrieve them: private void attemptStartImagePicker() { Permiso.getInstance().requestPermissions(new Permiso.IOnPermissionResult() { @Override public void onPermissionResult(Permiso.ResultSet resultSet) { if (!resultSet.isPermissionGranted(Manifest.permission.READ_EXTERNAL_STORAGE) || !resultSet.isPermissionGranted(Manifest.permission.WRITE_EXTERNAL_STORAGE)) {

How to get default device assistance app in android by code?

痞子三分冷 提交于 2019-12-24 05:45:19
问题 my phone installed two voice searches: google app and S-voice app. The default app is S-voice app as figure bellow. My question is that how can we get the default voice application using programmingcally in Android 6.0. Thank you in advance This is what I did private boolean isMyAppLauncherDefault(String myPackageName) { final IntentFilter filter = new IntentFilter(Intent.ACTION_MAIN); filter.addCategory(Intent.CATEGORY_HOME); List<IntentFilter> filters = new ArrayList<IntentFilter>();

Android M App Link Verification fails

橙三吉。 提交于 2019-12-24 04:07:12
问题 I define my app links as follows in AndroidManifest.xml : <intent-filter android:autoVerify="true"> <action android:name="android.intent.action.VIEW"/> <category android:name="android.intent.category.BROWSABLE"/> <category android:name="android.intent.category.DEFAULT"/> <data android:host="mysite.com" android:scheme="http"/> <data android:host="mysite.com" android:scheme="https"/> <data android:host="www.mysite.com" android:scheme="http"/> <data android:host="www.mysite.com" android:scheme=