I've created an application which does synchronization with the server. I've already have a code, which does synchronization once user pressed a button. Now it is time to add Service there. I have the following questions with regards to the services on android:
- will the service be started if user never run application before? (i.e. just installed that)
- when the service will be started first time? can I start it from
onCreate
of the main application? - if user presses Synchronize button in the application, should I start that Service or should I have different process for the same? How can I check then that background synchronization is not happening at the same time?
should I use ASyncTask, even if the service is started as
startService(new Intent(this, ServiceSync.class));