Skip to content

Commit

Permalink
feat: update android target sdk to 34 (#902)
Browse files Browse the repository at this point in the history
  • Loading branch information
monkeyWie authored Feb 3, 2025
1 parent 6863317 commit ef228c1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ui/flutter/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ android {
// You can update the following values to match your application needs.
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration.
minSdkVersion 21
targetSdkVersion 29
targetSdkVersion 34
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
Expand Down
5 changes: 4 additions & 1 deletion ui/flutter/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
<uses-permission android:name="android.permission.READ_MEDIA_VIDEO" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" android:maxSdkVersion="32" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="32" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_DATA_SYNC" />
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />

<application
Expand Down Expand Up @@ -91,7 +93,8 @@
<!-- Add android:stopWithTask option only when necessary. -->
<service
android:name="com.pravera.flutter_foreground_task.service.ForegroundService"
android:stopWithTask="true" />
android:foregroundServiceType="dataSync"
android:exported="false" />

<!-- Don't delete the meta-data below.
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
Expand Down
2 changes: 2 additions & 0 deletions ui/flutter/lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import 'package:args/args.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter_foreground_task/flutter_foreground_task.dart';
import 'package:get/get.dart';
import 'package:window_manager/window_manager.dart';

Expand Down Expand Up @@ -40,6 +41,7 @@ void main(List<String> arguments) async {

Future<void> init(Args args) async {
WidgetsFlutterBinding.ensureInitialized();
FlutterForegroundTask.initCommunicationPort();
await Util.initStorageDir();
await Database.instance.init();
if (Util.isDesktop()) {
Expand Down

0 comments on commit ef228c1

Please sign in to comment.