Lecture 7: Media Player Topics: Media Player, Async prepare

Slides:



Advertisements
Similar presentations
Windows 7 demo.
Advertisements

MicroCast: Cooperative Video Streaming on Smartphones Lorenzo Keller, Anh Le, Blerim Cic, Hulya Seferoglu LIDS, Christina Fragouli, Athina Markopoulou.
Global MP3 Geoffrey Beers Deborah Ford Mike Quinn Mark Ridao.
                      Digital Audio 1.
CNIT 132 – Week 9 Multimedia. Working with Multimedia Bandwidth is a measure of the amount of data that can be sent through a communication pipeline each.
TouchDevelop Chapter 5-7 Chapter 5 Audio Chapter 6 Camera, Graphics and Video Chapter 7 Sensors Mengfei Ren.
Cosc 5/4730 Multimedia Part 1: Audio media. PLAYING AUDIO Android android.media.
Group 8: Dylan Lentini (AE), Mandy Minuti (WSE), Jean Paul Galea (TL)
John Meilak Reuben Sant Jason Farrugia Media API Web Science APT 2007/2008.
Java Audio.
Bush Library Proposal By Yvana. Introduction The museum will assume that people have their own wireless devices such as iPods, cell phones, and MP3 players.
Electrical & Computer Engineering Wireless Music Sharing Team Ganz: Mike O’Malley™ Ben LaPointe Erik Christensen Nhat Khai Nguyen.
CS371m - Mobile Computing Audio.
1 NETE4631 Communicating with the Cloud and Using Media and Streaming Lecture Notes #14.
Basic Audio and Video. Audio Primary components – Audio file stored in ‘raw’ folder within ‘res’ folder ‘raw’ directory must be created while many formats.
Multimedia.
© 2009 Research In Motion Limited Advanced Java Application Development for the BlackBerry Smartphone Trainer name Date.
HTML5. What is HTML5? HTML5 will be the new standard for HTML. HTML5 is the next generation of HTML. HTML5 is still a work in progress. However, the major.
CIS 102Introduction to Hardware and Software Chapter 2 Input and Output part 3 output devices.
Farryl Kaplan, Zane Galyan, Jon Marshall, Courtney Carmichael.
ACE-HIGH MP3 WAV WMA OGG Converter By :: Natharat Kaewrawang
May be reproduced for classroom use. © Classroom Connect Computer Parts and Vocabulary.
11 Adding Sounds Session 7.1. Session Overview  Find out how to capture and manipulate sound on a Windows PC  Show how sound is managed as an item of.
Μ [sic] patent liability wesley :: chris :: dave :: josh.
Integrating Technology in Today’s Classroom Presented by: TJ Mears SEE 2010 Huntington, IN TJ Mears - SEE 2010.
Creating a Podcast. What is a podcast? A podcast is a media file that is shared over the Internet that can be played on mobile devices i.e. iPods or MP3.
ISA 673 Operating Systems Security Exploring the Android Platform.
Podcasting in teaching & learning
Podcasting The Basics. The How To! Requirements –Microphone Blue Tooth Headset USB Headset Built in Mic –Laptop/computer –Software Audacity Lame File.
Sound and the Web. Transferring sound Download Progressive Download Stream.
CS378 - Mobile Computing Audio.
Mission Computers Inc.  In 2013 ◦ 1,000,000,000 phones were hacked  because of ◦ lack of a secure password or ◦ no password at all Source:
MUSIC GENRE JUKEBOX. CLIENT SPECIFICATIONS Audio Player Create, delete, and modify play lists Play, pause, stop, skip, fast forward, and rewind Send Streaming.
Multimedia. Audio,vedio and Images End user typically refer to vedio/audio using the respective file format MP4 or AVI(audio vedio interleave) Developer.
 Digital Rights Management  To prevent you from making copies of audio files you have downloaded on your personal media player. It also prevent from.
Lecture 7: Media Player Topics: Media Player, Async prepare Date: Mar 3, 2016.
CS371m - Mobile Computing Audio. Audio on Device Devices have multiple audio streams: – music, alarms, notifications, incoming call ringer, in call volume,
GStreamer in OpenOffice.org? Cédric Bosdonnat, Radek Doulík.
MEDIAKIOSK iPhone/iPod Touch Application For Exhibitions.
How to Convert/Transfer iTunes to Sony Walkman through Mac/Windows? All rights reserved— I got my kids.
© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.
Audio and Haptic Feedback
Sound and music.
Nat 4/5 Computing Science Interfaces
Network Controllable MP3 Player
Android Application Audio 1.
Objective % Explain concepts used to create digital audio.
Website Power Points On My Site Select a Section that has Power Points (this is one but others have them )
Lab 3: More Phone-Based Techniques
Lecture 7: Service Topics: Services, Playing Media.
Android Boot Camp for Developers Using Java, 3E
Chapter 4: HTML5 Media - <video> & <audio>
“Lingo” of Podcasting MP3 Player – is a portable device that is usually smaller than a cassette tape. Often associated with downloading music from the.
"Digital Media Primer" Yue-Ling Wong, Copyright (c)2013 by Pearson Education, Inc. All rights reserved.
Yongchang, Kai, Justin, Rama
The all-new Omni
David Zepeda Information Architecture and Design I Fall 2005
Objective % Explain concepts used to create digital audio.
                      Digital Audio 1.
3.01F Publishing Animated Videos
How to Connect to COMAND
Cell Phone Safety Subtitle.
Press ESC for Startup Options © Microsoft Corporation.
HTML 5 Training HTML 5 SYMANTICS [Notes to trainer:
Network Controllable MP3 Player
Lecture 7: Service Topics: Services, Broadcast Receiver, Playing Media.
Convergence in Technology
Objective Explain concepts used to create digital audio.
Chapter 9 Audio.
CSCI 360 Final Review Dr. X.
Presentation transcript:

Lecture 7: Media Player Topics: Media Player, Async prepare Date: Feb 28, 2017

References (study these) http://developer.android.com/guide/topics/media/mediaplayer.html http://developer.android.com/images/mediaplayer_state_diagram.gif

Media Playback Play Audio/Video from: Support for Output Devices: Application Resources (raw resource) File System Data Stream over a Network. Support for Output Devices: Speaker Bluetooth Headset However, you cannot play sound files in the conversation audio during a phone call.

Media Playback API Two important classes – MediaPlayer AudioManager

Using Media Player API Permissions: INTERNET, WAKE_LOCK Playing from Local Resource: Playing from a local URI:

Using Media Player API Playing from an Internet URL Must be progressively downloadable Supported media format: http://developer.android.com/guide/appendix/media-formats.html

Media Player State Diagram

Asynchronous Preparation For files: It is “OK” to use prepare() For streams: You should always use prepareAsync() Implement MediaPlayer.OnPreparedListener mp.setOnPreparedListener(this); public void onPrepared(MediaPlayer mp) { mp.start(); } BLOCKING NON- BLOCKING

Code practice Create a MediaPlayer and play a song. Modify the code to prepare a media player asynchronously.

Using Wake Locks When device sleeps, the system tries to shut off features that are not necessary – including CPU and WiFi hardware. Use “Wake Locks” to let the system know you need some features even if the phone is idle. mp.setWakeMode(getApplicationContext(), PowerManager.PARTIAL_WAKE_LOCK); WifiManager.WifiLock wifiLock = ((WifiManager) getSystemService(Context.WIFI_SERVICE)) .createWifiLock(WifiManager.WIFI_MODE_FULL, "mylock"); wifiLock.acquire();

Playing songs in a background service