cancel
Showing results for 
Search instead for 
Did you mean: 
Subscribe

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.

View Entire Topic
Former Member
0 Likes

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.