I want to implement the thread in my application
first requirement is:
Each activity access the local database that time it take some time to load.So I am planning to give progress-dialog.I want to do it in thread.Currently I did using the AsynsTask because of I dodnt know how long will take for record. Other than AsynsTask How we can implement using Thread?
Multitasking Facility :
I want to run two activity.One is in background.I.E If there are any upload available(Database Syn Android to SQL Server) while running activity ,Upload should start in background.How we can implement this?
Please guide me on this
Thanks in advance
You want to synchronize your database in background so I think you have to use
servicein which you have to implementthreadand you have to write your code in thread.You can then
schedule your service startup timeand alsoyou can repeat your servicewhen ever you want to keep duration for start service.And for upload you have to options
1) Using
AysncTask2) Using
Service with threadAnd also know that Service is running in main UI so if you want to use service for synchronize database you have to implement thread