android-8.0-oreo

Android oreo shows icon inside white round

孤街浪徒 提交于 2019-12-08 14:41:39
问题 My Android application shows launcher icon inside white circle on Android oreo version. I would like to show launcher icon as it is like square on oreo device by default. Gone through various blogs and found that : 1) Mobile user can change icon type from home screen settings screen (But that I don't want. I want to display only square by default) 2) Use application target sdk version below 26 (I want to have latest sdk version targeted and square launcher icon) I have tried : Adaptive icon

Android 8 notifications setSound not working

馋奶兔 提交于 2019-12-08 14:36:18
问题 I have the following code but everytime I just hear the default android sound. // create channel NotificationChannel channel = new NotificationChannel(ANDROID_CHANNEL_ID, ANDROID_CHANNEL_NAME, NotificationManager.IMPORTANCE_DEFAULT); // Sets whether notifications posted to this channel should display notification lights channel.enableLights(true); // Sets whether notification posted to this channel should vibrate. channel.enableVibration(true); // Sets the notification light color for

Firebase don't receive message when app is killed - Android Oreo

别来无恙 提交于 2019-12-08 13:52:22
问题 I know that it have a lot of questions about this theme, but no one works in my project, and I don't know why. I'm using Firebase, if my app is OPEN or in BACKGROUND, his receive the message, but when I kill my app don't appear more. Using Android 8.0 My codes: AndroidManifest.xml <meta-data android:name="com.google.firebase.messaging.default_notification_icon" android:resource="@drawable/default_notification_icon" /> <meta-data android:name="com.google.firebase.messaging.default_notification

java.io.FileNotFoundException: No such file or directory Error

不想你离开。 提交于 2019-12-08 13:02:01
问题 I am downloading images to smartphone. For older versions not problem my code is working but for Oreo it is not working. I tried this code in Emulator. I implemented a function to save image to external storage. private void saveImageToExternalStorage(Bitmap finalBitmap,String name) { String root = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES).toString(); File myDir = new File(root + "/xx"); myDir.mkdirs(); String fname = name + ".jpg"; File file = new File

Android O - Background service limitation not working as expected

假如想象 提交于 2019-12-08 12:04:26
问题 I was just testing my existing android application against Android O background limitations. In testing, I found a strange behavior. So basically in my application, I am using background service and I am starting it in very first activity. So now the issue is once the activity and background service gets started, I am closing my activity using the back button. So as per the service concepts, it keeps running in the background. After approx 1 min onDestroy() method gets called of background

AlarmManager does not wakeup at right time on Samsung Phone

本小妞迷上赌 提交于 2019-12-08 10:21:34
问题 On some Samsung phones we unfortunately had to find out that the AlarmManager (SamsungAlarmManager) does not work like expected. Our code is: private void scheduleNextSamplingIntent(final Context context, final int intervalInMillis) { Log.v(TAG, "scheduleNextSamplingIntent | intervalInMillis = " + intervalInMillis); if (intervalInMillis <= 0) { Log.w(TAG, "scheduleNextSamplingIntent | invalid interval " + intervalInMillis); return; } long currentTimeMillis = DeviceClock.getInstance()

How to change WifiConfigration in Oreo device

旧城冷巷雨未停 提交于 2019-12-08 08:28:24
问题 I used https://github.com/aegis1980/WifiHotSpot code to start and stop Hotspot from my application. But it will only start and stop the hotspot that cannot change the Wifi configuration, I also want to change the SSID and password. I know how to do that thing under the Oreo device. Can anyone help me get the same result in Oreo. 回答1: ONLY POSSIBLE IF YOUR APP IS RUNNING AS SYSTEM APP In that case, I'm able to do this by using the below class: https://github.com/anujjpandey/HotSpotOnOreo/blob

How to change WifiConfigration in Oreo device

本秂侑毒 提交于 2019-12-07 22:40:29
I used https://github.com/aegis1980/WifiHotSpot code to start and stop Hotspot from my application. But it will only start and stop the hotspot that cannot change the Wifi configuration, I also want to change the SSID and password. I know how to do that thing under the Oreo device. Can anyone help me get the same result in Oreo. ONLY POSSIBLE IF YOUR APP IS RUNNING AS SYSTEM APP In that case, I'm able to do this by using the below class: https://github.com/anujjpandey/HotSpotOnOreo/blob/master/WifiAndDataConfigs.java You can use the same 来源: https://stackoverflow.com/questions/54500228/how-to

Android P , download does not start using download manager?

守給你的承諾、 提交于 2019-12-07 11:59:11
问题 I am trying to download files using the download manager and the download does not seem to be starting on Android P (running on the emulator). It works fine on Android Oreo and Android Marshmallow. Here is the code. DownloadManager.Request downloadRequest = new DownloadManager.Request(Uri.parse(URLS.URLforDownloadingFileData(fileName))); File file = new File(mobileInfo.getExternalFileStorageDirectory(),fileName); downloadRequest.setDestinationUri(Uri.fromFile(file)); downloadRequest.setTitle

Error:Execution failed for task ':app:processDebugResources' when using font folder inside res

我怕爱的太早我们不能终老 提交于 2019-12-07 10:41:33
问题 I have updated SDK to Android O developer preview and started a simple demo with single TextView. When i included font inside res folder it started showing me Error:Execution failed for task ':app:processDebugResources'. > com.android.ide.common.process.ProcessException: Failed to execute aapt Here is my build.gradle android { compileSdkVersion 25 buildToolsVersion "25.0.2" defaultConfig { ... minSdkVersion 15 targetSdkVersion 25 } } Note : I am using Android Studio 2.4 Preview 3 If i remove