Skip to content

Commit

Permalink
fix #275
Browse files Browse the repository at this point in the history
  • Loading branch information
brodeurlv committed Apr 9, 2024
1 parent 038f389 commit 0c54543
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 5 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
## Change Log

### 0.20.6.1: April 09, 2024
- Bug: Crash when activating countdown (#275)

### 0.20.6: April 01, 2024
- Enhancement: New tracking of body photos (#268)
- Enhancement: Added OpenScale weight import (#272)
Expand Down
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ android {

defaultConfig {
applicationId "com.easyfitness"
minSdkVersion 21
minSdkVersion 31
targetSdkVersion 33
versionCode 65
versionName "0.20.6"
versionName "0.20.6.1"
vectorDrawables.useSupportLibrary true
}

Expand Down
1 change: 1 addition & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<uses-permission android:name="android.permission.SCHEDULE_EXACT_ALARM" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"
Expand Down
6 changes: 3 additions & 3 deletions app/src/main/java/com/easyfitness/CountdownDialogbox.java
Original file line number Diff line number Diff line change
Expand Up @@ -76,16 +76,16 @@ public static void registerAlarm(Context context, int uniqueId, long triggerAlar
Intent intent = new Intent(context, AlarmReceiver.class);
intent.putExtra("playSoundAfterRestTimer", playSound);
intent.putExtra("playVibrationAfterRestTimer", playVibration);
PendingIntent pendingIntent = PendingIntent.getBroadcast(context, uniqueId, intent, 0);
PendingIntent pendingIntent = PendingIntent.getBroadcast(context, uniqueId, intent, PendingIntent.FLAG_IMMUTABLE);
AlarmManager alarmManager = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);
if (alarmManager != null) {
if (alarmManager != null && alarmManager.canScheduleExactAlarms()) {
alarmManager.setExact(AlarmManager.ELAPSED_REALTIME_WAKEUP, triggerAlarmAt, pendingIntent);
}
}

public static void unregisterAlarm(Context context, int uniqueId) {
Intent alarmIntent = new Intent(context, AlarmReceiver.class);
PendingIntent pendingIntent = PendingIntent.getBroadcast(context, uniqueId, alarmIntent, PendingIntent.FLAG_CANCEL_CURRENT);
PendingIntent pendingIntent = PendingIntent.getBroadcast(context, uniqueId, alarmIntent, PendingIntent.FLAG_CANCEL_CURRENT | PendingIntent.FLAG_IMMUTABLE);
AlarmManager manager = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);
manager.cancel(pendingIntent);
pendingIntent.cancel();
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/res/values/about.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
<string name="email_url" translatable="false">[email protected]</string>
<string name="revision_history_label" translatable="false">Revision History:</string>
<string name="revision_history" translatable="false">\n
0.20.6.1: April 09, 2024\n
\t- Bug: Crash when activating countdown (#275)\n
0.20.6: April 01, 2024\n
\t- Enhancement: New tracking of body photos (#268)\n
\t- Enhancement: Added OpenScale weight import (#272)\n
Expand Down

0 comments on commit 0c54543

Please sign in to comment.