ios – Music Equipment Integration Concern: Requesting Developer Token on Android

Spread the love


I’ve built-in music_kit model 1.1.0 into my Flutter app, and I used to be in a position to efficiently acquire the developer token and consumer token on iOS. Nevertheless, I’m encountering points with the identical circulate on Android.

From what I perceive, the plugin on iOS instantly extracts data from the system, however on Android, it appears to require an authentication/login circulate because it’s extra of an app integration the place we provoke the login course of manually. Nevertheless, this automated circulate isn’t occurring as anticipated on Android.

By default, I’m receiving the next error:

PlatformException(requestDeveloperToken, null, java.lang.mirror.InvocationTargetException
    at java.lang.mirror.Technique.invoke(Native Technique)
    at app.misi.music_kit.ChannelHandler.onMethodCall(ChannelHandler.kt:123)
    at io.flutter.plugin.frequent.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:258)
    at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:295)
    at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$io-flutter-embedding-engine-dart-DartMessenger(DartMessenger.java:322)
    at io.flutter.embedding.engine.dart.DartMessenger$$ExternalSyntheticLambda0.run(Unknown Supply:12)
    at android.os.Handler.handleCallback(Handler.java:938)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:250)
    at android.app.ActivityThread.primary(ActivityThread.java:7886)
    at java.lang.mirror.Technique.invoke(Native Technique)
    at com.android.inside.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at co

I’ve tried so as to add the next exercise to the AndroidManifest.xml file:

<exercise
    android:title="com.apple.android.sdk.authentication.SDKUriHandlerActivity"
    android:launchMode="singleTask"
    android:screenOrientation="portrait"
    android:exported="true"
    android:theme="@fashion/MusicKitAuthTheme" >
    <intent-filter>
        <motion android:title="android.intent.motion.VIEW" />

        <class android:title="android.intent.class.DEFAULT" />
        <class android:title="android.intent.class.BROWSABLE" />

        <knowledge
            android:host="${applicationId}"
            android:pathPattern="/spotify.*"
            android:scheme="musicsdk" />
    </intent-filter>
</exercise>

Nevertheless, I am nonetheless encountering the identical error. Any steerage on the way to resolve this difficulty and allow the right authentication circulate on Android can be drastically appreciated. Thanks!

Leave a Reply

Your email address will not be published. Required fields are marked *