Skip to content

Commit

Permalink
fix: updated android api 34 permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
riccardoFasan committed Aug 9, 2024
1 parent 2717f1b commit 50d5bef
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 29 deletions.
21 changes: 12 additions & 9 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
>


<!-- Permissions -->
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK"/>
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />

<application
android:label="YouTube Downloader"
android:name="${applicationName}"
Expand Down Expand Up @@ -49,12 +60,4 @@

</application>


<!-- Permissions -->
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />
</manifest>
</manifest>
4 changes: 2 additions & 2 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import 'package:youtube_downloader/app.dart';
import 'package:youtube_downloader/services/services.dart';
import 'package:youtube_downloader/controllers/controllers.dart';

void main() {
Future<void> main() async {
await _injectServices();
runApp(const YouTubeDownloaderApp());
_injectServices();
}

Future<void> _injectServices() async {
Expand Down
4 changes: 2 additions & 2 deletions lib/services/notifications_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class NotificationsService {

final AndroidNotificationDetails _downloadCompletedAndroidDetails =
const AndroidNotificationDetails(
'youtube_downloader_notification_channel',
'com.richard.youtube_downloader.download_info',
'YouTube Downloader',
importance: Importance.max,
priority: Priority.max,
Expand All @@ -17,7 +17,7 @@ class NotificationsService {

final AndroidNotificationDetails _downloadInProgressAndroidDetails =
const AndroidNotificationDetails(
'youtube_downloader_notification_channel',
'com.richard.youtube_downloader.download_info',
'YouTube Downloader',
importance: Importance.low,
priority: Priority.low,
Expand Down
16 changes: 8 additions & 8 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ packages:
dependency: "direct main"
description:
name: audio_video_progress_bar
sha256: "67f3a5ea70d48b48caaf29f5a0606284a6aa3a393736daf9e82bec985d2f9b70"
sha256: "552b1f73c56c4c88407999e0a8507176f60c56de3e6d63bc20a0eab48467d4c9"
url: "https://pub.dev"
source: hosted
version: "1.0.1"
version: "2.0.3"
boolean_selector:
dependency: transitive
description:
Expand Down Expand Up @@ -194,10 +194,10 @@ packages:
dependency: "direct main"
description:
name: flutter_keyboard_visibility
sha256: "4983655c26ab5b959252ee204c2fffa4afeb4413cd030455194ec0caa3b8e7cb"
sha256: "98664be7be0e3ffca00de50f7f6a287ab62c763fc8c762e0a21584584a3ff4f8"
url: "https://pub.dev"
source: hosted
version: "5.4.1"
version: "6.0.0"
flutter_keyboard_visibility_linux:
dependency: transitive
description:
Expand Down Expand Up @@ -242,10 +242,10 @@ packages:
dependency: "direct dev"
description:
name: flutter_lints
sha256: a25a15ebbdfc33ab1cd26c63a6ee519df92338a9c10f122adda92938253bef04
sha256: "3f41d009ba7172d5ff9be5f6e6e6abb4300e263aab8866d2a0842ed2a70f8f0c"
url: "https://pub.dev"
source: hosted
version: "2.0.3"
version: "4.0.0"
flutter_local_notifications:
dependency: "direct main"
description:
Expand Down Expand Up @@ -412,10 +412,10 @@ packages:
dependency: transitive
description:
name: lints
sha256: "0a217c6c989d21039f1498c3ed9f3ed71b354e69873f13a8dfc3c9fe76f1b452"
sha256: "976c774dd944a42e83e2467f4cc670daef7eed6295b10b36ae8c85bcbf828235"
url: "https://pub.dev"
source: hosted
version: "2.1.1"
version: "4.0.0"
matcher:
dependency: transitive
description:
Expand Down
16 changes: 8 additions & 8 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,17 @@ dependencies:
shared_preferences: ^2.3.1
get: ^4.6.6
youtube_explode_dart: ^2.2.1
path_provider: ^2.0.15
http: ^1.0.0
path_provider: ^2.1.4
http: ^1.2.2
just_audio: ^0.9.39
just_audio_background: ^0.0.1-beta.13
cached_network_image: ^3.2.3
audio_video_progress_bar: ^1.0.1
flutter_keyboard_visibility: ^5.4.1
cached_network_image: ^3.4.0
audio_video_progress_bar: ^2.0.3
flutter_keyboard_visibility: ^6.0.0
text_scroll: ^0.2.0
shimmer_animation: ^2.1.0+1
shimmer_animation: ^2.2.1
flutter_local_notifications: ^17.2.2
icons_launcher: ^2.1.2
icons_launcher: ^2.1.7

dev_dependencies:
flutter_test:
Expand All @@ -54,7 +54,7 @@ dev_dependencies:
# activated in the `analysis_options.yaml` file located at the root of your
# package. See that file for information about deactivating specific lint
# rules and activating additional ones.
flutter_lints: ^2.0.0
flutter_lints: ^4.0.0

# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec
Expand Down

0 comments on commit 50d5bef

Please sign in to comment.