java service that queries SQLite once a day

-1

I'm new to Android programming, I'd like to know which java service I use to query the SQLite database once a day, I want it even if you turn off the device or reboot, the service is activated again

    
asked by anonymous 27.05.2018 / 06:28

1 answer

1

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

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

Thus, the search action would always be performed at 00:00 each day.

To learn more about how to create scheduled tasks with EJB, I recommend this link

    
30.05.2018 / 22:43