diff --git a/app/src/main/java/com/xypower/mpapp/MicroPhotoService.java b/app/src/main/java/com/xypower/mpapp/MicroPhotoService.java index 60f92e29..e80d1e3d 100644 --- a/app/src/main/java/com/xypower/mpapp/MicroPhotoService.java +++ b/app/src/main/java/com/xypower/mpapp/MicroPhotoService.java @@ -440,10 +440,13 @@ public class MicroPhotoService extends Service { } try { - Intent launchIntent = context.getPackageManager().getLaunchIntentForPackage(MicroPhotoContext.PACKAGE_NAME_MPMASTER); - // launchIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP); - if (launchIntent != null) { - context.startActivity(launchIntent); + Date dt = new Date(); + if ((dt.getHours() == 1 || dt.getHours() == 2) && dt.getMinutes() > 35 && dt.getMinutes() < 55) { + Intent launchIntent = context.getPackageManager().getLaunchIntentForPackage(MicroPhotoContext.PACKAGE_NAME_MPMASTER); + // launchIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP); + if (launchIntent != null) { + context.startActivity(launchIntent); + } } } catch (Exception ex) { ex.printStackTrace();