I want to start a foreground service that doesn't show notification,
apps like instagram, telegram, zapya, ... have a foreground service and they show no notifications.
I have tested ways like answers
here, but android shows a notification that yourAppName is running
.
I want to know how is that possible to have a foreground service with no notification or warning from OS?
相关问题
- How can I create this custom Bottom Navigation on
- Bottom Navigation View gets Shrink Down
- How to make that the snackbar action button be sho
- Listening to outgoing sms not working android
- How to create Circular view on android wear?
相关文章
- android开发 怎么把图片放入drawable的文件夹下
- android上如何获取/storage/emulated/下的文件列表
- androidStudio有个箭头不认识
- SQLite不能创建表
- Windows - Android SDK manager not listing any plat
- Animate Recycler View grid when number of columns
- Why is the app closing suddenly without showing an
- Android OverlayItem.setMarker(): Change the marker
How to do it
Here's an up-to-date technique to make it work on all Android versions:
I know this involves more work than you might like, but it does work, in my experience.
Generally, you can not define foreground service without a notification. However, user can hide the notification of your app, so you can ask, but if the service gets started with no notification, it'll be killed by OS as soon as OS felt that it needs to be stopped.
TL; DR
No. For background task execution, the Android WorkManager is the newest and most reliable.