Android Programming Tutorials

(Romina) #1

TUTORIAL 23


Media


In this tutorial, we will integrate a video clip, to serve as a placeholder for


some sort of future "helpcast" to assist users with Patchy.


Step-By-Step Instructions........................................................................


First, you need to have completed the previous tutorial. If you are


beginning the tutorials here, or if you wish to not use your existing work,


you can download a ZIP file with all of the tutorial results, and you can copy


the 22-Maps edition of Patchy to use as a starting point.


Step #1: Obtain and Install a Video Clip


First, we need a suitable video clip to serve as our helpcast placeholder. A


320x240 MP4 video file should do nicely. Please, though, respect creators'


copyrights – consider using a Creative Commons-licensed clip, such as one


of these.


For something the size of your typical video clip, you should store it in an


SD card, since space in on-board flash memory is at a premium. We need to


upload the MP4 file there as helpcast.mp4. To do that, either use Eclipse's


file-browsing tools, or use DDMS, or use the adb push command from the


command line. The SD card can be found at either /sdcard or /mnt/sdcard,


depending on your emulator or device.


245
Free download pdf