Leon 1 年之前
父節點
當前提交
c444fc0e6b

File diff suppressed because it is too large
+ 0 - 0
android/app/src/main/assets/index.android.bundle


File diff suppressed because it is too large
+ 0 - 0
android/app/src/main/assets/index.android.map


+ 4 - 1
android/app/src/main/java/com/hola/HolaModule.java

@@ -102,7 +102,10 @@ public class HolaModule extends ReactContextBaseJavaModule {
 
                 AlarmManager alarmManager = (AlarmManager) getCurrentActivity().getSystemService(Context.ALARM_SERVICE);
                 if (mode.equals("ONCE")){
-                    alarmManager.set(AlarmManager.ELAPSED_REALTIME_WAKEUP, SystemClock.elapsedRealtime()+10*1000,pendingIntent);
+                    long aa = jsonObject.getLong("once");
+                    long bb = SystemClock.elapsedRealtime()+10*1000;
+                    alarmManager.set(AlarmManager.ELAPSED_REALTIME_WAKEUP, jsonObject.getLong("once"),pendingIntent);
+//                    alarmManager.set(AlarmManager.ELAPSED_REALTIME_WAKEUP, SystemClock.elapsedRealtime()+10*1000,pendingIntent);
                 }
                 else {
                     JSONObject recurring = jsonObject.getJSONObject("recurring");

Some files were not shown because too many files changed in this diff