Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow time based updates #14

Closed
GoogleCodeExporter opened this issue Mar 14, 2015 · 6 comments
Closed

allow time based updates #14

GoogleCodeExporter opened this issue Mar 14, 2015 · 6 comments

Comments

@GoogleCodeExporter
Copy link

We need our app to only update in off hours. We would like to specify this time 
on the auto update server.

1) upload an apk
2) specify a time range 
3) app checks for updates and does not see there is one available unless it is 
checking durring the time range specified.

Original issue reported on code.google.com by d...@codesushi.com on 25 May 2012 at 7:23

@GoogleCodeExporter
Copy link
Author

This is a nice idea I'm being pondering for a while now.

However, there's a slight problem I still haven't decided how to solve.

If the schedule is decided by the server, and the update time range is 
relatively small (1-2hours), the application has to check for updates quite 
frequently, like every 30minutes, which is too frequent in my opinion.

But if the time range is decided by the application, the application can check 
for updates once a day and still be able to get into any tight schedule.

Moreover, if your application is deployed all over the world, and you want to 
get updates only during the night time (local time), it would be quite 
difficult with the time range settings decided by the server.

So, here's a question: wouldn't it be better to embed the update schedule into 
the application and not into the server settings? Is there any scenario, where 
this approach would not work?

Original comment by lenik.terenin on 26 May 2012 at 12:02

  • Changed state: Accepted
  • Added labels: Type-Enhancement
  • Removed labels: Type-Defect

@GoogleCodeExporter
Copy link
Author

If we don't know the time(s) when we deploy the application that we would like 
to have the update happen, we would need your service to be able to inform the 
client in some way when it needs to check.  One way we could do this would be 
to have the app download the APK and only do the actual install at the 
designated time. Our app needs to check for updates every few hours in order to 
account for the urgent updates we have while we're deployed in the field.

Original comment by d...@codesushi.com on 29 May 2012 at 2:18

@GoogleCodeExporter
Copy link
Author

To be honest I like both ideas.  I could see scnearios for both.  codesushi has 
a good point but personally I am more inclined to embed the time in the 
application.  This should prob be 2 separate issues.

Original comment by bric...@gmail.com on 29 May 2012 at 7:32

@GoogleCodeExporter
Copy link
Author

What if the server could provide the time that the software needs to actually 
be installed... so the download happens and sits there waiting... then a thread 
wakes up at the appointed time and does the install? It might be the next 
day... or maybe right now.

Original comment by d...@codesushi.com on 13 Jun 2012 at 11:18

@GoogleCodeExporter
Copy link
Author

Two new methods were added:

public void clearSchedule()
public void addSchedule(int start, int end)

the former one clears the schedule (which is the same as 00:00~24:00), and 
second adds an interval in hours to the current schedule. Parameters start and 
end are the limits of the update interval in hours. For example, 
addSchedule(10,15) allows updates to be run from 10am to 3pm of local time.

You may add several intervals, for example, addSchedule(23,24) and 
addSchedule(0,5) will allow updates to be run from 11pm to 5am.

Original comment by lenik.terenin on 19 Jun 2012 at 8:11

  • Changed state: Fixed

@GoogleCodeExporter
Copy link
Author

Issue 12 has been merged into this issue.

Original comment by lenik.terenin on 19 Jun 2012 at 8:20

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant