android-8.0-oreo

Cannot see “font” resource type in Android studio

依然范特西╮ 提交于 2019-12-23 07:37:12
问题 I was going through the new Android O features, and one of the new thing is now app can add fonts directly into res folder. As per the android documentation for working with fonts, one of the 1st step is to create a new resource type named "font" using Right-click the res folder and go to New > Android resource directory. But I could not see "font" option available for resource type in the drop down in android studio. Below is the image attached. I am not able to see "font" option in the drop

Progress bar in notification not updates in Android O

安稳与你 提交于 2019-12-23 05:52:01
问题 In my android app, using a progress notification, its working in all android versions except android O. In android O, file is getting downloaded but progress bar is not updating neither it shows "Download Complete". Below is my code which is under AsyncTask -- private class BackTask extends AsyncTask<String,Integer,Void> { NotificationManager mNotifyManager; NotificationCompat.Builder mBuilder; NotificationChannel notificationChannel; protected void onPreExecute() { super.onPreExecute();

App crashes with java.lang.UnsatisfiedLinkError for Oreo devices with Xamarin.Android

倖福魔咒の 提交于 2019-12-23 05:14:00
问题 I'm receiving crash reports in Google Play Console for my app, and the stacktrace is as follows: java.lang.UnsatisfiedLinkError: at mono.android.Runtime.register (Native Method) at md5f3dc63ecaad575af71bd7a9b1622f75b.n.<clinit> (n.java:20) at java.lang.Class.newInstance (Native Method) at android.app.ActivityThread.handleCreateBackupAgent (ActivityThread.java:3431) at android.app.ActivityThread.-wrap3 (Unknown Source) at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1813) at

Android Push notifications not working when app is closed

孤街浪徒 提交于 2019-12-22 08:09:24
问题 I'm using OkSse to subscribe to my Server Sent Events. Whenever a new message is sent by the server, a notification should appear whether the app is in foreground,minimized or fully closed . The notifications work as expected when minimized or in foreground but when fully closed , this only works on some device brands . Researching a bit, I found that: this issue is noticed only on phones by manufacturers like Xiaomi, Oppo, One Plus, Vivo, Lenovo, Huawei, Samsung, and a few others. How does

Same ANDROID_ID in Oreo

感情迁移 提交于 2019-12-22 04:16:08
问题 As per Android 8.0 Behavior Changes , For apps installed on a device running Android 8.0, the value of ANDROID_ID is now scoped per app signing key, as well as per user. The value of ANDROID_ID is unique for each combination of app-signing key, user, and device. As a result, apps with different signing keys running on the same device no longer see the same Android ID (even for the same user). To test above changes, I made two test APK and found below behavior (tested on Nexus 5X, OS 8.0.0):

How to remove old notification channels?

筅森魡賤 提交于 2019-12-22 03:51:15
问题 My app now has 3 notification channels, I want to remove 2 of them. I thought simply not registering 2 channels would do the trick but when I open the notification settings on the Android device, the old channels still appear. Is it possible to remove them? They have no use and can confuse the users. 回答1: Notification channels stay forever once they are created. To remove them again, simply call deleteNotificationChannel() on the NotificationManager with the ID of the channel you want to

How to create shortcuts on Android O, when targetting less than it?

巧了我就是萌 提交于 2019-12-21 17:22:10
问题 Background Android O has various changes of how shortcuts work: https://developer.android.com/preview/behavior-changes.html#as The problem According to recent changes on Android O, the broadcast intent to create shortcuts is completely ignored : https://developer.android.com/reference/android/content/Intent.html#ACTION_CREATE_SHORTCUT https://developer.android.com/preview/behavior-changes.html#as The com.android.launcher.action.INSTALL_SHORTCUT broadcast no longer has any effect on your app,

How to ensure RemoteViewsService is run in the background in Oreo?

放肆的年华 提交于 2019-12-21 10:43:19
问题 Android 8 has its background execution limits, so when we started targeting Oreo we changed our services to using JobIntentSerivce to be able to get work done. However, we have a widget that updates every few minutes with live score data. The widget's service extends the good old RemoteViewsService. How can we make sure that the widget is updated even when the app is in the background? I've taken a look at the suggestions in another SO question, but they all seem to have some caveats:

How to ensure RemoteViewsService is run in the background in Oreo?

我是研究僧i 提交于 2019-12-21 10:43:06
问题 Android 8 has its background execution limits, so when we started targeting Oreo we changed our services to using JobIntentSerivce to be able to get work done. However, we have a widget that updates every few minutes with live score data. The widget's service extends the good old RemoteViewsService. How can we make sure that the widget is updated even when the app is in the background? I've taken a look at the suggestions in another SO question, but they all seem to have some caveats:

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(