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

[Q&A]: How can I build MPGO in Android Studio? #471

Closed
1 task done
libregeek opened this issue Sep 12, 2022 · 5 comments
Closed
1 task done

[Q&A]: How can I build MPGO in Android Studio? #471

libregeek opened this issue Sep 12, 2022 · 5 comments
Assignees
Labels
question Further information is requested

Comments

@libregeek
Copy link

What are You thinking?

I am a newbie in Android Development and trying to understand how Music Player Go works under the hood. I cloned the repository on Android Studio and tried to build the application without any changes to the source code. Could you please help me to build and run the app on an emulator?

Code of Conduct

  • I agree to follow this project's Code of Conduct
@libregeek libregeek added the question Further information is requested label Sep 12, 2022
@enricocid
Copy link
Owner

You have to select project folder :)

Senza nome

@libregeek
Copy link
Author

Thanks a lot. It worked.

I am curious how you implemented reading metadata from files. Is there any document which describes the approach you have implemented?

@enricocid
Copy link
Owner

enricocid commented Sep 13, 2022

To get songs and metadata you have to run a query on Android MediaStore

fun queryForMusic(application: Application) =

Official docs:

https://developer.android.com/training/data-storage/shared/media

For bitrate

fun Uri.toBitrate(context: Context): Pair<Int, Int>? {

https://developer.android.com/reference/android/media/MediaExtractor

Albums embedded covers

I just appended the given id (content://media/external/audio/albumart") to the end of the song uri
https://developer.android.com/reference/android/content/ContentUris

😉

@libregeek
Copy link
Author

Thanks for the quick reply. These are really helpful.

@enricocid
Copy link
Owner

enricocid commented Oct 5, 2022

Closing for now.
If you have any questions don't hesitate to add comments 😉

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

No branches or pull requests

2 participants