Coder Social home page Coder Social logo

music_service_example's Introduction

Music Service Example

2023-11-13 This repository is archived.

Android Only.

Plays music from a service, the player is persistent regardless of the app state. Features are only those required to illustrate playing music from a service.

The example illustrates using a 'foreground sticky' service that is stateful. It also illustrates querying the Android Mediastore.

To use the app, music must exist on the device. Add music to the app's playlist using the app's picker.

The playlist is played in order and repeats. The lifetime of the playlist is the lifetime of the service. You can append to or clear the playlist at any time, while the app is open.

Receiving shares is not implemented, if you want to add this take a look at the share_receive_example.

Playing streamed music is not implemented, as it is not required to illustrate playing music from a service. But presumably streamed music is just another uri, however it is possible you may have to research the implications for metadata. Don't ask I didn't look at this.

The music on the device must be tagged with album artist, album name, track name, genre, and optionally album art. If there is no (suitably tagged) music found some picker screens will be empty.

It is possible that some device vendors will have non-standard Mediastore implementations that are different in a way that is significant to this example. In this case the picker will immediately close. See the logcat for details. There are no known cases of this, but this does not mean that there won't be.

buildozer.spec:

requirements = python3,kivy,oscpy

services = Mediaplayer:player_service.py:foreground:sticky

android.permissions = INTERNET, FOREGROUND_SERVICE, READ_MEDIA_AUDIO, POST_NOTIFICATIONS

android.api = 34

android.add_src = java

android.add_resources = icons/round_music_note_white_24.png:mipmap



music_service_example's People

Contributors

android-for-python avatar

Stargazers

nathan heffelman avatar MoonPyx avatar Andreas Ecker avatar

Watchers

Andreas Ecker avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.