Android Question Play Spotify in the background

andredamen

Active Member
Licensed User
Longtime User
There is a game named Hitster. The app Hitster opens a Spotify song afther reading a QR code. It opens Spotify in the background. You can see this when you scroll the phone screen from top to down. The Hitster app stays on the front.
Is there anyway I can do this with my own app? I open the spotifysong with i.SetComponent("com.spotify.mobile.android.ui") but then spotify opens on the top.
I have asked this about a year ago in this forum and still I couldn't make it possible. Now I fount the app from Hitster and there I see the way I want it.
Can anybody help me please?
 

andredamen

Active Member
Licensed User
Longtime User
Yes I did, but it is almost Java and I can not program in Java. Only in B4A. So I hoped that someone in the B4A community could help me.
 
Upvote 0

asales

Expert
Licensed User
Longtime User
I saw that you put your question more than a year ago.

As there are no other answers in this new thread too, I think that:
a) there is no one interest in this feature (or they didn't see the posts)
b) if is there no one, maybe you can hire someone to made a wrapper of the API to you
c) or you can try check how Java works with B4X and try to use the Java code or created your own wrapper, posting the doubts and the progress of the work here to get help.
 
Upvote 0

Cableguy

Expert
Licensed User
Longtime User
Yes I did, but it is almost Java and I can not program in Java. Only in B4A. So I hoped that someone in the B4A community could help me.
Link the Java cade/lib you found or even a github repo if there's one, and maybe someone here will give it a try.... as it is usually the case.
Working with java in B4A is much simpler that it seems, as you can just (almost every time) copy/paste the java code and make some minor changes for it to work in B4A with the inclusion of a #if java block
 
Upvote 0
Top