1

I'm developing a calling app. I use FreeSwitch as the VoIP server and Linphone as the VoIP library. I want the app to be able to receive a call while it's not running. Battery optimization always kills it off. I wonder how app like the Facebook messenger or Google Duo can do it.

The app aims to enable the user to call without an Internet connection so I'd prefer a solution that requires no internet. However, I'd also appreciate any kind of other solution. I can always remove the offline capability feature.

If it'd be useful at all, I used Firebase as the backend including the server.

Right now I'm using a foreground service as a way to keep the app awake but it consumed too much battery and it's only last around 32 hours.

Stanley Ko
  • 3,383
  • 3
  • 34
  • 60
SuuSoJeat
  • 1,086
  • 1
  • 8
  • 18
  • Do you check this https://stackoverflow.com/questions/38581495/making-your-android-app-selectable-to-handle-making-a-call? – Liem Vo Mar 21 '19 at 01:48
  • Hello @LiemVo, I've checked the link your link. However, it doesn't seem to solve my problem or contain any hint of solving my problem. Or perhaps I don't understand it. – SuuSoJeat Mar 21 '19 at 02:20
  • Do you try with deeplinking https://developer.android.com/training/app-links/deep-linking? – Liem Vo Mar 21 '19 at 02:46
  • @LiemVo I'm getting what you meant. However, I'm not sure how should I push a link to a specific device. – SuuSoJeat Mar 21 '19 at 03:39

0 Answers0