Skip to content

Repository files navigation

Important

This package is no longer actively maintained as we have dropped support for it in MissingCore Music. This is mainly due to a couple of issues:

  • Some Nothing Phone 3 users experience startup crashes(?) based on Android Vitals.
  • It's pretty limited due to being unable to test what we're trying to add support for.
  • The "main" feature only works for a single device (since we rely on the Glyph Button).

We may resume development in the future if we have a more stable validation approach.

@missingcore/music-glyph-toys

Caution

This is currently experimental, untested (as I don't own a Nothing Phone 3), and probably doesn't work as we're trying to have the Glyph Toy communicate with the MissingCore Music app, which uses React Native.

Toy Design & Usage

Given that the toy shows up on the Glyph Matrix screen, you should see a music note in the default state.

This toy supports interactions to mimic media controls (play/pause/skip) for the MissingCore Music app. This is done by holding down the Glyph Button for a certain period of time and then releasing. The Glyph Matrix will change to display an icon representing the actions below:

  • Release during first 500ms: Does Nothing
  • Release after 500ms: Play/Pause Toggle
  • Release after 3.5s: Skip To Next

Important

This toy requires the MissingCore Music app to be open in the foreground (or running in the background with the Continue Playback on Dismiss setting enabled) in order for the interactions to work.

Do note that the Continue Playback on Dismiss will cause the following behaviors:

  • When enabled, stopping media playback will requiring pausing via the media notification or force-stopping the app.
  • When disabled, removing the app from "Recent Tasks" will turn off the toy.

Testing With Demo App

The demo app can be found in this repository's Releases. The app will find & save the minimum amount of metadata for the first 20 tracks found. It'll have a simple UI to select the track to be played along with play/pause/skip/prev functionalities.

Getting the toy to work should be as follows:

  1. Add the toy via the Glyph Toys Manager.
  2. Set this toy as active.
  3. Open the demo app (this should set up the media notification and create a link with the Glyph Toy).
  4. The interactions mentioned above should work?

API

GlyphToy Module
GlyphToy.connect() Create/reuse a connection to the Glyph Toy.
GlyphToy.disconnect() Disconnect from the Glyph Toy. Should be called before the app is killed.
GlyphButton Module
GlyphButton.onMount() Called when the service is connected.
GlyphButton.onTouchUp() Called when a touch event on the Glyph Button is completed.
GlyphButton.isSupported Indicates if the Glyph Matrix is supported on the current device.

Technical Documentation

We were required to use a local maven repository to build the app with this library as Direct local .aar file dependencies are not supported. This means that we need to add the following to the build.gradle file to the React Native apps that use this library:

allprojects {
  repositories {
    maven {
      url "$rootDir/../node_modules/@missingcore/music-glyph-toys/android/glyph-matrix-sdk"
    }
  }
}

References

License

AGPL-3.0

About

🧪 Experimental Glyph Matrix functionality for MissingCore Music app.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Used by

Contributors

Languages