I want to make my application run in background when closed.
Is there a possible way to continuously run the application in background, as i want to call some function which receives information from the server once in a day.
Any help would be appreciated.
Simply put, No, you can not call methods while the app is in background. At most, you could just send push / local notifications.
If you want to change behaviour when the app returns from the background, use OnApplicationPause.
void OnApplicationPause(bool paused)
{
if(!paused)
{
do whatever you want to do when the app comes back from the background
}
}
if you want to do something on Android though, you can by creating a background service, but you'll need a plugin to communicate with Android.
この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。
侵害の場合は、連絡してください[email protected]
コメントを追加