Skip to content

Commit

Permalink
Merge pull request #126 from synyx/increase-sdk-version
Browse files Browse the repository at this point in the history
Increase sdk version to 34 (Android 14)
  • Loading branch information
heetel authored Dec 15, 2023
2 parents c614e69 + 8541b01 commit 20f9666
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 34 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- name: set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Build with Gradle
run: ./gradlew build
- uses: actions/checkout@v4
- name: set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
- name: Build with Gradle
run: ./gradlew build
16 changes: 14 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,23 @@ apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'

android {
compileSdkVersion 32

/**
* compileSdk specifies the Android API level Gradle should use to
* compile your app. This means your app can use the API features included in
* this API level and lower.
*/
compileSdk = 34

defaultConfig {
applicationId "de.synyx.android.meetingroom"

// Defines the minimum API level required to run the app.
minSdkVersion 23
targetSdkVersion 32

// Specifies the API level used to test the app.
targetSdkVersion 34

versionCode 7
versionName "1.3.2"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,36 +1,29 @@
package de.synyx.android.meeroo.screen.settings;

import android.app.AlarmManager;
import android.app.PendingIntent;
import android.content.Context;
import static de.synyx.android.meeroo.util.functional.FunctionUtils.mapToArray;
import static de.synyx.android.meeroo.util.functional.FunctionUtils.toArray;
import static de.synyx.android.meeroo.util.functional.FunctionUtils.toMap;

import android.content.Intent;
import android.os.Bundle;

import android.preference.ListPreference;
import android.preference.MultiSelectListPreference;
import android.preference.Preference;
import android.preference.PreferenceFragment;
import android.preference.PreferenceManager;

import android.view.MenuItem;

import androidx.annotation.NonNull;

import androidx.appcompat.app.ActionBar;

import java.util.Map;

import de.synyx.android.meeroo.R;
import de.synyx.android.meeroo.config.Registry;
import de.synyx.android.meeroo.domain.MeetingRoom;
import de.synyx.android.meeroo.preferences.PreferencesService;
import de.synyx.android.meeroo.preferences.PreferencesServiceImpl;
import de.synyx.android.meeroo.screen.login.LoginActivity;

import java.util.Map;

import static de.synyx.android.meeroo.util.functional.FunctionUtils.mapToArray;
import static de.synyx.android.meeroo.util.functional.FunctionUtils.toArray;
import static de.synyx.android.meeroo.util.functional.FunctionUtils.toMap;


public class SettingsActivity extends AppCompatPreferenceActivity {

Expand Down Expand Up @@ -118,19 +111,14 @@ public void onCreate(Bundle savedInstanceState) {
private boolean logout(Preference preference) {

Registry.get(PreferencesService.class).logout();
restartApplication();
navigateToLogin();
return true;
}

private void restartApplication() {

Intent loginActivityIntent = new Intent(getContext(), LoginActivity.class);
int pendingIntentId = 123; // id not needed
PendingIntent pendingIntent = PendingIntent.getActivity(getContext(), pendingIntentId, loginActivityIntent, PendingIntent.FLAG_CANCEL_CURRENT);
AlarmManager alarmManager = (AlarmManager) getContext().getSystemService(Context.ALARM_SERVICE);
final int delay = 150;
alarmManager.set(AlarmManager.RTC, System.currentTimeMillis() + delay, pendingIntent);
System.exit(0);
private void navigateToLogin() {
Intent intent = new Intent(getContext(), LoginActivity.class);
getContext().startActivity(intent);
getActivity().finish();
}


Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.4.2'
classpath 'com.android.tools.build:gradle:8.2.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"


Expand Down
3 changes: 3 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
android.defaults.buildfeatures.buildconfig=true
android.enableJetifier=true
android.nonFinalResIds=false
android.nonTransitiveRClass=false
android.useAndroidX=true
org.gradle.jvmargs=-Xmx1536m
# When configured, Gradle will run in incubating parallel mode.
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-all.zip

0 comments on commit 20f9666

Please sign in to comment.