android-6.0-marshmallow

Can I override default push notification icon in android from app icon to custom icon?

寵の児 提交于 2019-12-12 07:44:37
问题 Can I override default push notification icon in android from app icon to custom icon? I am using default firebase implementation to display notification in system tray, when a push notification come. Since my app icon is coloured and has gradient, so when a notification comes, android tried to make a black/white version of it, and make it look like a white circle. Is there a way to update the default notification icon to something else instead of default app icon? PS: Looking forward for a

How get location by COARSE location

旧巷老猫 提交于 2019-12-12 05:27:58
问题 I'm trying to develo an app that get location by COARSE location. This app must run on Android 6 too than i've implemented permission request on run time, start the map but i can't get my current location... any tips? This is my main activity: package com.luca.fontanelle; import com.google.android.gms.appindexing.AppIndex; import com.google.android.gms.location.LocationListener; import android.Manifest; import android.content.Intent; import android.content.IntentSender; import android.content

Android marshmallow request permission?

耗尽温柔 提交于 2019-12-12 05:24:39
问题 I am currently working on an application that requires several "dangerous" permissions. So I tried adding "ask for permission" as required in Android Marshmallow(API Level 23), but couldn't find how to do it. How can I ask for permission using new permission model in my app? 回答1: Open a Dialog using the code below: ActivityCompat.requestPermissions(MainActivity.this, new String[]{Manifest.permission.READ_EXTERNAL_STORAGE}, 1); Get the Activity result as below: @Override public void

Android Navigation drawer UI different displayed in Below SDK 22

余生颓废 提交于 2019-12-12 04:30:22
问题 Navigation drawer working pretty in above SDK 23 and same app execute on below SDK 22 its Title not appear in navigation drawer...It's showing as blank screen Actionbar title. Below is my NavigationDrwer .xml <?xml version="1.0" encoding="utf-8"?> <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/coordinateLayout" android

Marshmallow Intent.ACTION_BOOT_COMPLETED

前提是你 提交于 2019-12-12 03:28:49
问题 i have a rotted Nexus6 With Android6 . I've created a system app (located in system/app ) i wish to execute a simple code when receiving ACTION_BOOT_COMPLETED but for some reason the code does not executes.. Manifest: <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.atest"> <application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:supportsRtl="true" android:theme="

I want to send Http request in marshmallow android?

僤鯓⒐⒋嵵緔 提交于 2019-12-12 03:14:30
问题 I am beginner for android application. I develop android application and its my first application. I develop android application for all version of Android, my application based on URL request, means I have to send URL request for every action. I faced problem for marshmallow android version, because It isn't support Http Post method. I developed program successfully in JAVA to send request for login action. Same code try to implement in Android code, I faced problem. I have to send request

Get Internal and External Memory size in MarshMallow

南楼画角 提交于 2019-12-12 03:05:21
问题 I am trying to show the size of Internal and External(SD card) memory in my application.My code is working fine for kitkat and below api versions but My app is crashing in Marshmallow or lollipop .Here is my code ... public static long getAvailableInternalMemorySize() { File path = Environment.getDataDirectory(); StatFs stat = new StatFs(path.getPath()); long blockSize = stat.getBlockSize(); long availableBlocks = stat.getAvailableBlocks(); return availableBlocks * blockSize; } public static

How to Crop the image in android marshmallow by using default crop intent?

为君一笑 提交于 2019-12-12 00:54:54
问题 In my application requirement is select the image from gallery and then crop the selected image and set to the imageview. Below is my sample code for cropping the image. //call the standard crop action intent (the user device may not support it) Intent cropIntent = new Intent("com.android.camera.action.CROP"); cropIntent.setClassName("com.android.camera", "com.android.camera.CropImage"); //indicate image type and Uri cropIntent.setDataAndType(mImageCaptureUri, "image/*"); //set crop

App crashes on Android 6.0 launch, Logcat included, new developer

假装没事ソ 提交于 2019-12-11 23:17:40
问题 So I have very little experience with Java but I can learn it quickly. When launching the app in Marshmallow 6.0 . It suddenly crashes. I can get this from logcat in the Android Studio SKIP THE STRIKED TEXT AS ITS BEEN CORRECTED E/AndroidRuntime: FATAL EXCEPTION: main E/AndroidRuntime: Process: nezibo.com.dreamception, PID: 1863 E/AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{nezibo.com.dreamception/nezibo.com.dreamception.activity.MainActivity}: java.lang

android app crashes after permission disabling on API 23

邮差的信 提交于 2019-12-11 17:21:36
问题 My app uses permissions in app i'm asking runtime permission and it works fine BUT when doing this steps 1) using device home button going to current app settings page 2) switching off permission 3)then going back to app again with home button it crashes without any exception for exmaple INSTAGRAM app 1) open instagram 2) goto settings page 3) switch permission 4)return to app it restarts, i want to do something like that 回答1: To use CAMERA you have to check the permission at runtime. All the