简体   繁体   中英

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??

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.

Your app is considered as a side load. So you will have to turn on developer mode within the computer.

Settings > Update > Developer

Then select side loading then restart your computer.

This should allow side loading of your app since it's not published. However I would recommend testing on a physical device to make sure all layouts are correct and you can play music from the phone.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM