React native background process

前端 未结 1 1554

I am trying to figure out how to run background service in react native (Android). Is it possible to run code (e.g. socket listener) while app is running in background or not. I

相关标签:
1条回答
  • 2021-02-04 08:08

    On Android

    Yes, it can be done. Check this link for more information. Basically, you have to enable a notification to "wake" the device when receiving information.

    On iOS

    Yes, it can be done too, but through hacks. Check these links on SO to have a deeper understanding of these hacks

    Play a silent sound and set the background mode to audio. Check this answer for more information on the matter.

    Use VoIP services. Check more here but it'll require you justify a VoIP service to Apple.

    0 讨论(0)
提交回复
热议问题