Media Cloud Application for Android
Total Page:16
File Type:pdf, Size:1020Kb
PERSONAL MEDIA CLOUD APPLICATION FOR ANDROID Prajakta Sarurkar B.E., Nagpur University, 2000 PROJECT Submitted in partial satisfaction of the requirements for the degree of MASTER OF SCIENCE in COMPUTER SCIENCE at CALIFORNIA STATE UNIVERSITY, SACRAMENTO SPRING 2012 © 2012 Prajakta Sarurkar ALL RIGHTS RESERVED ii PERSONAL MEDIA CLOUD APPLICATION FOR ANDROID A Project by Prajakta Sarurkar Approved by: __________________________________, Committee Chair Du Zhang, Ph.D. __________________________________, Second Reader Mary Jane Lee, Ph.D. ____________________________ Date iii Student: Prajakta Sarurkar I certify that this student has met the requirements for format contained in the University format manual, and that this project is suitable for shelving in the Library and credit is to be awarded for the project. __________________________, Graduate Coordinator ___________________ Nikrouz Faroughi, Ph.D. Date Department of Computer Science iv Abstract of PERSONAL MEDIA CLOUD APPLICATION FOR ANDROID by Prajakta Sarurkar Recent advances in communication technologies have enabled an exponential growth in connected devices like Android smart phones and tablets. These devices are mainly used for content consumption. However, limited resources available on these devices, as well as always connected internet accessibility makes these devices ideal platforms for cloud computing. This project is an attempt at creating personal media cloud player app for Android smart phone devices. The project uses off the shelf hardware components for private cloud implementation and Java programming over Android to provide full featured media cloud platform. This private media cloud enables users to: Store media files (images/audio/video etc) in the cloud Access the media files from their Android device Additionally, the project aims at providing following features: File browsing Audio streaming (MP3) Video streaming (MP4) v Images (JPEG/PNG) e-radio/ Photo Slide Show The project aims at developing an application that can be used by any Android (version 2.2 and higher) smartphone to implement above mentioned media functionality. , Committee Chair Du Zhang, Ph.D. ______________________ Date vi DEDICATION To my family vii ACKNOWLEDGEMENTS I would like to thank my project advisor Dr. Du Zhang for taking time and giving me guidance through the project. I would also like to thank all the professors who taught me during my masters’ course work. I would like to thank my family for all the support. viii TABLE OF CONTENTS Dedication ......................................................................................................................... vii Acknowledgements .......................................................................................................... viii Table Of Contents .............................................................................................................. ix List Of Figures .................................................................................................................. xii List Of Tables .................................................................................................................. xiii 1 INTRODUCTION .......................................................................................................... 1 1.1 Current state of practice for Media Cloud ............................................................ 1 1.2 Scope of the project .............................................................................................. 2 1.3 Benefits of Media Cloud App .............................................................................. 3 2 BACKGROUND ............................................................................................................ 5 2.1 Current existing Cloud Media Storage ................................................................. 5 2.2 Cloud Fundamentals ............................................................................................. 8 2.3 Cloud APIs ......................................................................................................... 12 2.4 Android Apps ..................................................................................................... 14 2.5 Android application components ....................................................................... 17 2.5.1 Activities ......................................................................................................... 17 2.5.2 Services ....................................................................................................... 18 2.5.3 Content providers ........................................................................................ 18 2.5.4 Broadcast receivers ..................................................................................... 19 3 ARCHITECTURE AND TECHNOLOGY .................................................................. 21 ix 3.1 Basic Architecture of Media Player app ............................................................ 21 3.2 Features ........................................................................................................... 22 3.3 Application ..................................................................................................... 23 4 IMPLEMENTATION DETAILS ................................................................................. 25 4.1 Media cloud ........................................................................................................ 25 4.2 Android APIs .................................................................................................. 28 4.3 Android client ..................................................................................................... 30 4.3.1 Login Screen ............................................................................................... 30 4.3.2 Main Screen ................................................................................................ 31 4.3.3 File View ..................................................................................................... 32 4.3.4 Music player................................................................................................ 33 4.3.5 Image Viewer .............................................................................................. 34 4.3.6 Video player ................................................................................................ 35 4.3.7 File Uploading ............................................................................................ 36 5 PERFORMANCE EVALUATION .............................................................................. 37 6 CONCLUSION AND FUTURE WORK ..................................................................... 39 6.1 Future work ........................................................................................................ 39 6.1.1 Playlist Management ................................................................................... 39 6.1.2 File Sharing ................................................................................................. 39 6.1.3 Folder sync up ............................................................................................. 40 x Appendix Source Code ..................................................................................................... 41 Bibliography ..................................................................................................................... 97 xi LIST OF FIGURES Page Figure 1: Typical cloud configuration ................................................................................ 9 Figure 2: Cloud storage setup using Pogoplug ................................................................. 11 Figure 3: Architecture of Pogoplug device ....................................................................... 12 Figure 4: Architecture of Cloud Media player app ........................................................... 22 Figure 5: Control flow in Cloud Media player app........................................................... 24 Figure 6: Login Screen...................................................................................................... 31 Figure 7: Main Screen ....................................................................................................... 32 Figure 8: File view ............................................................................................................ 33 Figure 9: (A) - Audio player screen, (B) – Radio player screen ....................................... 34 Figure 10: (A) - Image diaglog box, (B) – Loaded image ................................................ 35 Figure 11: File uploading .................................................................................................. 36 xii LIST OF TABLES Page Table 1: Media formats supported by Media Cloud App ................................................... 2 Table 2: Comparative study of various cloud implementations ......................................... 6 Table 3: Pogoplug Specifications ..................................................................................... 11 Table 4: Pogoplug APIs .................................................................................................... 27 Table 5: Android APIs ...................................................................................................... 29 Table 6: Media Cloud app performance evaluation .........................................................