Android Question Bakground service not working

Kiran Raotole

Active Member
Licensed User
Hii, I make background service app which show notification but it work in some device and not work in some devices.
Its work in Xiaomi MI A1 and not work in Redmi note 4.

I aslo use region service attributes == #StartAtBoot: True
 

KMatle

Expert
Licensed User
Longtime User
Do you mean Firebase Messaging? If yes: The service is started automatically (by Android/Google FCM service). No extras needed. See the example. Nothing else is needed. How do you send the messages and what kind of messages are you sending (data/Notofication/mixed). Check the energy savings on that device, too. On some devices "unknown apps" (= not in a whitelist like WhatApp) are not allowed to run in the background by default (you can change that manually). I had this on a Huawei P8 which made me mad until I found out.
 
Upvote 0
Top