Android timer based service updating a database
I am new to coding in Android. I need a suggestion regarding timers and android services.. I need to update a database specific to my app once in 24 hrs... The data base m开发者_运维问答aintains a list of all files in the sd card... so every day i scan the sd card and update for new files... First of all is this a good idea or is there any other method to know new files added or deleted in the sd card..... If the idea is correct, then how do i use the timers with the service class...
Use AlarmManager to schedule a PendingIntent that will trigger your filesystem scanning Service. If you want to receive real-time information for filesystem changes, use FileObserver.
精彩评论