cordova background geolocation on terminated app - android

I am trying to work out if this is even possible.
Using Cordova I have an app requirement that will alert the user once they are in a certain location.
This needs to happen even after the app has been terminated (not in springboard).
I know you can do it when the app is running and while in background mode but is it possible once the app has been terminated?
Using the cordova-plugin-background-geolocation will handle the background work but not sure how it works when the app is no longer running.
using cordova 3.5

Related

Xamarin Forms [Android] Silent Push while App in Background => Freeze

I have a App that i now wanted to expand with Silent Push Functionality for a customers Feature Request.
But now i encounter a rather strange behaviour(app freeze)
The Used Xamarin.Forms Version is 4.8.0.1451 (Updates did not solve the problem)
The Problem is Android Only related
Normal Notifications work as expected and dont produce any error
Here the quick Behaviour:
Receiving Silent Pushes works if the app is in Foreground (Multible times no limit)
Bringing the App to the Background and back to Foreground works also flawles
Do i Receive a Silent Push while the App is in Background or the Device is Locked and i bring back the App to Foreground/Unlock the device the app seems frozen (unresponsive and App.OnResume does not get executed)
(Also to note: i can only receive 1 silent push when the app is in Background/Device is locked)
For now i dont do anything on receiving the Silen push (to isolate this error)
Debug output aswell as LogCat does not provide any info what so ever.
i could not track any managed code that does execute and not return properly from some method calls
i can reproduce this problem on android 11(Pixel3) and android 9(Blackview A60)
I hope someone here has an idea what this problem could be.
It more informations or details are needed, i happily provide
In Android, starting in Android 8.0 (API level 26), an Android application no longer have the ability to run freely in the background.
When in the foreground, an app can start and run services without
restriction. When an application moves into the background, Android
will grant the app a certain amount of time to start and use services.
Once that time has elapsed, the app can no longer start any services
and any services that were started will be terminated. At this point
it is not possible for the app to perform any work.
For more details about this, you can refer to Background Execution Limits in Android 8.0.

How can i prevent my app stopped when phone Reboot in flutter?

I was working on flutter app and my app mainly works in background so , what I want is to run my app continuously without stopping when the phone is rebooted, or at any means my app should run in background forever.
so, is there any mechanism in flutter to do This?
this can only be done on Android side on IOS when user closes the app its process will be killed shortly after (we are talking seconds or minutes).
on Android you can achieve this by using a ForegroundService plugin like android_long_task

How to build an IONIC 3 app runs as a 'foreground service'?

I am converting one of my own app written in Java with Android SDK to a new one based on IONIC 3. My old app starts automatically after phone boots up and runs as a foreground service.
I can see that there is an 'autostart' plugin in IONIC Native that I can use to start my app automatically after phone reboot (https://ionicframework.com/docs/native/autostart/)
However, I cannot see any plugin to let my app runs as a 'foreground service'.
I need to keep my app running as a foreground service so that it can monitor some physical button actions.
You can use Background Mode plugin after using autostart. This plugin prevents going to a pause state when in background, so that way you can still execute anything in your app (like it was in foreground).
I don't know where in your app do you monitor the button pressed, if it's in a specific view, but in Ionic probably you'll need to monitor it on app.components.ts.
Hope this helps

Combination of Android service, Cordova background plugin and Skype O365 sdk does not working after few hours while running in background?

I am working on ionic platform and making one Android and iOS application.
Application requirement:
Skype for business O365 login will be there for user and then minimizing the application it will change the status of user like busy, available and note as well on regular interval.
What I have done:
I have used Cordova background mode and Skype websdk.It's logging in fine and setting the status fine while using in foreground.
Problem I am facing:
If I put application in background mode then the status is setting for few minutes but after that somehow it's not setting the status.
So, I am thinking that might be some scenarios:
Might the Android or iOS stopping the background service.
Might the cordova background plugin not working properly.
Might the Skype websdk stops after some time while running in background
Getting this error after the 404 not found code.
https://webpooldb41e02.infra.lync.com/ucwa/oauth/v1/applications/1145363530/me/reportMyActivity
I am researching for the above aspects as well.
I had a same problem. Its not about Background plugin. I found that Skype SDK somehow stops working if it stays in same network for more then around 4800 seconds.
What I did is I signed out and signed Back In user with SetInterval. So token will refreshed and It worked for me. You can use signet and signIn with setInterval of 4000 second or so.

Can meteor send notifications while in the background on android and iOS?

Say a the app is running and a user gets a message (I suppose that would just be an change from the push/sub system) can meteor on iOS and android notify the app user even if all of this occurred while meteor was running in the background (not the open app or there is no open app) what about to the lock screen? Could it make a noise as well?
Sure can, but you will need to use a Cordova library like this one https://github.com/raix/push

Categories

Resources