Java service that queries Sqlite once a day

Asked

Viewed 54 times

-1

I am new to Android programming, I would like to know which java service I use to consult the base Sqlite once a day, I want even if you turn off the device or restart, the service is activated again

1 answer

1

If your application is using the technology EJB 3.1 (Javaee) you can use the annotation @Schedule in the method for it to be executed according to the chronology desired, in your case it could be:

@Schedule(dayOfWeek="*", hour="0", minute="0")

Thus, the search action would always be carried out at 00:00 of each day.

To learn more about creating scheduled tasks with EJB, I recommend this link

  • I intend to use this functionality on Android because I am developing an application, you know tell me if even the with closed application this method performs what I want ? I will need to make a query in Sqlite base once a day

Browser other questions tagged

You are not signed in. Login or sign up in order to post.