Skip to content
Advertisement

How to open an app when its related file is clicked in file explorer?

I have made a music player application in android(java). It’s working well but i need to know that whenever i click on a music (.mp3 file) in file manager , music starts getting played in default music player app of my device. I’ve tried to check out the default music player for playing music in my device settings , but my music player app was not getting show there , only phone music player was showing. Now how to fix this ??

Advertisement

Answer

You can click right click the music, then click open with. Assuming you have not published the app you will have to prose for your project file and select your app to open when you click on the music.

If your testing the app use a physical device and play it straight from your phone. Once the app is published and on your phone. File explorer on a computer will not have access to the player in the long run.

It’s always better to test on a physical device so you can make sure everything is correctly laid out.

To test on a device put the phone in developer mode by taping build in settings then about phone and then build repeatedly and turn on OEM and Debug… follow the prompts then plug your phone into the computer.

If you want to test the emulator as a side load then you will have to enable developer mode on the computer by going to settings then update, then select developer mode. Turn it on and restart your computer.

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement