Skip to content

Commit

Permalink
Merge branch 'feature/linux_support' into minor
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanheise committed Nov 25, 2023
2 parents 64f5c16 + a00ea6a commit ed3e485
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 16 deletions.
2 changes: 2 additions & 0 deletions audio_service/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,8 @@ Additionally:
<!-- ADD THESE TWO PERMISSIONS -->
<uses-permission android:name="android.permission.WAKE_LOCK"/>
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
<!-- ALSO ADD THIS PERMISSION IF TARGETING SDK 34 -->
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK"/>

<application ...>

Expand Down
28 changes: 25 additions & 3 deletions audio_service/example/.metadata
Original file line number Diff line number Diff line change
@@ -1,8 +1,30 @@
# This file tracks properties of this Flutter project.
# Used by Flutter tool to assess capabilities and perform upgrades etc.
#
# This file should be version controlled and should not be manually edited.
# This file should be version controlled.

version:
revision: f37c235c32fc15babe6dc7b7bc2ee4387e5ecf92
channel: dev
revision: f468f3366c26a5092eb964a230ce7892fda8f2f8
channel: stable

project_type: app

# Tracks metadata for the flutter migrate command
migration:
platforms:
- platform: root
create_revision: f468f3366c26a5092eb964a230ce7892fda8f2f8
base_revision: f468f3366c26a5092eb964a230ce7892fda8f2f8
- platform: linux
create_revision: f468f3366c26a5092eb964a230ce7892fda8f2f8
base_revision: f468f3366c26a5092eb964a230ce7892fda8f2f8

# User provided section

# List of Local paths (relative to this file) that should be
# ignored by the migrate tool.
#
# Files that are not part of the templates will be ignored by default.
unmanaged_files:
- 'lib/main.dart'
- 'ios/Runner.xcodeproj/project.pbxproj'
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.WAKE_LOCK"/>
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
<!-- If targeting SDK 34 -->
<!-- <uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK"/> -->

<!-- For example_android_songs example -->
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
Expand Down
4 changes: 2 additions & 2 deletions audio_service/example/lib/common.dart
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ class SeekBar extends StatefulWidget {
}) : super(key: key);

@override
_SeekBarState createState() => _SeekBarState();
SeekBarState createState() => SeekBarState();
}

class _SeekBarState extends State<SeekBar> {
class SeekBarState extends State<SeekBar> {
double? _dragValue;
bool _dragging = false;
late SliderThemeData _sliderThemeData;
Expand Down
8 changes: 4 additions & 4 deletions audio_service/example/lib/example_android_songs.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// ignore_for_file: public_member_api_docs
// ignore_for_file: public_member_api_docs, dangling_library_doc_comments

/// This example demonstrates working songs on Android, in particular it shows:
///
Expand Down Expand Up @@ -71,7 +71,7 @@ Future<void> main() async {

DeviceInfoPlugin deviceInfo = DeviceInfoPlugin();
AndroidDeviceInfo androidInfo = await deviceInfo.androidInfo;
sdkInt = androidInfo.version.sdkInt!;
sdkInt = androidInfo.version.sdkInt;

_audioHandler = await AudioService.init(
builder: () => AudioPlayerHandler(),
Expand Down Expand Up @@ -192,8 +192,8 @@ class _MainScreenState extends State<MainScreen> {
child = Scaffold(
body: Center(
child: ElevatedButton(
child: const Text('Grant storage permissions'),
onPressed: _fetch,
child: const Text('Grant storage permissions'),
),
),
);
Expand All @@ -209,8 +209,8 @@ class _MainScreenState extends State<MainScreen> {
children: [
const Text('There is no music on your device'),
ElevatedButton(
child: const Text('Refetch'),
onPressed: _fetch,
child: const Text('Refetch'),
),
],
),
Expand Down
16 changes: 9 additions & 7 deletions audio_service/example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,22 @@ dependencies:
sdk: flutter

path_provider: ^2.0.1
audio_session: ^0.1.7
just_audio: ^0.9.24
flutter_tts: ^3.3.3
device_info_plus: ^3.2.1
android_content_provider: ^0.2.0
permission_handler : ^8.3.0
audio_session: ^0.1.18
just_audio: ^0.9.36
flutter_tts: ^3.8.3
device_info_plus: ^9.1.0
android_content_provider: ^0.4.1
permission_handler : ^11.0.1
rxdart: ^0.27.2
audio_service:
path: ../
audio_service_mpris: ^0.1.3
just_audio_mpv: ^0.1.7

dev_dependencies:
flutter_test:
sdk: flutter
flutter_lints: ^1.0.4
flutter_lints: ^3.0.1

flutter:
uses-material-design: true

0 comments on commit ed3e485

Please sign in to comment.