android-8.0-oreo

Foreground app killed by OS after ~ 1 hour in standby mode

…衆ロ難τιáo~ 提交于 2019-12-03 03:20:31
I have an application where the user is requested to sign in and then presented with an activity. A service is also started on the sign in which uses the location manager to track his current location. everything works perfectly until the application is left in standby mode (screen off an app in background for more than ~ 1 hour) how can I prevent this? as I understand, if I have a foreground service running, the OS should not kill the app.. so what am I doing wrong? the OS I am testing on is Oreo starting the service on sign in: startService(intent); the service: public int onStartCommand

Android O - Single line Notification - like the “Android System - USB charging this device”

感情迁移 提交于 2019-12-03 01:11:53
I would like to have an ongoing notification for my ForegroundService that requires as small place as possible. I like the "Android System - USB charging this device" style, but I cannot find any example how to achieve this. Can anyone point me in the right direction? Update The style is given to the notification if the channel is assigned the importance IMPORTANCE_MIN . It looks like there is no way to use Androids built in style for notifications of IMPORTANCE_MIN to be used with a ForegroundService . Here is the description of IMPORTANCE_MIN : Min notification importance: only shows in the

Starting JobIntentService from PendingIntent (Notification button)?

戏子无情 提交于 2019-12-02 23:24:30
In my app, I have a notification button that fires off a short network request in the background using an IntentService. It does not make sense to show a GUI here, which is why I use the service instead of an Activity. See the code below. // Build the Intent used to start the NotifActionService Intent buttonActionIntent = new Intent(this, NotifActionService.class); buttonActionIntent.setAction(NotifActionService.ACTION_SEND_CONFIRM); buttonActionIntent.putExtra(NotifActionService.EXTRA_CONFIRM_ID, confirmId); buttonActionIntent.putExtra(NotifActionService.EXTRA_NOTIF_ID, notifId); // Build the

Can't find Android 8.0-8.1 (Oreo) API 26-27 ARM System Images

前提是你 提交于 2019-12-02 20:17:14
Are there anywhere Android 8.0 (Oreo) API 26 and Android 8.1 (Oreo) API 27 ARM System images (ARM, not x86 Intel) for AVD Manager? Thanks. Unofficial? Beta? Alpha? Any? You should build Android sources for specific platform by yourself The ARM images for API 26 and 27 are not available yet. ARM images available till API 25 only. Note: Google recommended an x86 system image on an x86 host for better emulation performance. Recent updates enabled computers with AMD processors to run Android Emulator and you don't need to install ARM images anymore. Taken from the Android Developers blog: If you

How set Firebase notification ChannelID in Android O?

我的未来我决定 提交于 2019-12-02 19:06:42
问题 For API level 26 we have to set a channel id as a reference. I learned how to do it without a channelID and below there is my firebase messaging set-up code. But now for the new Android api 26 level NotificationCompat.Builder(this); This doesn't work and I should add a reference to channelID as NotificationCompat.Builder(this, channelID); But I don't know how to do it. Can you help me to understand how to create a channel ID for Firebase cloud messaging? AndroidManifest.xml <service android

Oreo - Foreground service does not show foreground notification

非 Y 不嫁゛ 提交于 2019-12-02 17:33:56
So far, I've adjsuted my code to use ContextCompat.startForegroundService(context, intentService); to start my service. This way, it works on android < 26 and on android 26 (Oreo) as well. I still see a difference, in android oreo I don't see my custom foreground notification (I only see the "app is running in the background" notification). Do I have to adjust anything there as well? My service looks like this: public class BaseOverlayService extends Service { @Override public void onCreate() { super.onCreate(); moveToForeground(); } private void moveToForeground() { Notification notification

INSTALL_FAILED_NO_MATCHING_ABIS error after Oreo update [duplicate]

冷暖自知 提交于 2019-12-02 15:37:40
问题 This question already has an answer here : INSTALL_FAILED_NO_MATCHING_ABIS error on Android 8 (1 answer) Closed 12 months ago . I'm actually working on 3 android applications (A-B-C ) , everything is going fine on all my devices , but when i updated my S7 Edge to Oreo , something weird happened , 2 applications (A-B) disappeared , only C remains on my phone. So , i wanted to reinstall them by ADB , and i got this error : Installation failed with message INSTALL_FAILED_NO_MATCHING_ABIS: Failed

How set Firebase notification ChannelID in Android O?

China☆狼群 提交于 2019-12-02 11:38:06
For API level 26 we have to set a channel id as a reference. I learned how to do it without a channelID and below there is my firebase messaging set-up code. But now for the new Android api 26 level NotificationCompat.Builder(this); This doesn't work and I should add a reference to channelID as NotificationCompat.Builder(this, channelID); But I don't know how to do it. Can you help me to understand how to create a channel ID for Firebase cloud messaging? AndroidManifest.xml <service android:name=".MyFirebaseInstanceIdService"> <intent-filter> <action android:name="com.google.firebase.INSTANCE

A notification of the foreground service doesn't show on Android 8.+

家住魔仙堡 提交于 2019-12-02 05:57:28
My foreground service doesn't show a notification when it works on Android Oreo. It works perfectly on Android versions from 15 to 25. When I do targetSdkVersion from 26 to 25 this issue disappears. But this solution seems not good. I prepared test project with this issue. What should I do for fixing it on Android Oreo with targetSdkVersion 26 ? My foreground service, SoundService.java( full source ): public class SoundService extends Service implements MediaPlayer.OnErrorListener, MediaPlayer.OnPreparedListener, MediaPlayer.OnBufferingUpdateListener { private final static String TAG =

i want to update my sqlite and firebase database every hour?

时光总嘲笑我的痴心妄想 提交于 2019-12-02 04:55:25
I want to update my local sqlite and firebase database every hour. But I can't use the broadcast receiver as it was ban in android o. I can't use Job scheduler and work manager as it is a timebase application. I don't want to foreground service because it will use lots of resources and required to show a notification that I can't show. 来源: https://stackoverflow.com/questions/57826280/i-want-to-update-my-sqlite-and-firebase-database-every-hour