android-8.1-oreo

Android Oreo Does not Play Custom Sound for Notification

会有一股神秘感。 提交于 2019-12-21 09:06:36
问题 I am trying to add a custom sound to notification for API > 26. Below is the code NotificationChannel notificationChannel = new NotificationChannel("channel id","channel name",NotificationManager.IMPORTANCE_HIGH); mNotificationManager.createNotificationChannel(notificationChannel); AudioAttributes audioAttributes = new AudioAttributes.Builder() .setContentType(AudioAttributes.CONTENT_TYPE_MUSIC) .setUsage(AudioAttributes.USAGE_NOTIFICATION) .build(); notificationChannel.setSound(Uri.parse(

BOOT_COMPLETED action cannot be received with API 27

落花浮王杯 提交于 2019-12-14 03:47:13
问题 The code below does not receive BOOT_COMPLETED action with API 27 although works with API 25. However this action is among Implicit Broadcast Exeptions according to the official documentation. When I enter the adb command of am broadcast -a android.intent.action.BOOT_COMPLETED the message below is shown on the console: Background execution not allowed: receiving Intent { act=android.intent.action.BOOT_COMPLETED flg=0x400010 } to com.boottest/.OnBootReceiver Is there any chance to overcome

NotificationChannel playing wrong sound in Oreo

爱⌒轻易说出口 提交于 2019-12-13 13:15:59
问题 I have this weird problem with NotificationChannel sound in devices running Android Oreo. Lets say i have two sound files in my project raw directory: a.mp3 c.mp3 Then on first installation of an app i assign those sounds to different notification channels using their uri (for example): android.resource://myapp/2131558403 (for sound a.mp3) android.resource://myapp/2131558404 (for sound c.mp3) At this point everything works as expected. Problem appears when i start adding new sounds (in front

Please tell us the minimum API for using VrVideoView

二次信任 提交于 2019-12-13 08:37:50
问题 I tried to run an application made with VrVideoView on two smartphones (galaxy grand max (android4.4.4) & galaxy j5 2017 (android 8.1)). My app worked fine in android 8.1, but it did not work well in android 4.4. Although the video was played in android 4.4, It did not respond to my smartphone movement and showed front view. So I want to know the minimum specifications for VrVideoView to work properly. Thanks 回答1: Minimum Android API level for running Google-VR-SDK is 19 but your problem is

Android Service not getting start from JobIntentService on BOOT

[亡魂溺海] 提交于 2019-12-13 03:30:03
问题 I am trying to run a service on OREO device and service get started as it listens to android.intent.action.BOOT_COMPLETED intent. Below is Boot Received Broadcast Reciever class: public class ConnectionBOOTReceiver extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) { MyIntentService.enqueueWork(context, new Intent()); } } Below is my IntentService Class: import android.content.Context; import android.content.Intent; import android.support.annotation

PeriodicWorkRequest is not initiating by WorkManager on realtime devices except emulator

廉价感情. 提交于 2019-12-13 03:10:40
问题 I am enqueuing a PeriodicWorkRequest through WorkManager , the code mentioned below is working on device having Android OS Nougat also on emulators of Android OS versions 8.1, 9 & 10 but not on OnePlus (Android 9), Redmi 5 (Android 8.1) & Google Pixel (Android 9.1). The dependency I have incorporated is, implementation "android.arch.work:work-runtime:1.0.1" (Non Androidx) Also implementation "android.arch.work:work-runtime:2.1.0-beta02" (Androidx) Code snippet, PeriodicWorkRequest.Builder

NotificationCompat.Builder() not accepting Channel Id as argument

强颜欢笑 提交于 2019-12-12 19:21:39
问题 I know this question has been asked several times before. But none of the solutions worked for me. That's why I would like to ask the question again. The following line only accepts NotificationCompat.Builder(context) : NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(context, ADMIN_CHANNEL_ID) // Getting error I have fulfilled: importing android.support.v4.app.NotificationCompat My support libraries version is above 25 implementation group: 'com.android.support

GeoFence using PendingIntent.getBroadcast() not working

六眼飞鱼酱① 提交于 2019-12-12 19:13:18
问题 I am trying get a Geofence trigger to a BroadcastReceiver and the BroadcastReceiver has the code to read the data from the intent and act on the data sent in intent. My BroadCastReceiver is GeoLocationBroadCastReceiver . I am invoking this code when my activity is opened and the app is in background. public PendingIntent getPendingIntent(Context context){ Intent i = new Intent(context, GeoLocationBroadCastReceiver.class); return PendingIntent.getBroadcast(context, 0, i, PendingIntent.FLAG

How do I debug an Android app that crashes only in Release Mode

落爺英雄遲暮 提交于 2019-12-12 10:53:54
问题 Everything works in Debug Mode but Crashes in Release Mode. What required permissions are available in Debug Mode that are not turned on in Release mode? EDIT When I set Linking to None, I get past the first screen to my Login screen. However, when I added the Release permission Internet , the first time it tries to read a remote Entity Framework Core Table it crashes. EDIT 2 In Release Mode, if I check Use Shared Runtime , the app runs fine. EDIT 3 I have turned on Debugging while in Release

Why do I get RemoteServiceException for creating/updating a notification?

删除回忆录丶 提交于 2019-12-12 07:54:52
问题 Background I have a spare time app that I've been working on for some years (here), and I try to handle as many crashes as I can (I hate seeing crash reports!). The problem One recent crash that seem quite new, is this one: android.app.RemoteServiceException: at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1768) at android.os.Handler.dispatchMessage (Handler.java:106) at android.os.Looper.loop (Looper.java:164) at android.app.ActivityThread.main (ActivityThread.java:6494)