1

I'm sure people are aware of how aggressive Huawei is with killing apps and this even affects GMS so notifications from Firebase don't come through. I know using HMS will remove the Firebase dependency but does that give you any additional flags to allow the app to run in the background? As it stands, my chat sessions get killed because the app it closes when minimized. I do know you can bypass this individually but is there anyway to do it for the whole base.

PiPatrol
  • 162
  • 2
  • 10
  • Take a look on this, it might be helpful https://stackoverflow.com/a/61364065/5245066 – captaink Jun 11 '20 at 13:53
  • 1
    Does this answer your question? [Huawei device killing my foreground service, even with dontkillmyapp.com's solution](https://stackoverflow.com/questions/56883074/huawei-device-killing-my-foreground-service-even-with-dontkillmyapp-coms-solut) – zhangxaochen Jun 12 '20 at 00:51
  • From my personal experience using HMS does not reduce this issue. Other manfacturers also faced this issue and eventually relaxed their policy, let's hope Huawei can do the same in the future. – m0skit0 Jun 12 '20 at 12:51

3 Answers3

0

for HUAWEI device,I think you can try this method: open "settings->Apps->App launch->Manage manually" then turn on "Auto-launch"&"Secondary launch"&"Run in background".

flybird
  • 51
  • 2
0

for Huawei devices consider using the Huawei Push Kit https://developer.huawei.com/consumer/en/doc/development/HMS-Guides/push-introduction

To ensure your app will run fine in all devices you can check this article: https://forums.developer.huawei.com/forumPortal/en/topicview?tid=0201200435859940059&fid=0101187876626530001

danms07
  • 141
  • 4
0

HMS Push Kit will work here. For the comparison of Google FCM and HMS Pusk Kit go through the article Comparison of Methods for Obtaining Data of Android Devices Between Google FCM and HUAWEI Push Kit

Given other HMS Push Kit Articles here for reference:

HMS Push Kit : Delineated using React Native

HMS PUSH KIT CLIENT SIDE

HMS PUSH KIT SERVER SIDE

Nithin
  • 932
  • 7
  • 14