New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to stay on in background? #55
Comments
Hello, |
So, how do I get it to stay on in the background without push, since my server doesn't support push notifications? |
Currently you can't stay in the background without push. I don't know if we will change this in the future. |
So I have push enabled, disabled doze mode, but after swiping the app away, I don't get incoming calls. What else can I do? |
@pete-gh push won't actually work with any but their server. We need to add real background support, it seems. |
CSipSimple stays registered in the background. Has any investigation been done to see how CSipSimple accomplishes it, but linphone does not? |
@singpolyma Indeed it does. |
If app was closed, first push notification starts service, but unfortunatelly, no call is received. So second call is needed. I guess call information should be read from push notification. |
@JurateT my phone does not have google services, so no GCM for push messaging. Linphone should be able to work similarly to CSipSimple & Fongo and stay open in the background (likely with a service) without needing a nudge from a push notification. |
I would need background mode to work with sipgate. Can I point them to some document that explains to them how they would need to configure their servers for this to work? |
You could try this: http://lists.nongnu.org/archive/html/linphone-developers/2016-09/msg00014.html |
Kudos to you for not abandoning F/OSS SIP efforts on Android but this is really irresponsible. I can't persuade 2 of my friends to use Linphone because "this stupid app kills itself". Not to mention that all this "push" crap is just another trojan tactic from Google. We didn't buy >4000mah & 3Gb phones to do something like that. Could you just make a checkbox to disable suicide code from LinphoneService.java ? Another big turn off is the lack of amplification controls (for some reason, in LP and only LP my BT headset is 5 times quieter than normal) and codec priority. Small one is the lack of auto-recording but that's another matter entirely. |
There are couple of ways to receive incoming calls if app is killed or screen is locked;
Regards, |
Just a minor correction to zgmunshi's comment above. By setting the "kill_service_with_task_manager" to false (instead of true) and recompiling, the linphone service stays up. |
LinPhone should turn this into a setting option instead of requiring users to recompile the app in order to get it to stay on in the background. There's a lot of Android users that hate Google's proprietary push notifications and it off of their phones. These users should be able to use vanilla LinPhone without having to recompile the app. |
Update: F-Droid is planning on doing the "kill_service_with_task_manager" set to false thing for their version of the build. https://gitlab.com/fdroid/fdroiddata/issues/1029 |
any news about this update? |
Requiring push in order to stay in the background is a very unfortunate decision. Please make it configurable in Settings. |
Setting "kill_service_with_task_manager"=false does not have any effect on Android Oreo. Android 8 prevents Linphone REGISTER messages when screen is off. The standby scenario is as following:
|
It is now impossible on Android O upwards to keep application running and accessing the network when it is not the one that is currently interactive? Could you czaviar give my Android baresip app https://github.com/juha-h/baresip-studio a try and tell what happened? It stays registered as long as I don't quit it on my Android 5.1 and 7.1 devices. baresip apk is also available here: https://box.tutpro.com/tmp/baresip.apk. |
If you turn on linphone Settings: Advanced: Enable Service Notification, then use the android Notifications linphone app control to not show the banner, as well adding Linphone to Device Maintenance: Battery: Unmonitored Apps to keep the app running you may have better luck on O. |
onMessageReceived not calling in Firebase service when app is in background |
Linphone calls are not working when app in background . |
@bharathikrify Do you have a google-services.json file in your project that match the proxy server your are connecting to ? |
So your problem isn't push related. |
Hello Viish, INVITE sip:666@192.168.75.24:5060 SIP/2.0 v=0
|
I think your issue come from the fact you are using UDP which is highly unreliable. |
Hi,
I can confirm the app being killed has nothing to do with the transport type.
I see the behavior with TCP.
As mentioned you have to override extra settings with new android releases and other apps do this automatically.
Yours ,
Graham
…________________________________
From: Sylvain Berfini <notifications@github.com>
Sent: Friday, 22 March 2019 13:38
To: BelledonneCommunications/linphone-android
Cc: Graham; Comment
Subject: Re: [BelledonneCommunications/linphone-android] How to stay on in background? (#55)
I think your issue come from the fact you are using UDP which is highly unreliable.
Try TCP or even better TLS and it should work just fine.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<#55 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AY6ZmAvQxwFzIHoI2NIDYsQnEI6ync65ks5vZNzfgaJpZM4NCV4e>.
|
We're not discussing an app killed issue, but the fact he doesn't receive it's INVITE. |
I doubt UDP is as unreliable as you are making it out to be. |
Thanks it's working. |
i am using Oreo when app kills from background i didn't get the incoming call,how i will get incoming call when app killed. |
Please see ‘Hints to keep Linphone alive:’ here:
https://play.google.com/store/apps/details?id=uk.co.systemdevelopment.linphone.taskerplugin
|
You have two ways to stay in "background": either set a foreground notification on the LinphoneService so it won't be killed (service notification in the advanced section of the settings) or use push notifications (which is better) to wake up the app when an call or chat is received. |
With Android 8 and 9 these are no longer enough.
As mentioned, there are additional settings that you need to set, otherwise linphone gets suspended (and dies) or gets killed, as part of the much more aggressive power saving features of the OS.
|
@GrahamJB1 I disagree, using push notifications there is absolutely no issues to receive a call or a message at any time. |
I found that you were correct prior to Android 8.1 and 9 that the banner was enough.
On those I found linphone stopped responding after a while and clicking on app would attempt to open it but it would immediately close. It would not answer calls at all. Clicking a second time would open it.
I had two rounds of these issues reported by users as new power saving features were added in android 8.1 and 9.
There are two new OS power saving configurations that need updating.
Graham
…________________________________
From: Sylvain Berfini <notifications@github.com>
Sent: Friday, 5 April 2019 08:24
To: BelledonneCommunications/linphone-android
Cc: Graham; Mention
Subject: Re: [BelledonneCommunications/linphone-android] How to stay on in background? (#55)
@GrahamJB1<https://github.com/GrahamJB1> I disagree, using push notifications there is absolutely no issues to receive a call or a message at any time.
Furthermore, the doc says that a for Android 9, if the app runs a foreground service it will be categorized in the active bucket: https://developer.android.com/about/versions/pie/power
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#55 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AY6ZmIHgmzV-ET1y6tOjy0jOJvhSioJUks5vdvoTgaJpZM4NCV4e>.
|
BTW. I was able to easily reproduce the problem on the phones I tested. That is Samsung and Huawei
Graham
…________________________________
From: Graham
Sent: Friday, 5 April 2019 08:35
To: BelledonneCommunications/linphone-android; BelledonneCommunications/linphone-android
Cc: Mention
Subject: Re: [BelledonneCommunications/linphone-android] How to stay on in background? (#55)
I found that you were correct prior to Android 8.1 and 9 that the banner was enough.
On those I found linphone stopped responding after a while and clicking on app would attempt to open it but it would immediately close. It would not answer calls at all. Clicking a second time would open it.
I had two rounds of these issues reported by users as new power saving features were added in android 8.1 and 9.
There are two new OS power saving configurations that need updating.
Graham
________________________________
From: Sylvain Berfini <notifications@github.com>
Sent: Friday, 5 April 2019 08:24
To: BelledonneCommunications/linphone-android
Cc: Graham; Mention
Subject: Re: [BelledonneCommunications/linphone-android] How to stay on in background? (#55)
@GrahamJB1<https://github.com/GrahamJB1> I disagree, using push notifications there is absolutely no issues to receive a call or a message at any time.
Furthermore, the doc says that a for Android 9, if the app runs a foreground service it will be categorized in the active bucket: https://developer.android.com/about/versions/pie/power
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#55 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AY6ZmIHgmzV-ET1y6tOjy0jOJvhSioJUks5vdvoTgaJpZM4NCV4e>.
|
Works on Android 8.1 (did not check on Android 9): In the Android settings, the application should be allowed not to save battery! Who will check on Android 9 please report. |
Looks remarkably like Linphone. Where's the source? https://github.com/BelledonneCommunications/linphone-android/blob/master/LICENSE.txt |
https://github.com/SafeSoft-tlt/gmobile-android Almost all the original bugs fixed. |
I am also able to integrate it successfully and able to receive a call when the app is in the foreground. But issue occurred when the app is forced closed from Mobile recent tabs, I am not able to receive any call in-app. I have searched for it and also added my google-service.json file as well. and also try by setting the "kill_service_with_task_manager" flag to false in res/values/non_localizable_custom.xml file. But still no luck. Also attached here my log file here: https://tinyurl.com/yxbuv7w6 |
Hi Guys, For people who are non-technical. |
I cannot get this app to stay running in background. Whenever I swipe it closed, the service stops and I get no incoming calls.
Background mode is checked. I tried unchecking "doze mode" but then the app crashes when I swipe it closed.
Any ideas?
I am on a Nexus 4 running Android 5.1.1
The text was updated successfully, but these errors were encountered: