Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not listed as "media player" application #12

Open
cziss opened this issue Dec 3, 2024 · 16 comments
Open

Not listed as "media player" application #12

cziss opened this issue Dec 3, 2024 · 16 comments

Comments

@cziss
Copy link

cziss commented Dec 3, 2024

Hi, I've noticed that player is not recognized as "media player" application. So you can not make media routines etc. I have Android 14, Samsung with One UI 6.1.

@TJYSunset
Copy link
Owner

Can you provide an example of any open source media player that supports said feature? I can find absolutely zero information on how to integrate with Bixby, nor do I own a Samsung device.

Alternatively, which operations can Bixby perform on media players? I suspect Bixby just uses standard Android intents, but Android's docs are bad at listing everything available.

@cziss
Copy link
Author

cziss commented Dec 3, 2024

I don't meant Bixby. Just routines similar on like plain Android. Also player is not listed in Android auto (even also if "unknown sources" is setted up in developers menu). I've used Metro player was listed as "media player" in routines and also in Android auto.

Routines can set different equaliser or Dolby Atmos etc. when media player playing.

@TJYSunset
Copy link
Owner

TJYSunset commented Dec 3, 2024

I've supposedly marked the app as a music player, but implemented non of the intents (because they either look irrelevant or have zero documentation). How does this build look like in your use case?

https://github.com/user-attachments/files/17994718/app-release.zip

@cziss
Copy link
Author

cziss commented Dec 3, 2024

Unfortunately it's still not listed as "media player" in routines or Android Auto.

@TJYSunset
Copy link
Owner

Could you try this build?
https://github.com/TJYSunset/Phocid/releases/tag/v20241204

Sorry, but there's no information on the entire internet about this topic, and I couldn't find what you've mentioned in the official Android Auto emulator. (The emulator refuses to display any media files at all, the music files I uploaded disappears after reboot, and Metro Player straight up crashes after a splash screen.)

@cziss
Copy link
Author

cziss commented Dec 4, 2024

No, it also not helped. Ok, understand - I also did some internet research, but without any useful information. Strange is, that audiobook player Voice, VLC, or NewPipe somehow managed to accomplish to be listed as media app. Even Libera FD or Total Commander, which plays media marginally.

@TJYSunset
Copy link
Owner

TJYSunset commented Dec 4, 2024

Declared VIEW and MEDIA_PLAY_FROM_SEARCH intents after inspecting NewPipe (but doesn't actually handle them, I don't want to write useless code before knowing what exactly is needed). Does this work?

app-release.zip

If it doesn't, here's a build that additionally declares MEDIA_BUTTON:

app-release.zip

@cziss
Copy link
Author

cziss commented Dec 4, 2024

I've tried both builds, but without desired effect :(. Still not listed in routines as media app nor in Android Auto.

@TJYSunset
Copy link
Owner

Some more random attempts:

Simply marking service as exported:
app-release.zip

Adding even more intents:
app-release.zip

Do you have other apps that can utilize media players similar to routines? I just can't get this Android Auto emulator running (looks like Google really doesn't want to have any Android Auto developers.)

@cziss
Copy link
Author

cziss commented Dec 4, 2024

I've tried it, but still no success. Yes, that I've mentioned above, all are on F-Droid. Well I thing, that if app is "media player" it's enough to be listed in Android Auto (when you have unknown sources ON). At least for Voice or Metro player.

@TJYSunset
Copy link
Owner

TJYSunset commented Dec 4, 2024

I meant any other apps that can scan what media players you have installed, so I can test this functionality myself.

@cziss
Copy link
Author

cziss commented Dec 4, 2024

Sorry. No, I don't know other apps. I think, that it most by done somehow by Android itself.

@cziss
Copy link
Author

cziss commented Dec 5, 2024

Hi, I've tried to ask how to solved it in Voice app, here.

@ulipo
Copy link

ulipo commented Dec 20, 2024

I've noticed the same issue with Bluetooth connect & play app:
Phocid is not listed in media players, it appears if I check "all apps" in configuration but still won't play at bluetooth connection (it works with Phonograph, tho).

@TJYSunset
Copy link
Owner

v20241221 should now be listed in the "Bluetooth connect & play" app as a music player, but will not start playing automatically like Phonograph does because of reasons* (LineageOS' built-in music app doesn't anyway).

*reasons: Phonograph seems to have a self-contained service that starts when it receives an intent from "Bluetooth connect & play". Phocid has complex additional logic tied to its UI because of more reasons**, so it has to start an activity instead. Android disallows starting activities from background.

**more reasons: Google made fancy new frameworks that you "should" use, which lack absolutely every function (like getting and setting the shuffle order). Phocid uses twisted hacks to regain lacking functions, violating the frameworks' interop contracts.

@ulipo
Copy link

ulipo commented Dec 21, 2024

Damn, Google is making very difficult to own a smartphone!
I can confirm it is listed in th Bluetooth app now, thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants