1 |
package dk.thoerup.checkupdates; |
package dk.thoerup.androidutils; |
2 |
|
|
3 |
import java.io.ByteArrayOutputStream; |
import java.io.ByteArrayOutputStream; |
4 |
import java.io.IOException; |
import java.io.IOException; |
24 |
import android.util.Log; |
import android.util.Log; |
25 |
|
|
26 |
public class CheckUpdates { |
public class CheckUpdates { |
27 |
final static long TIMESPAN_DAY = /*24*60*60* */1000; // one day |
final static long TIMESPAN_DAY = 24*60*60*1000; // one day |
28 |
|
|
29 |
final static String CHECKUPDATES = "CheckUpdates"; |
final static String CHECKUPDATES = "CheckUpdates"; |
30 |
final static String LASTCHECK = "lastcheck"; |
final static String LASTCHECK = "lastcheck"; |
157 |
//int icon = android.R.drawable.sym_action_email; //TODO: find a better icon |
//int icon = android.R.drawable.sym_action_email; //TODO: find a better icon |
158 |
int icon = R.drawable.searchicon; |
int icon = R.drawable.searchicon; |
159 |
|
|
160 |
|
|
161 |
Notification notification = new Notification(icon, "Update available", System.currentTimeMillis() ); |
Notification notification = new Notification(icon, "Update available", System.currentTimeMillis() ); |
162 |
notification.flags |= Notification.FLAG_AUTO_CANCEL ; |
notification.flags |= Notification.FLAG_AUTO_CANCEL ; |
163 |
|
|