5. The following method goes to the indicated website, downloads the music file at the site, and starts playing it. public void playMusic From Web () { Uri file = Uri.parse ("http://www.personal.engin."+ "umd.umich.edu/~kiumi/m1.mp3"); mp = Media Player.create (this, file); mp.start(); } Use the above method to write the main Java class for an Android project called PlayWebMusic. The application goes to a web site named www.special.umich.edu/track1.mp3, downloads an mp3 music file from there, and then plays the music file until the music terminates (the application terminates when the music terminates). Write all methods needed for the class. Use the names indicated above (and additional names if needed) for the class and the methods.

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter9: Advanced Array Concepts
Section: Chapter Questions
Problem 2PE
icon
Related questions
Question

No hand written and fast answer with explanation

 

5. The following method goes to the indicated website, downloads the music file at the site, and
starts playing it.
public void playMusicFrom Web () {
Uri file = Uri.parse ("http://www.personal.engin."+
"umd.umich.edu/~kiumi/m1.mp3");
mp = Media Player.create (this, file);
mp.start();
}
Use the above method to write the main Java class for an Android project called
PlayWebMusic. The application goes to a web site named www.special.umich.edu/track1.mp3,
downloads an mp3 music file from there, and then plays the music file until the music
terminates (the application terminates when the music terminates). Write all methods needed
for the class. Use the names indicated above (and additional names if needed) for the class and
the methods.
Transcribed Image Text:5. The following method goes to the indicated website, downloads the music file at the site, and starts playing it. public void playMusicFrom Web () { Uri file = Uri.parse ("http://www.personal.engin."+ "umd.umich.edu/~kiumi/m1.mp3"); mp = Media Player.create (this, file); mp.start(); } Use the above method to write the main Java class for an Android project called PlayWebMusic. The application goes to a web site named www.special.umich.edu/track1.mp3, downloads an mp3 music file from there, and then plays the music file until the music terminates (the application terminates when the music terminates). Write all methods needed for the class. Use the names indicated above (and additional names if needed) for the class and the methods.
Expert Solution
steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
Unreferenced Objects
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT