简体   繁体   中英

Play Sound on click of Launcher Icon

I have a requirement where upon clicking the launcher icon of my app, it should read out the app name.

I know it's a kind of funny, but is that possible? any directions?

try this in the onCreate/onResume method of your activity: MediaPlayer

Just start the player

mp = new MediaPlayer(); mp.reset();
mp.setDataSource(fileNamePath);
mp.prepare(); mp.start();

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