Commit Graph

113 Commits

Author SHA1 Message Date
c6ac2cae86 Prevent multiple alarm timers running at once 2024-02-18 00:50:08 +13:00
eea6c96e8e Make separate channel for finished notifications
Still aren't showing on lock screen, or waking the
device sadly. Ive got to finish reading https://github.com/giorgosneokleous93/fullscreenintentexample/tree/main/app/src/main/java/com/giorgosneokleous/fullscreenintentexample
2024-02-17 19:01:43 +13:00
9e3f2fea78 Auto request battery optimizations are off
If the user reinstalls the app, and then imports their
database, they might end up with timers on but
battery optimizations on as well.
2024-02-17 17:42:19 +13:00
47cfaa4b67 Fix dismissing alarm and add +1 minute button 2024-02-16 17:47:26 +13:00
5355b0eb6a Move timer logic from AlarmModule -> TimerService
Missing a few of the old features here but ultimately
this will fix #210, #212, #196.
2024-02-16 13:15:42 +13:00
1e7c994209 Remove startForeground from AlarmService
Starting a foreground service from the background
causes errors in android 12+
2024-02-16 13:14:00 +13:00
3c0f4ce8ad Upgrade react-native from 0.72.3 to 0.73.0 2024-02-15 15:07:11 +13:00
fd09758ccf Make SettingsModule.ignoringBattery async 2024-02-14 11:14:43 +13:00
000f53a9fb Remove INTERNET permission from AndroidManifest.xml - 2.21 🚀
Commit 514efc6467
added the INTERNET permission without justification.

In fact this was already addressed in a f-droid metadata
issue:
https://gitlab.com/fdroid/fdroiddata/-/merge_requests/11623#note_1080190039
2024-02-12 16:58:39 +13:00
5e34bd4570 Remove reliance on WRITE_EXTERNAL_STORAGE
https://developer.android.com/about/versions/11/privacy/storage#permissions-target-11
2024-02-12 15:15:34 +13:00
47bff2d07c Remove READ_EXTERNAL_STORAGE permission
We never actually used this permission.
2024-02-11 18:32:24 +13:00
71d425ca03 Remove redundant code in BackupModule.kt 2024-02-11 18:21:46 +13:00
20781ddafe Fix registering receiver warnings in BackupModule.kt 2024-02-11 18:21:10 +13:00
655fe8ad53 Remove allowBackup=false from AndroidManifest
No clue why this was specified to begin with.
2024-02-11 18:18:05 +13:00
57bc6caffb Auto stop vibrations after 10 seconds - 2.17 🚀
Closes #198
2024-02-11 18:05:38 +13:00
ff365c791b Add icon to application tag of AndroidManifest.xml 2024-02-11 17:49:53 +13:00
60eec2c482 Fix deprecated warning on vibrate 2024-02-10 16:45:19 +13:00
07c704841d Use foreground service for alarm completion
Many of our errors in production are caused
by the alarm module finishing. In devices after
android version 7 we are "required" to use
startForegroundService or else the following
error supposedly occurs:

Exception java.lang.IllegalStateException:
  at android.app.ContextImpl.startServiceCommon (ContextImpl.java:1725)
  at android.app.ContextImpl.startService (ContextImpl.java:1680)
  at android.content.ContextWrapper.startService (ContextWrapper.java:731)
  at android.content.ContextWrapper.startService (ContextWrapper.java:731)
  at com.massive.AlarmModule$getTimer$1.onFinish (AlarmModule.kt:144)
  at android.os.CountDownTimer$1.handleMessage (CountDownTimer.java:127)
  at android.os.Handler.dispatchMessage (Handler.java:106)
  at android.os.Looper.loop (Looper.java:236)
  at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run (MessageQueueThreadImpl.java:228)
  at java.lang.Thread.run (Thread.java:923)

I say supposedly because on all of my testing
devices (which are android 7+) this error
doesn't occur.
2024-02-08 20:58:08 +13:00
936a47b8b2 Add more information to rest timer notifications - 2.11 🚀
From homepage - Name of exercise
From plans - Name (count/total)
2024-02-07 17:41:38 +13:00
8e9a6be85d Start alarm service as non-foreground - 2.8 🚀
Closes #209
2023-11-28 11:16:41 +13:00
2a78d2e556 Add button to export sets as CSV - 2.6 🚀
Closes #203
2023-11-21 10:26:34 +13:00
2f24104d13 Set finished notification sound to null - 2.4 🚀
Closes #195
2023-11-20 12:24:43 +13:00
cc6b37e16a Fix timer not always ending - 2.3 🚀
This bug is because I mis-named the event for the alarm finishing.
It would only be possible to create this bug if you do the following:
1. Create a timer
2. Swap to another app for it's duration and keep your phone screen
   active
