monodroid-samples icon indicating copy to clipboard operation
monodroid-samples copied to clipboard

bundling a Background service with a Foreground GUI

Open joeblew99 opened this issue 7 years ago • 1 comments

Over here are good examples of services: https://github.com/xamarin/monodroid-samples/tree/master/ApplicationFundamentals/ServiceSamples

But i dont see anything about how you can deploy an app to Android that includes the Foreground GUI App and the background Service.

In particular its a common use case to have many GUI Foreground apps with a single background service. The reason is because the background services maintains the DB and state, and all many GUI apps have a consistent view of the data. This is required for Mobile because you often want to split your UI into many small apps

if i am missing something please let me know.

joeblew99 avatar Sep 12 '17 09:09 joeblew99

A Service is like an Activity but without UI. You can implement there whatever you want: access/update database, execute a request, display a notification. A Service does not run in a separate process. This means, you must to execute a separate thread if you want to do something that takes a while (to not block the main UI thread)

You can review this topic here: https://developer.xamarin.com/guides/android/application_fundamentals/services/

Thanks

gonzalonm avatar Oct 13 '17 13:10 gonzalonm