Hello,
My android application has a working mobilink synchronization, but is started only with a button click. I have to make my app synchronize in a period of time and I wonder what is the best approach to do this? Maybe a service with a running timer that calls the sync or it is better to try push notification.
Request clarification before answering.
In addition to Graham's valid answer, if you do want to do scheduled synchronizations (for example to save the performance drain of doing synchronizations after many updates in a short time interval) there are several options. One thing I do not recommend is doing a potentially long-running operation like synchronization on the UI thread (such as a button click). A couple of options are: (1) you could use java.util.Timer to run scheduled synchronizations on a thread. (2) you could use android.os.AsyncTask to run synchronizations on a background thread.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.