A (175)

(Tuis.) #1

500 CHAPTER 13: Android Service Class and Threads: Background Processing


Testing the PlayVideo Class with the Nexus One


Now that your Java code is in place in your PlayVideo.java Activity subclass and is error-free, you
can test your PlayVideo Activity using the Eclipse Nexus One AVD emulator. Later, you will refine
your play audio and stop audio icons by “tweaking” the XML UI design definition mark-up, and then
you will be all done!


Right-click on the HelloUniverse project folder and use the Run As ➤ Android Application menu
sequence to launch the Nexus One AVD. When the application launches, click the ActionBar
Overflow Menu (three vertical dots on the right side of the ActionBar) and select the Planet Fly Over
menu option to launch your PlayVideo Activity, shown on the left pane in Figure 13-18.


Figure 13-17. Now that the event handler code block is error-free, use it to create the soundOff stopService( ) call

Free download pdf