Skip to content

Commit

Permalink
SDK 34 upgrade. 35 is going to be more work because of edge to edge s…
Browse files Browse the repository at this point in the history
…tuff...
  • Loading branch information
Wilm0r committed Dec 15, 2024
1 parent 95f6bb2 commit 40fba1a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ apply plugin: 'com.android.application'
def generatedRes = 'build/genrule/res'

android {
compileSdk 33
compileSdk 35
defaultConfig {
applicationId "net.gaast.giggity"
minSdkVersion 26
targetSdkVersion 33
targetSdkVersion 34
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
// Thought I was going to use this for something but forgot. And it may break reproducible builds?
// buildConfigField "long", "TIMESTAMP", System.currentTimeMillis() + "L"
Expand Down
8 changes: 7 additions & 1 deletion app/src/main/java/net/gaast/giggity/Reminder.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,13 @@ public Reminder(Giggity app) {

Log.d("reminder", "onCreate");
IntentFilter filter = new IntentFilter(NotificationPoster.ACTION);
app.registerReceiver(poster, filter);
if (android.os.Build.VERSION.SDK_INT >= 33) {
// Not documented very clearly, but alarm-delivered intents count as external, so not
// exporting breaks notifications!
app.registerReceiver(poster, filter, Context.RECEIVER_EXPORTED);
} else {
app.registerReceiver(poster, filter);
}
}

public static class NotificationPoster extends BroadcastReceiver {
Expand Down

0 comments on commit 40fba1a

Please sign in to comment.