3. On timer completion, without tapping the notification, focus the app
4. See the timer has not been set to zero
2023-11-15 22:44:02 +13:00
b6afbfcc17 Fix automatic backups - 1.181 🚀
- The broadcast intent wasn't receiving the target directory
- Add separate button for storing the backup location
2023-11-13 15:19:35 +13:00
d0c0a52ab4 Simplify logic of AlarmService.playSound
This probably won't fix the disabling sound bug.
2023-11-13 14:12:25 +13:00
79e462efc2 Fix app crashing when you change system theme
More specifically, this happens when you restore an
activity (not sure exactly when this happens).
2023-11-13 14:07:45 +13:00
706d4d1bbd Add duration setting to alarm vibrations - 1.176 🚀
Closes #179
2023-11-12 12:25:09 +13:00
744ed928f0 Fix timer page flashing 00:00 on first navigate 2023-11-04 13:53:19 +13:00
9dc188e6ec Remove duplicated permission in AndroidManifest
Also add something to remove the "advertising ID"
or whatever the hell that means. (Thanks google?)
2023-07-17 18:43:15 +12:00
514efc6467 Upgrade react-native to 0.72.1
This unfortunately has broken the unit tests.
Will have to worry about fixing them later.
Everything seems to be working other
than that.
2023-07-07 13:17:19 +12:00
76e5aeacfd Choose directory when backing up automatically - 1.135
Related to #146.
2023-03-27 14:34:17 +13:00
0e7920bde9 Show a toast when EACCESS from backing up - 1.133
I don't like having a bunch of backups saying
massive (x).db. Also this masks the issue of permissions,
which is easily fixed by deleting/moving the old massive.db.
2023-03-24 17:51:16 +13:00
d2a1c432bb Handle EACCESS in BackupModule 2023-03-24 17:43:28 +13:00
79a48b1e47 Run automatic backups after database imports - 1.131 2023-03-09 18:48:32 +13:00
13b340f5be Add setting to automatically backup - 1.130
Every day at 6am (also immediately when toggled)
we will copy the massive.db file to the Download
directory.
2023-03-09 17:16:08 +13:00
4db820f10a Remove DownloadModule
This was no longer in use
2023-03-07 18:23:38 +13:00
00d4edcfc3 Request FOREGROUND_SERVICE permission - 1.127
Related to #142
2023-02-24 19:30:48 +13:00
cffc458338 Start alarms as a foreground service
Related to #142.
Can't be sure this fixed anything because I can't replicate the error
on my emulators running android 13. I need to install android 13
on a real device and try replicate + see if this fixes it.
2023-01-03 17:04:51 +13:00
a2721e9f12 Use sqlite in Android code for alarm settings
Closes #129
2023-01-02 18:54:35 +13:00
9c184c5924 Add log when alarm finishes 2022-12-08 15:56:09 +13:00
6071957a40 Suppress unused parameter in TimerDone.kt 2022-12-02 16:31:20 +13:00
c2994da041 Make getManager private on AlarmModule
It was never used publicly.
2022-12-02 14:47:54 +13:00
6676efe69f Simplify AlarmModule 2022-11-30 14:23:24 +13:00
2d1bed0671 Remove unused import in SettingsModule 2022-11-30 14:23:15 +13:00
be4098962e Add settings module for android 2022-11-21 18:15:43 +13:00
60fe324e06 Send 00:00 at end of alarm event 2022-11-10 15:15:14 +13:00
bc4bc44b7d Fix download notifications
I accidentally deleted DownloadModule which
sent a notification of the successful export
of sets/plans
2022-11-08 16:32:57 +13:00
3c17a12f6e Fix settings for adding 1 min to rest timer
Previously when adding one minute to the rest timer from
the notification, settings weren't being used (sound,
vibration).

Closes #113
2022-11-07 15:56:07 +13:00
97442bc292 Fix adding one minute to a complete alarm 2022-11-05 17:22:51 +13:00
806480532f Add 1 minute to timer from notification 2022-11-05 14:46:42 +13:00