I need to create a Service app,
Requirements
1 a request handler accepts request when it is sent from the other in house apps installed on the same device, saves the data to SQLite,
2 another service, message sender within the service app, polls the SQLite once every 5 secs (configurable) for data and send it to server side.
I want to find out if the option below is the best option, and look for alternatives otherwise. Please correct me if I am wrong.
Implementation Options
1 AIDL is used for communicating between the request handler within Service app and other in-house apps
The reason of using AIDL is
A.It allows multi-threading and accept requests from multiple apps.
B.It might provide better performance
Is there a better option?
2 The request handler
Since it is using AIDL, am I correct that it will be only invoked when request arrives
3 Message sender
What is best option for implementing this?
Option 1: Use Task in C# or Thread in Java to run it in the background
Other options from Android?
4 Service app
A Should the Service app be in a separate APK?
B How to launch Service app without Activity when Android OS starts?
C Should Service app be ran as background service or foreground. It might has problem running as background in Android 8?
OS: Lollipop, Xamarin Android
Thanks in advance.