Hello everyone, my app has a service that is started at boot before without receivers and this was fine till the new requirements. I read this post and I can see I can still run my code at boot but the issue I have is I think its better to run my code from a service so at first, I was thinking better I create a receiver for the OnBoot and then call my service but then I read I can't do this as the app is in the background and then I thought maybe I should move my whole code to the receiver.
The problem now is that my code runs at certain times of the day and downloads a new update of some databases with or without the user opening the app as it's essential the user access the latest database data automatically. The update can take from 1 to 15 mins or even more depending on the user's internet connection speed which means before this was fine as I show a notification to keep the update running in a service till it's done.
In receivers, I can see that android expects what you do to be short and it kills the receiver so I am really confused about how to solve my issue.
Please any advice?
The problem now is that my code runs at certain times of the day and downloads a new update of some databases with or without the user opening the app as it's essential the user access the latest database data automatically. The update can take from 1 to 15 mins or even more depending on the user's internet connection speed which means before this was fine as I show a notification to keep the update running in a service till it's done.
In receivers, I can see that android expects what you do to be short and it kills the receiver so I am really confused about how to solve my issue.
Please any advice?