tglRazaf / flutter-native-music-controller

A Flutter plugin to handle pause/play for running music in background from another app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

native_audio_controller

A Flutter plugin to handle pause/play for running music in background from another app

Supported Platforms

  • Android: Fully supported
  • iOS: Under development (not yet implemented)

Usage

import 'package:native_audio_controller/native_audio_controller.dart';

final _nativeAudioControllerPlugin = NativeAudioController();

// Pause a background music from other app
_nativeAudioControllerPlugin.pauseAudio();

// Resume the music
_nativeAudioControllerPlugin.resumeAudio();   

Setup, permissions

Android

<uses-permission android:name="android.permission.BROADCAST_STICKY" />

Usage and Contribution

  • Feel free to use the Android functionality.
  • Contributions are welcome, especially for implementing the iOS part.
  • Check the GitHub repository for updates and contribute to the development.

About

A Flutter plugin to handle pause/play for running music in background from another app

License:MIT License


Languages

Language:Dart 56.3%Language:Kotlin 25.4%Language:Swift 9.2%Language:Ruby 8.7%Language:Objective-C 0.4%