Android MusicKit SDK - starting a song from a specific position

Hi,


I've noticed that the MusicKit documentation contains the definition of the "setItemPositionProvider" method, which allows you to set the starting position of a media item in the Apple Music player's queue. But this method is not present in the 1.0.0 version of the SDK, which launched on 31 July 2019. Is there any other way to set the start point of a song, such as we do in iOS with the currentPlaybackTime property?


The seekTo method is extremely flawed, as it takes a long time to buffer the song and to actually get to the desired point of the song.


Also, is there any way of using the player without a foreground service?

Replies

When I try to create a MediaPlayerController object:


var player: MediaPlayerController = MediaPlayerControllerFactory.createLocalController(applicationContext, AppleMusicTokenProvider(applicationContext))


I get the following exception:

java.lang.UnsatisfiedLinkError: No implementation found for int com.apple.android.music.foothill.javanative.FootHillConfig.config(java.lang.String) (tried Java_com_apple_android_music_foothill_javanative_FootHillConfig_config and Java_com_apple_android_music_foothill_javanative_FootHillConfig_config__Ljava_lang_String_2)
        at com.apple.android.music.foothill.javanative.FootHillConfig.config(Native Method)
        at com.apple.android.music.playback.c.g.a(MusicSDK:23)
        at com.apple.android.music.playback.c.b.(MusicSDK:182)
        at com.apple.android.music.playback.c.f.a(MusicSDK:48)
        at com.apple.android.music.playback.controller.a.(MusicSDK:159)
        at com.apple.android.music.playback.controller.MediaPlayerControllerFactory.createLocalController(MusicSDK:62)
        at com.apple.android.music.playback.controller.MediaPlayerControllerFactory.createLocalController(MusicSDK:35)


It doesn't matter if I use the application's context, the activity or the activity's context. How can I solve this without using a bunch of other classes? If I create a foreground service and use the Android's MediaController and MediaBrowser and some other dependencies, yes, I can make it work, but the setup is way too strenuous for the app and too buggy for a simple play/pause/stop/seekTo (I will probably need to loop the song also).