What's the latest on this? Is there an example of a project created with AppBuilder which continues to run in the background on a device after another application has taken the foreground? An example would be a chat app that continues to poll for new inbound messages, updating the Notification area when a message is available. Or an app to log the changing GPS location while another app is running.
Would such a solution be cross-platform, or do we need three code sets to support Android, iOS, and WindowsPhone?
Would this require NativeScript?
Thanks.
10 Answers, 1 is accepted
Thank you for bringing the issue.
Unfortunately, at this stage we do not have such examples. Nevertheless, this is something that we will definitely consider for the near future.
What I can suggest you, is to check this forum thread, where a working sample about integrating the BackgroundGeoLocation plugin is provided. As for developing a background service as a whole, I believe there is no plugin that unites the approaches for all the platforms (iOS, Android and WP). Still, you can look at this article about Background Fetch in order to implement this on iOS. For Android, I would suggest this stackoverflow thread, where most of the possible plugins are listed.
With the above said, I believe the answer to you second question depends a lot on the requirements of the background service. In other words, the solution can be cross-platform, sharing one code base for basic, or already developed scenarios (like the GeoLocation). Still for more complicated background tasks you may need different code sets.
Finally, this won't require NativeScript, as you should be able to achieve the functionality in hybrid application with the help of custom plugins that utilize the needed native parts.
I hope this helps.
Regards,
Kaloyan
Telerik
Visit the Telerik Verified Plugins Marketplace and get the custom Cordova plugin you need, already tweaked to work seamlessly with AppBuilder.
While checking background services in general I stumbled into this thread. This post was started in 2014 then I saw the sentence "Nevertheless, this is something that we will definitely consider for the near future." from Kaloyan. Did something happen in between? I also checked Teleriks base for background services but couldn't find all I need:
- Getting GPS coordinates in background
- Using a third party service for pub/sub (sending/receiving messages) in backgroun
Is there already a "universal" solution (NativeJS, Cordova Plugin) that could meet these requirements? I need it for an App built with Javascript.
Regards
I think that you can benefit from the latest and most stable implementation of the Cordova Background GeoLocation plugin. It is capable of executing a callback function on iOS and WP devices in order to send data to the server. As for Android, the data is synced automatically.
About receiving messages on the device while the app is in the background, you can use Push Notifications, as explained here. This will also allow you to execute certain login in the background after such notification is received on the device.
I hope this helps.
Regards,
Kaloyan
Telerik
Visit the Telerik Verified Plugins Marketplace and get the custom Cordova plugin you need, already tweaked to work seamlessly with AppBuilder.
I am happy my suggestions have helped. Please, let us know if we can be of further assistance.
Regards,
Kaloyan
Telerik
Visit the Telerik Verified Plugins Marketplace and get the custom Cordova plugin you need, already tweaked to work seamlessly with AppBuilder.
Try to start the service in separate thread, so that when you will destroy your activity the service will not be affected. It will run without any interruption. Also, in the service return Service.
Hello, I would like to do the same thing in iOS hibrid since I have an application that is only graced in the background for 8 minutes only that time and I would like to get in touch with who has an idea how to give a solution
I believe this question was answered in the separate thread that you have opened. I would suggest we keep the discussion there.
Please, let me know if this is a different issue and I should continue my investigation.
Regards,
Garo
Telerik by Progress
Visit the Telerik Verified Plugins Marketplace and get the custom Cordova plugin you need, already tweaked to work seamlessly with AppBuilder.
