Chapter 13 Add Multimedia to Your MIDlets
|
|
- Beverley Rose
- 6 years ago
- Views:
Transcription
1 Chapter 13 Add Multimedia to Your MIDlets The Mobile Media API (MMAPI), which extends the functions of Java 2 Platform, Micro Edition (J2ME), allows easy and simple access and control of basic audio and multimedia resources on devices with limited memory and processing capabilities. This chapter is intended to get you an overview of the MMAPI, starting with an explanation of the MMAPI architecture, packages, and objects, and then showing you how to create an audio- and video-capable MIDlet. 1. Introduction to the Mobile Media API (MMAPI) This section offers a general overview of MMAPI. You'll look at MMAPI features, multimedia processing, and the MMAPI architecture. What is MMAPI? MMAPI is an implementation of the Java Community Process's JSR 135. As a simple and lightweight optional package, it gives Java developers access to native multimedia services available on a given device. MMAPI Features The MMAPI brings the following capabilities to J2ME: Scalability: The API brings scalable sound and multimedia support capabilities to J2ME. It is aimed at the CLDC, Connected Device Configuration (CDC), and profiles based on CDC and CLDC. Small footprint: The API allows easy and simple access and control of basic audio and multimedia resources on devices with limited memory and processing capabilities. Support for tone generation, playback, and recording of time-based media: The API supports any time-based audio or video content. Protocol and content independence: The API is not biased toward any specific content type or protocol. Ability to subset: Developers can limit application support to particular types of content -- like basic audio, for example. Extensibility: New features can be added easily without breaking older functions. More importantly, additional formats can be easily supported, and the framework is in place for additional controls. MIT3447 OOPA Chapter 13 1 Prepared by K.T. NG
2 Options for implementers: The API offers features for different purposes. The API is designed to allow implementers to leave some features unimplemented if they cannot be supported in a particular application. Multimedia Processing There are two parts to multimedia processing: 1. Protocol handling: Reading data from a source such as a file or a streaming server into a media-processing system. 2. Content handling: Parsing or decoding the media data and rendering it to an output device such as an audio speaker or video display. MMAPI Architecture To facilitate protocol and content handling operations, the MMAPI provides the following highlevel object types: DataSource Player Control Manager DataSource A DataSource encapsulates protocol handling by hiding the details of how the data is read from its source. javax.microedition.media.protocol.datasource is the abstract parent class for all data sources in the Mobile Media API. Player A Player reads the data from a DataSource, processes it, and renders it to an output device. A Player knows how to interpret media data, be it MP3 audio data or a QuickTime movie. Players are represented by implementations of the javax.microedition.media.player interface. Utility methods in DataSource enable the Player object to handle the content. Control One or more Controls can be used to modify the behavior of a Player. You can get the Controls from a Player instance and use them while the Player is rendering data from media. For example, you could use a VolumeControl to modify the volume of a sampled audio Player. MIT3447 OOPA Chapter 13 2 Prepared by K.T. NG
3 Controls are represented by implementations of the javax.microedition.media.control interface; specific control sub-interfaces are in the javax.microedition.media.control package. To enable video capability in a MIDlet, you need to obtain a VideoControl. The initdisplaymode() method initializes the mode that determines how the video is displayed and must be called before video can be displayed. Potential modes include USE_GUI_PRIMITIVE, USE_DIRECT_VIDEO, and implementation-specific modes. USE_GUI_PRIMITIVE defines how the GUI is displayed. The mode USE_DIRECT_VIDEO defines how the video is displayed. Manager MMAPI specifies a third object, a factory mechanism known as the Manager, that enables an application to create Players from DataSources and InputStreams. The javax.microedition.media.manager class is the access point for obtaining systemdependent resources such as Players for multimedia processing. The relationship between the various components is illustrated in Figure 1. Figure 1. MMAPI components 2. Using the Mobile Media API In this section, we ll discuss MMAPI's key methods. playtone() The Manager.playTone () method, illustrated in Listing 1, plays a single tone or a very short sequence. MIT3447 OOPA Chapter 13 3 Prepared by K.T. NG
4 Listing 1. playtone() public static void playtone (int note, int duration, int volume) throws MediaException The duration is specified in milliseconds, and the volume ranges from 0 (silent) to 100 (loud). The note is specified as a number, as in a MIDI file, where 60 is middle C and 69 is a 440 Hz A. Listing 2 illustrates playtone() in action. Listing 2. playtone() in Action try Manager.playTone(60, 200, 90); catch (MediaException ex) System.out.println("can't play tone"); createplayer() The real magic of the Mobile Media API is exposed through Manager's createplayer() method. There are three different versions of this method; which version you'll use depends on the way you want get to the media data. The method in Listing 3 lets you create a Player by accessing media data from an InputStream. The type argument specifies the content type of the input media. For example, you'd use audio/midi for an audio MIDI. If null is used, Manager attempts to determine the type. Listing 3. Creating a Player From an InputStream public static Player createplayer(inputstream stream, String type) throws IOException, MediaException The version of createplayer() in Listing 4 lets you create a Player from a DataObject, an object that speaks a protocol to get access to media data. Listing 4. Creating a Player From a DataSource public static Player createplayer(datasource source) throws IOException, MediaException The simplest way to obtain a Player is to use the version of createplayer() in Listing 5 and just pass in a string that represents media data. MIT3447 OOPA Chapter 13 4 Prepared by K.T. NG
5 Listing 5. Creating a Player From a URL public static Player createplayer(string locator) throws IOException, MediaException MMAPI determines which protocol to use and gets the media data to the Player. For instance, you might specify an audio file on a Web server, as in Listing 6. Listing 6. Specifying an Audio File on a Server Player p = Manager.createPlayer(" The application uses the methods of the returned Player to control the retrieval and playback of time-based media. Life cycle methods: States of a Player The Player's life cycle consists of five states: 1. UNREALIZED: When a Player is created, it is in the UNREALIZED state. 2. REALIZED: Calling realize() moves the Player to the REALIZED state and initializes the information it needs to acquire media resources. For example, if a Player is rendering an audio file from an HTTP connection to a server, that Player reaches the REALIZED state after the HTTP request is sent to the server, the HTTP response is received, and the DataSource is ready to begin retrieving audio data. 3. PREFETCHED: Calling prefetch() moves the Player to the PREFETCHED state, establishes network connections for streaming data, and performs other initialization tasks. The state is achieved when the Player has read enough data to begin rendering. 4. STARTED: Calling start() causes a transition to the STARTED state, where the Player can process data. When the data is being rendered, the Player's state is STARTED. When it finishes processing (that is, when it reaches the end of a media stream), it returns to the PREFETCHED state. 5. CLOSED: Calling close() moves the player to the CLOSED state. The application uses the methods of the returned Player to control the retrieval and playback of time-based media. The Player's five states and the state transition methods are summarized in Figure 2. MIT3447 OOPA Chapter 13 5 Prepared by K.T. NG
6 Figure 2. States of a Player getcontrol() A Player provides controls specific to the particular types of media it processes. An application uses getcontrol() to obtain a single control, or getcontrols() to get an array of them. Public Control getcontrol(java.lang.string controltype) The controltype specifies the type of Control to be returned. For example, if a Player invokes getcontrol() with type MIDIControl, it gets back a MIDIControl. Similarly, when VideoControl is specified, the Player gets a VideoControl. If a control type is not supported, getcontrol() returns null. Supported Formats MMAPI supports several audio and video formats. Formats supported by both MMAPI and the J2ME Wireless Toolkit are: Audio: PCM and WAV MIDI: Type 0 (single track), Type 1 (multiple tracks), and SP-MIDI Video: MPEG-1 The Mobile Media API doesn't require any specific content types or protocols, but you can find out at run time what formats are supported by a particular application by calling Manager's getsupportedcontenttypes() and getsupportedprotocols() methods. If you ask Manager to give you a Player for a content type or protocol that is not supported, it will throw an exception. 3. MMAPI in Action: Building a Sample Application MIT3447 OOPA Chapter 13 6 Prepared by K.T. NG
7 In this section, you learn to develop a MIDlet with multimedia capabilities. It shows the application of the various MMAPI functions I discussed in previous sections. The MIDlet plays a simple tone, an audio clip from an URL, a video clip from an URL, and audio from a resource file. The source code is in Listing 7; it should be saved in a file named MediaMIDlet.java in the <WTK Home>\apps\MediaMIDlet\src directory. Listing 7. A Multimedia MIDlet import javax.microedition.midlet.*; import javax.microedition.lcdui.*; import javax.microedition.media.*; import javax.microedition.media.control.*; import java.util.*; import java.io.*; /** * * This is a demo midlet to show the basic audio functionalities, to * play a Tone, URL wave file and Resource file. * */ public class MediaMIDlet extends MIDlet implements CommandListener, Runnable private Player player = null; private Command exitcommand = new Command("Exit", Command.EXIT, 1); private Command playcommand = new Command("Play", Command.ITEM, 1); private ChoiceGroup menulist = new ChoiceGroup("Play List", Choice.EXCLUSIVE); private Display display; private Form form = new Form("The Mobile Media"); private static String mode=""; public MediaMIDlet() super(); display = Display.getDisplay(this); initplaylist(); form.append(menulist); form.addcommand(exitcommand); form.addcommand(playcommand); form.setcommandlistener(this); display.setcurrent(form); public void run() MIT3447 OOPA Chapter 13 7 Prepared by K.T. NG
8 try if ("URL".equals(MediaMIDlet.mode)) player = Manager.createPlayer(" player.realize(); player.prefetch(); player.start(); else if ("RESOURCE".equals(MediaMIDlet.mode)) String loc = "pattern.mid"; InputStream is = getclass().getresourceasstream(loc); player = Manager.createPlayer(is, "audio/midi"); player.realize(); player.prefetch(); player.start(); else if ("VIDEO".equals(MediaMIDlet.mode)) player = Manager.createPlayer(" player.realize(); VideoControl videocontrol = (VideoControl)player.getControl("VideoControl"); if(videocontrol!= null) Item video = (Item)videoControl.initDisplayMode( videocontrol.use_gui_primitive, null); Form v = new Form("Playing Video..."); v.append(video); display.setcurrent(v); player.prefetch(); player.start(); player.realize(); player.prefetch(); player.start(); catch (IOException iex) iex.printstacktrace(); catch (MediaException ex) System.out.println("can't create player"); catch (Throwable t) player = null; public void startapp() public void pauseapp() MIT3447 OOPA Chapter 13 8 Prepared by K.T. NG
9 public void start() Thread t = new Thread(this); t.start(); /** * Destroy must cleanup everything not handled * by the garbage collector. */ public void destroyapp(boolean unconditional) display.setcurrent(null); public void commandaction(command c, Displayable s) if (c == exitcommand) destroyapp(true); notifydestroyed(); else if (c == playcommand) int i = menulist.getselectedindex(); if (i == 0) // Simple tone try Manager.playTone(60, 200, 90); catch (MediaException ex) System.out.println("can't play tone"); else if (i == 1) MediaMIDlet.mode="URL"; start(); else if (i == 2) MediaMIDlet.mode="RESOURCE"; start(); else if (i == 3) MediaMIDlet.mode="VIDEO"; start(); private void initplaylist() menulist.append("play Simple Tone",null); menulist.append("play URL",null); menulist.append("play Resource",null); menulist.append("play Video",null); 4. Analyzing the Multimedia MIDlet MIT3447 OOPA Chapter 13 9 Prepared by K.T. NG
10 Now let's see the details of how the code works. The lines in Listing 8 indicate the required packages for MIDlet media function. Listing 8. MMAPI Imports import javax.microedition.midlet.*; import javax.microedition.lcdui.*; import javax.microedition.media.*; import javax.microedition.media.control.*; import java.util.*; import java.io.*; The MIDlet implements the CommandListener and Runnable interfaces, as illustrated in Listing 9. Listing 9. MMAPI Interfaces public class MediaMIDlet extends MIDlet implements CommandListener, Runnable CommandListener ensures that the MIDlet responds to commands like Play and Exit, as you can see in Listing 10. Listing 10. MIDlet Command Implementation private Command exitcommand = new Command("Exit", Command.EXIT, 1); private Command playcommand = new Command("Play", Command.ITEM, 1);... public void commandaction(command c, Displayable s) if (c == exitcommand) destroyapp(true); notifydestroyed(); else if (c == playcommand) // Play media from URL or Resource When a MIDlet implements a CommandListener, it must overwrite the commandaction(command c, Displayable s) method. The application creates the commands Play and Exit. The Exit command quits the application. On receiving the Play command, the application determines the selected menu option and behaves accordingly. The MIDlet implements Runnable to create a thread. In order to avoid a deadlock on networking and I/O operations, you should run a Player on a different thread from the MIDlet. To MIT3447 OOPA Chapter Prepared by K.T. NG
11 implement Runnable, you need to overwrite the run() method. All this is illustrated in Listing 11. Listing 11. Multithreaded Approach public void commandaction(command c, Displayable s) // Get selected option start(); public void start() Thread t = new Thread(this); t.start();... public void run() // Create Player based on media The initplaylist() method builds the initial menu, menulist, that is displayed on launch of the MIDlet, as shown in Listing 12. Listing 12. MIDlet List of Options private ChoiceGroup menulist = new ChoiceGroup("Play List",Choice.EXCLUSIVE);... private void initplaylist() menulist.append("play Simple Tone",null); menulist.append("play URL",null); menulist.append("play Resource",null); menulist.append("play Video",null); When the first option, Play Simple Tone, is selected, Manager.playTone() is called and a simple tone is played. When the second option, Play URL, is selected, the mode is set to URL. When the third option, Play Resource, is selected, the mode is set to RESOURCE. When the fourth option, Play Video, is selected, the mode is set to VIDEO. With all the options, the start() method is called to create a new thread. The run() method of the thread determines whether to create a Player from a URL, Resource, or Video, depending on the mode value: If the mode is URL, Manager.createPlayer(url) is called. The createplayer() method takes care of determining the type of media data. Listing 13. MIDlet Options: Play URL if ("URL".equals(MediaMIDlet.mode)) player = MIT3447 OOPA Chapter Prepared by K.T. NG
12 Manager.createPlayer(" player.realize(); player.prefetch(); player.start(); If the mode is RESOURCE, the MIDlet forms an InputStream from the indicated location. In that case, Manager.createPlayer() takes the InputStream and related audio type as parameters and creates the Player. Listing 14. MIDlet Options: Play RESOURCE if ("RESOURCE".equals(MediaMIDlet.mode)) String loc = "pattern.mid"; InputStream is = getclass().getresourceasstream(loc); player = Manager.createPlayer(is, "audio/midi"); player.realize(); player.prefetch(); player.start(); If the mode is VIDEO, Manager.createPlayer(url) is called. After the player has been created, additional steps are required to initialize the phone screen to display the video, as illustrated in Listing 15. Listing 15. Initialization for a Video Display if ("VIDEO".equals(MediaMIDlet.mode)) player = Manager.createPlayer(" player.realize(); VideoControl videocontrol = (VideoControl)player.getControl("VideoControl"); if(videocontrol!= null) Item video = (Item)videoControl.initDisplayMode( videocontrol.use_gui_primitive, null); Form v = new Form("Playing Video..."); v.append(video); display.setcurrent(v); player.prefetch(); player.start(); MIT3447 OOPA Chapter Prepared by K.T. NG
13 In all cases, MediaException and IOException should be properly handled. MediaException is thrown only if the Player cannot be created. On the other hand, IOException is thrown if an invalid URL or InputStream cannot be formed. A Throwable object takes care of any thread-related exceptions. Listing 16 outlines the basic methods in the MIDlet that need to be defined: startapp() to take care of any startup activities, pauseapp() to take care of activities while the MIDlet is paused, and destroyapp() to perform cleanup activities not handled by the garbage collector. Listing 16. MIDlet-Related Methods public void startapp()... public void pauseapp()... public void destroyapp(boolean unconditional) display.setcurrent(null); Now you understand how the code works. In the next section, you'll see what the application looks like in action. 5. Running the MIDlet The J2ME Wireless Toolkit comes with MMAPI, along with a mobile device emulator on which you can run the sample code. Start by invoking the Wireless Toolkit's Ktoolbar; on Windows, you can do this by choosing Start > Sun Java Wireless ToolKit 2.2 > KToolbar. Create a project by selecting New Project. Enter a name for the project as shown in Figure 3. Figure 3. Create a project After the project is created, create a Java file with the same name as the MIDlet class name in the <WTK Home>\apps\MediaMIDlet\src directory. Build the project by choosing Build in KToolbar, and then choose Run to run it. Figure 4 illustrates the running MIDlet in the emulator. Navigate to each of the options, and then select each MIT3447 OOPA Chapter Prepared by K.T. NG
14 one and press Play to hear the different tones. You can also select the Video option to play a video clip, as shown in Figure 5. The MIDlet developed here plays the following resources when options 2 and 4 are selected: In order to run option 3, the MIDI file available in this chapter should be saved in the <WTK Home Directory>\apps\MediaMIDlet\res directory. Figure 4. Multimedia MIDlet menu Figure 5. Multimedia MIDlet playing a video MIT3447 OOPA Chapter Prepared by K.T. NG
15 Summary You've now seen how a MIDlet can incorporate a number of multimedia capabilities: playing various tunes, playing a WAV file from an URL, and playing a local MIDI file. You also saw how a video clip can be displayed on the phone screen. While these examples are simple, they have illustrated the powerful abilities that MMAPI can add to your mobile Java applications. MIT3447 OOPA Chapter Prepared by K.T. NG
Mobile Information Device Profile (MIDP) Alessandro Cogliati. Helsinki University of Technology Telecommunications Software and Multimedia Laboratory
Multimedia T-111.5350 Mobile Information Device Profile (MIDP) Alessandro Cogliati Helsinki University of Technology Telecommunications Software and Multimedia Laboratory 1 Outline Java Overview (Editions/Configurations/Profiles)
More informationJ2ME crash course. Harald Holone
J2ME crash course Harald Holone 2006-01-24 Abstract This article gives a short, hands-on introduction to programming J2ME applications on the MIDP 2.0 platform. Basic concepts, such as configurations,
More informationDAY 3 J2ME March 2007 Aalborg University, Mobile Device Group Mobile Phone Programming
DAY 3 J2ME Mobile Phone Programming Module 2 Micro (J2ME) Overview Introduction J2ME architecture Introduction 1 J2ME Key Factors Portability: Write once run anywhere Security: Code runs within the confines
More informationMMAPI (Mobile Media API) Multimedia Framework for Mobile Devices
MMAPI (Mobile Media API) Multimedia Framework for Mobile Devices Zohar Sivan IBM Research Laboratory in Haifa IBM Labs in Haifa MMAPI Objectives Provide a standards-based Java multimedia framework for
More informationAccessing DB2 Everyplace using J2ME devices, part 1
Accessing DB2 Everyplace using J2ME devices, part 1 Skill Level: Intermediate Naveen Balani (naveenbalani@rediffmail.com) Developer 08 Apr 2004 This two-part tutorial assists developers in developing DB2
More informationWho am I? Wireless Online Game Development for Mobile Device. What games can you make after this course? Are you take the right course?
Who am I? Wireless Online Game Development for Mobile Device Lo Chi Wing, Peter Lesson 1 Email: Peter@Peter-Lo.com I123-1-A@Peter Lo 2007 1 I123-1-A@Peter Lo 2007 2 Are you take the right course? This
More informationOverview. 2
Graphics and Sound Overview Images Raw Images Encoded Images Drawing and Rendering Images Creating a Media Player Working with Blackberry Media Player Rich Media Playing Rich Media Content http://cmer.cis.uoguelph.ca
More informationWireless Java Technology
Wireless Java Technology Pao-Ann Hsiung National Chung Cheng University Ref: http://developers.sun.com/techtopics/mobility/learning/tutorial/ 1 Contents Overview of Java 2 Platform Overview of J2ME Scope
More informationMobile Devices in Software Engineering. Lab 3
Mobile Devices in Software Engineering Lab 3 Objective The objective of this lab is to: 1. Test various GUI components on your device 2. Continue to develop application on mobile devices Experiment 1 In
More informationMobile Devices in Software Engineering. Lab 2
Mobile Devices in Software Engineering Lab 2 Objective The objective of this lab is to: 1. Get you started with network based mobile applications 2. Get you started with persistent storage on mobile devices
More informationJ2ME With Database Connection Program
J2ME With Database Connection Program Midlet Code: /* * To change this template, choose Tools Templates * and open the template in the editor. package hello; import java.io.*; import java.util.*; import
More informationTAMZ. JavaME. MIDlets. Department of Computer Science VŠB-Technical University of Ostrava
MIDlets 1 MIDlet A MIDlet is a Java program for embedded devices, more specifically the virtual machine. Generally, these are games and applications that run on a cell phone. MIDlets will (should) run
More informationLab Exercise 4. Please follow the instruction in Workshop Note 4 to complete this exercise.
Lab Exercise 4 Please follow the instruction in Workshop Note 4 to complete this exercise. 1. Turn on your computer and startup Windows XP (English version), download and install J2ME Wireless Toolkit
More informationMobile Application Development. Introduction. Dr. Christelle Scharff Pace University, USA
Mobile Application Development Introduction Dr. Christelle Scharff cscharff@pace.edu Pace University, USA Objectives Getting an overview of the mobile phone market, its possibilities and weaknesses Providing
More informationJava 2 Micro Edition Server socket and SMS
Java 2 Micro Edition Server socket and SMS F. Ricci Content Other Connection Types Responding to Incoming Connections Security Permissions Security domains Midlet signing Wireless Messaging Responding
More informationTechnical Manual. Motorola C381p Handset J2ME Developer Guide. Version 01.00
Technical Manual Motorola C381p Handset J2ME Developer Guide Version 01.00 Table of Contents Table of Contents TABLE OF CONTENTS... 2 TABLE OF FIGURES... 6 INDEX OF TABLES... 7 TABLE OF CODE SAMPLES...
More informationSoftware Development & Education Center. Java Platform, Micro Edition. (Mobile Java)
Software Development & Education Center Java Platform, Micro Edition (Mobile Java) Detailed Curriculum UNIT 1: Introduction Understanding J2ME Configurations Connected Device Configuration Connected, Limited
More informationDAY 3 J2ME Aalborg University, Mobile Device Group. Mobile. Mobile Phone Programming
DAY 3 J2ME Mobile Phone Programming Java 2 Micro Edition (J2ME) Overview Introduction J2ME architecture MIDlets Application development Introduction J2ME Key Factors Portability: Write once run anywhere
More informationSUN. Sun Certified Mobile Application Developer for the Java 2 Platform, Micro Edition, Version 1.0
SUN 310-110 Sun Certified Mobile Application Developer for the Java 2 Platform, Micro Edition, Version 1.0 Download Full Version : https://killexams.com/pass4sure/exam-detail/310-110 QUESTION: 332 Given:
More informationDeveloping mobile UI
Vorlesung Advanced Topics in HCI (Mensch-Maschine-Interaktion 2) Ludwig-Maximilians-Universität München LFE Medieninformatik Albrecht Schmidt & Andreas Butz WS2003/2004 http://www.medien.informatik.uni-muenchen.de/
More informationJAVA. Java Micro Edition
JAVA Java Micro Edition Overview predecessors Personal Java (1997) Embedded Java (1998) JME definition via JCP JCP Java Community Process JME is not a single SW package a set of technologies and specifications
More informationJava 2 Micro Edition Server socket and SMS. F. Ricci
Java 2 Micro Edition Server socket and SMS F. Ricci Content Other Connection Types Responding to Incoming Connections Socket and Server Socket Security Permissions Security domains Midlet signing Wireless
More information7. Concurrency. Motivation Infrastructure Faking concurrency Mobile Java implementation Symbian OS implementation. Maemo implementation Summary
7. Concurrency Motivation Infrastructure Faking concurrency Mobile Java implementation Symbian OS implementation Threads Active objects Maemo implementation Summary 1 Motivation Mobile devices are fundamentally
More informationCS434/534: Topics in Networked (Networking) Systems
CS434/534: Topics in Networked (Networking) Systems WSN/Mobile Systems Yang (Richard) Yang Computer Science Department Yale University 208A Watson Email: yry@cs.yale.edu http://zoo.cs.yale.edu/classes/cs434/
More informationDeveloping Mobile Applications
Developing Mobile Applications J2ME Java 2 Micro Edition 1 Virtual machines portable apps virtual machine native apps operating system hardware 2 Java - important issues Symbolic language not a random
More informationThe network connection
C H A P T E R 1 3 The network connection 13.1 About the Generic Connection Framework 366 13.2 Using the Generic Connection Framework 372 13.3 HTTP-based connections 372 13.4 Socket-based connections 377
More informationMULTIMEDIA PROGRAMMING IN JAVA. Prof.Asoc. Alda Kika Department of Informatics Faculty of Natural Sciences University of Tirana
MULTIMEDIA PROGRAMMING IN JAVA Prof.Asoc. Alda Kika Department of Informatics Faculty of Natural Sciences University of Tirana Objectives Applets in Java Getting, displaying and scaling the image How to
More informationFaculty of Computer Science and Information Systems Jazan University MOBILE COMPUTING (CNET 426) LAB MANUAL (MOBILE APPLICATION DEVELOPMENT LAB)
Faculty of Computer Science and Information Systems Jazan University MOBILE COMPUTING (CNET 426) LAB MANUAL (MOBILE APPLICATION DEVELOPMENT LAB) (Updated February 2017) Revised and Updated By: Dr SHAMS
More informationProject Overview. Readings and References. Initial project motivation. Opportunity. References. CSE 403, Winter 2003 Software Engineering
Readings and References Project Overview CSE 403, Winter 2003 Software Engineering http://www.cs.washington.edu/education/courses/403/03wi/ References» What will people pay for? Dan Bricklin.» Accessing
More informationBVRIT HYDERABAD College of Engineering for Women Department of Information Technology. Hand Out
BVRIT HYDERABAD College of Engineering for Women Department of Information Technology Hand Out Subject Name: Mobile Application Development Prepared by: 1. S. Rama Devi, Assistant Professor, IT Year and
More informationLab Exercise 7. Please follow the instruction in Workshop Note 7 to complete this exercise.
Lab Exercise 7 Please follow the instruction in Workshop Note 7 to complete this exercise. 1. Turn on your computer and startup Windows XP (English version), download and install J2ME Wireless Toolkit
More informationNutiteq Maps SDK tutorial for Java ME (J2ME)
Nutiteq Maps SDK tutorial for Java ME (J2ME) Version 1.1.1 (updated 29.08.2011) 2008-2011 Nutiteq LLC Nutiteq LLC www.nutiteq.com Skype: nutiteq support@nutiteq.com Page2 1 Contents 2 Introduction... 3
More informationProject Overview. CSE 403, Spring 2003 Software Engineering.
Project Overview CSE 403, Spring 2003 Software Engineering http://www.cs.washington.edu/education/courses/403/03sp/ 2-Apr-2003 Cse403-02-ProjectOverview 2003 University of Washington 1 References Readings
More informationProject Overview. Readings and References. Opportunity. Initial project motivation. References. CSE 403, Spring 2003 Software Engineering
Readings and References Project Overview CSE 403, Spring 2003 Software Engineering References» What will people pay for? Dan Bricklin.» Accessing a whole new world via multimedia phones. Dan Gillmor.»
More informationActual4Test. Actual4test - actual test exam dumps-pass for IT exams
Actual4Test Actual4test - actual test exam dumps-pass for IT exams Exam : 1Z0-869 Title : Java Mobile Edition 1 Mobile Application Developer Certified Professional Exam Vendors : Oracle Version : DEMO
More informationObjects. Phone. Programming. Mobile DAY 3 J2ME. Module 2. In real world: object is your car, your bicycle, your cat.. Object has state and behavior
DAY 3 J2ME Mobile Phone Programming Module 2 J2ME DAY 3 in aj2me nutshell Objects In real world: object is your car, your bicycle, your cat.. Object has state and behavior State: variables (car: color,
More informationJava for Programmers Course (equivalent to SL 275) 36 Contact Hours
Java for Programmers Course (equivalent to SL 275) 36 Contact Hours Course Overview This course teaches programmers the skills necessary to create Java programming system applications and satisfies the
More informationNew Features Overview
Features pf JDK 7 New Features Overview Full List: http://docs.oracle.com/javase/7/docs/webnotes/adoptionguide/index.html JSR 334: Small language enhancements (Project Coin) Concurrency and collections
More informationAcknowledgments Introduction p. 1 The Wireless Internet Revolution p. 1 Why Java Technology for Wireless Devices? p. 2 A Bit of History p.
Figures p. xiii Foreword p. xv Preface p. xvii Acknowledgments p. xxi Introduction p. 1 The Wireless Internet Revolution p. 1 Why Java Technology for Wireless Devices? p. 2 A Bit of History p. 3 J2ME Standardization
More informationCreating a Java ME Embedded Project That Uses GPIO
Raspberry Pi HOL. Note: IP: 10.0.0.37 User: pi Password: raspberry Part I Creating a Java ME Embedded Project That Uses GPIO In this section, you create a project by using NetBeans and you test it locally
More informationTRIBHUVAN UNIVERSITY Institute of Engineering Pulchowk Campus Department of Electronics and Computer Engineering
TRIBHUVAN UNIVERSITY Institute of Engineering Pulchowk Campus Department of Electronics and Computer Engineering A Final project Report ON Minor Project Java Media Player Submitted By Bisharjan Pokharel(061bct512)
More informationInserting multimedia objects in Dreamweaver
Inserting multimedia objects in Dreamweaver To insert a multimedia object in a page, do one of the following: Place the insertion point in the Document window where you want to insert the object, then
More information3.3.4 Connection Framework
108 MIDP 2.0 AND THE JTWI 3.3.4 Connection Framework 3.3.4.1 What s Optional and What s Not The CLDC provides a Generic Connection Framework (GCF), which is an extensible framework that can be customized
More informationMinne menet, Mobiili-Java?
Minne menet, Mobiili-Java? Java Platform, Micro Edition Status and Future Directions Antero Taivalsaari Sun Microsystems, Inc. December 2005 Growth Continues (2005 vs. 2003) 1 Billion Installed Base as
More informationM257 Past Paper Oct 2007 Attempted Solution
M257 Past Paper Oct 2007 Attempted Solution Part 1 Question 1 The compilation process translates the source code of a Java program into bytecode, which is an intermediate language. The Java interpreter
More informationProduct Information Retrieval. over Cellular Networks. Author: John Delaney
Product Information Retrieval over Cellular Networks Author: John Delaney A dissertation submitted to the University of Dublin, in partial fulfillment of the requirements for the degree of Master of Science
More informationCHETTINAD COLLEGE OF ENGINEERING & TECHNOLOGY JAVA
1. JIT meaning a. java in time b. just in time c. join in time d. none of above CHETTINAD COLLEGE OF ENGINEERING & TECHNOLOGY JAVA 2. After the compilation of the java source code, which file is created
More informationGUIDELINES FOR GAME DEVELOPERS USING NOKIA JAVA MIDP DEVICES Version Nov 02
GUIDELINES FOR GAME DEVELOPERS USING NOKIA JAVA MIDP DEVICES 07 Nov 02 Table of Contents 1. INTRODUCTION...3 1.1 PURPOSE...3 1.2 REFERENCES...4 2. GAME GUIDELINES...5 2.1 USE OF GAME ACTIONS...5 2.2 NOTES
More informationMultiple Inheritance, Abstract Classes, Interfaces
Multiple Inheritance, Abstract Classes, Interfaces Written by John Bell for CS 342, Spring 2018 Based on chapter 8 of The Object-Oriented Thought Process by Matt Weisfeld, and other sources. Frameworks
More informationCM0256 Pervasive Computing
CM0256 Pervasive Computing Lecture 17 Software Development Approaches Tom Goodale t.r.goodale@cs.cardiff.ac.uk Lecture Outline In this lecture we: J2ME applications Palm. Device Limitations Limited Power
More informationSortware Comprehension and Μaintenance
Department of Management and Technology Sortware Comprehension and Μaintenance Wireless IRC project Design of a new feature Wireless Irc s Design Presentation Brief explanation of Midlet Suites function
More informationB2.52-R3: INTRODUCTION TO OBJECT-ORIENTED PROGRAMMING THROUGH JAVA
B2.52-R3: INTRODUCTION TO OBJECT-ORIENTED PROGRAMMING THROUGH JAVA NOTE: 1. There are TWO PARTS in this Module/Paper. PART ONE contains FOUR questions and PART TWO contains FIVE questions. 2. PART ONE
More informationBluetooth Scatternet Application. Sun Code for Freedom
Bluetooth Scatternet Application Sun Code for Freedom Submitted for Code For Freedom Contest 2009 By Ravi D Suvarna Ananth V Sandeep Jain Index Topic Page No. 1. Introduction ---------------------------------------------
More informationApplication Development using J2ME Architecture for Device Independence
Application Development using J2ME Architecture for Device Independence By Terje Eggum A thesis submitted for the degree of Master of Science in Information and Communication Technology Agder University
More informationWhat have we learnt last week? Wireless Online Game Development for Mobile Device. Introduction to Thread. What is Thread?
What have we learnt last week? Wireless Online Game Development for Mobile Device Lesson 5 Introduction to Low-level API Display Image in Canvas Configure color, line style, font style for Drawing Drawing
More informationLecture 35. Threads. Reading for next time: Big Java What is a Thread?
Lecture 35 Threads Reading for next time: Big Java 21.4 What is a Thread? Imagine a Java program that is reading large files over the Internet from several different servers (or getting data from several
More information... 2...3 1...6 1.1...6 1.2... 10 1.3... 16 2...20 2.1... 20 2.2...28... 33... 35... 40...45...49....53 2 ,,.,,., ё.[37],.,. [14] «-». [19] - (..,..,..,..,..,..,..,..,....) (.,.,.,...). -..,..,... [19].
More informationCHADALAWADA RAMANAMMA ENGINEERING COLLEGE
1 MOBILE APPLICATION DEVELOPMENT LABORATORY MANUAL Subject Code : 9F00506 Regulations : JNTUA R09 Class : V Semester (MCA) CHADALAWADA RAMANAMMA ENGINEERING COLLEGE (AUTONOMOUS) Chadalawada Nagar, Renigunta
More informationApplication Development Using J2ME. Evaluation of Intrinsic Platform Limitations
Application Development Using J2ME Evaluation of Intrinsic Platform Limitations by Håvar Lundberg A thesis submitted for the degree of Master of Science in Information and Communication Technology Agder
More informationMobile Phone Programming
Mobile Phone Programming Free Study Activity Day 3 Part 2 J2ME in a nutshell J2ME in a nutshell Objects In real world: object is your car, your bicycle, your cat.. Object has state and behavior State:
More informationMensch-Maschine-Interaktion 2
Mensch-Maschine-Interaktion 2 Übung 5 (12./14./15. Juni 2007) Arnd Vitzthum - arnd.vitzthum@ifi.lmu.de Amalienstr. 17, Raum 501 Dominic Bremer - bremer@cip.ifi.lmu.de Java ME Overview (I) Java ME slim
More informationMeeting Visuals UCF Toolkit User Guide
Meeting Visuals UCF Toolkit User Guide We provide Meeting Visuals web conferencing services. Because Meeting Visuals is powered by WebEx, this guide makes several references to the company name, platform
More informationProgramming Wireless Devices with the Java 2 Platform, Micro Edition
Programming Wireless Devices with the Java 2 Platform, Micro Edition J2ME Connected Limited Device Configuration (CLDC) Mobile Information Device Profile (MIDP) Roger Riggs Antero Taivalsaari Mark VandenBrink
More informationNOKIA 12 GSM MODULE JAVA TM IMLET PROGRAMMING GUIDE. Copyright Nokia. All rights reserved. Issue
NOKIA 12 GSM MODULE JAVA TM IMLET PROGRAMMING GUIDE Copyright 2004-2005 Nokia. All rights reserved. Issue 1.1 9231715 Contents ACRONYMS AND TERMS...1 1. ABOUT THIS DOCUMENT...4 2. INTRODUCTION...6 3. NOKIA
More informationUSING THE JAVA MEDIA Framework Chapter 1 Introduction Why JMF? Introduction The Java Media Framework The Java Media Player The Java Media APIs
USING THE JAVA MEDIA Framework Chapter 1 Why JMF? The Java Media Framework The Java Media Player The Java Media APIs Related Products Well, Why? The Basics of JMF Programming An AudioClip Example Playing
More informationWhat remains? Median in linear time, randomized algorithms (Monte Carlo, Las Vegas), other programming languages.
What remains? Median in linear time, randomized algorithms (Monte Carlo, Las Vegas), other programming languages. Median in linear time in fact not just median If we wanted the algorithm finding only median,
More information16-Dec-10. Consider the following method:
Boaz Kantor Introduction to Computer Science IDC Herzliya Exception is a class. Java comes with many, we can write our own. The Exception objects, along with some Java-specific structures, allow us to
More informationMultiThreading. Object Orientated Programming in Java. Benjamin Kenwright
MultiThreading Object Orientated Programming in Java Benjamin Kenwright Outline Review Essential Java Multithreading Examples Today s Practical Review/Discussion Question Does the following code compile?
More informationJUGAT meeting. Roman Waitz Development. MATERNA Information & Communications
JUGAT meeting Roman Waitz Development MATERNA Information & Communications 22/04/2002 Agenda +What the J2ME Platform is +How to build and deploy J2MEbased wireless applications +J2ME programming techniques
More informationChapter 3 THE BASICS OF JMF PROGRAMMING. Introduction
TheBasics.fm Page 11 Saturday, June 26, 1999 4:37 PM Chapter 3 THE BASICS OF JMF PROGRAMMING Introduction The best place to start with JMF programming is where the java.applet.audioclip interface leaves
More informationJSR 248: Taking Java Platform, Micro Edition (Java ME) to the Next Level
JSR 248: Taking Java Platform, Micro Edition (Java ME) to the Next Level Kay Glahn Consultant Mobile Service Architecture, Vodafone http://www.vodafone.com Erkki Rysä Technologist Nokia Corporation http://www.nokia.com
More informationExam Questions 1Z0-895
Exam Questions 1Z0-895 Java Platform, Enterprise Edition 6 Enterprise JavaBeans Developer Certified Expert Exam https://www.2passeasy.com/dumps/1z0-895/ QUESTION NO: 1 A developer needs to deliver a large-scale
More information/* Copyright 2012 Robert C. Ilardi
/ Copyright 2012 Robert C. Ilardi Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
More informationLecture 20. Java Exceptional Event Handling. Dr. Martin O Connor CA166
Lecture 20 Java Exceptional Event Handling Dr. Martin O Connor CA166 www.computing.dcu.ie/~moconnor Topics What is an Exception? Exception Handler Catch or Specify Requirement Three Kinds of Exceptions
More informationJ2ME ARCHITECTURE AND RELATED EMBEDDED TECHNOLOGIES
J2ME ARCHITECTURE AND RELATED EMBEDDED TECHNOLOGIES Pradip Lamsal Abstract: Java 2 Platform Micro Edition (J2ME ), a flavour of Java architecture, is aimed at low memory consumer devices, typically less
More informationInternet and Mobile Services 2 - Java 2 Micro Edition. F. Ricci 2009/2010
Internet and Mobile Services 2 - Java 2 Micro Edition F. Ricci 2009/2010 Content Mobile applications Why Java on mobile devices Three main Java environments Java 2 Micro Edition Configurations and profiles
More informationDebugging Tools for MIDP Java Devices
Debugging Tools for MIDP Java Devices Olli Kallioinen 1 and Tommi Mikkonen 2 1 Sasken Finland, Tampere, Finland olli.kallioinen@sasken.com 2 Tampere University of Technology, Tampere, Finland tommi.mikkonen@tut.fi
More informationVideo recorders Series DH
Page: 1 DVRs for analog cameras, 960H, HD-SDI Viewclient Program Manual How to install and use the client program to the DVR Page: 2 Contents of this handbook This manual describes how to install and use
More informationJava 2 Micro Edition
Java 2 Micro Edition F.Ricci Content Why Java on mobile devices Three main Java environments Java 2 Micro Edition Configurations and profiles Optional packages Generic connection framework Application
More informationMultithreaded Programming Part II. CSE 219 Stony Brook University, Department of Computer Science
Multithreaded Programming Part II CSE 219 Stony Brook University, Thread Scheduling In a Java application, main is a thread on its own Once multiple threads are made Runnable the thread scheduler of the
More informationT Multimedia Programming. Different Operating Systems and their Multimedia Support
T-111.5350 Multimedia Programming Different Operating Systems and their Multimedia Support Carlos Herrero September 27, 2007 Contents Windows DirectX.NET Framework Linux KDE & Gnome Gstreamer SDL Mac OS
More informationLAB-6340: Advanced Java ME Programming - Streaming Video From Server to Your Device
LAB-6340: Advanced Java ME Programming - Streaming Video From Server to Your Device Lukas Hasik, Fabiola Galleros Rios Software Engineer, Mobility Pack QE Sun Microsystems Inc. http://www.sun.com 2007
More informationMASTER'S THESIS. Group Voice Mixer
MASTER'S THESIS 2010:005 CIV Group Voice Mixer Andreas Berglund Luleå University of Technology MSc Programmes in Engineering Computer Science and Engineering Department of Computer Science and Electrical
More informationRadical GUI Makeover with Ajax Mashup
Radical GUI Makeover with Ajax Mashup Terrence Barr Senior Technologist and Community Ambassador Java Mobile & Embedded Community TS-5733 Learn how to turn a 'plain old' Java Platform, Micro Edition (Java
More informationCSCD 330 Network Programming
CSCD 330 Network Programming Lecture 12 More Client-Server Programming Winter 2019 Reading: References at end of Lecture 1 Introduction So far, Looked at client-server programs with Java Sockets TCP and
More information15CS45 : OBJECT ORIENTED CONCEPTS
15CS45 : OBJECT ORIENTED CONCEPTS QUESTION BANK: What do you know about Java? What are the supported platforms by Java Programming Language? List any five features of Java? Why is Java Architectural Neutral?
More informationUsing XML in Wireless Applications
Using XML in Wireless Applications CHAPTER 10 IN THIS CHAPTER Overview 336 XML and Parsing XML Documents 337 XML Parsers for Wireless Applications 340 SAX 1.0 Java API For J2ME MIDP 342 TinyXML Parser
More informationJava 2 Platform, Micro Edition
Java 2 Platform, Micro Edition ArchitectureOverview Jon Courtney Senior Staff Engineer Sun Microsystems JavaOne203 Sesion316 Overall Presentation Goal Learnaboutthearchitectural features ofthejava 2Platform,MicroEdition(J2ME
More informationNote: Each loop has 5 iterations in the ThreeLoopTest program.
Lecture 23 Multithreading Introduction Multithreading is the ability to do multiple things at once with in the same application. It provides finer granularity of concurrency. A thread sometimes called
More informationProject 1 Computer Science 2334 Spring 2016 This project is individual work. Each student must complete this assignment independently.
Project 1 Computer Science 2334 Spring 2016 This project is individual work. Each student must complete this assignment independently. User Request: Create a simple movie data system. Milestones: 1. Use
More informationThe Design and Implementation of Multimedia Software
Chapter 3 Programs The Design and Implementation of Multimedia Software David Bernstein Jones and Bartlett Publishers www.jbpub.com David Bernstein (jbpub.com) Multimedia Software Jones and Bartlett 1
More information2.6 Error, exception and event handling
2.6 Error, exception and event handling There are conditions that have to be fulfilled by a program that sometimes are not fulfilled, which causes a so-called program error. When an error occurs usually
More information3.01C Multimedia Elements and Guidelines Explore multimedia systems, elements and presentations.
3.01C Multimedia Elements and Guidelines 3.01 Explore multimedia systems, elements and presentations. Multimedia Fair Use Guidelines Guidelines for using copyrighted multimedia elements include: Text Motion
More informationMobile MOUSe JAVA2 FOR PROGRAMMERS ONLINE COURSE OUTLINE
Mobile MOUSe JAVA2 FOR PROGRAMMERS ONLINE COURSE OUTLINE COURSE TITLE JAVA2 FOR PROGRAMMERS COURSE DURATION 14 Hour(s) of Interactive Training COURSE OVERVIEW With the Java2 for Programmers course, anyone
More informationJava 2 Micro Edition Socket, SMS and Bluetooth. F. Ricci 2008/2009
Java 2 Micro Edition Socket, SMS and Bluetooth F. Ricci 2008/2009 Content Other Connection Types Responding to Incoming Connections Socket and Server Socket Security Permissions Security domains Midlet
More informationVirtual Machine Design
Virtual Machine Design Lecture 4: Multithreading and Synchronization Antero Taivalsaari September 2003 Session #2026: J2MEPlatform, Connected Limited Device Configuration (CLDC) Lecture Goals Give an overview
More informationIntroduction to Java.net Package. CGS 3416 Java for Non Majors
Introduction to Java.net Package CGS 3416 Java for Non Majors 1 Package Overview The package java.net contains class and interfaces that provide powerful infrastructure for implementing networking applications.
More informationCisco Unified CME Telephony Service Provider 2.1 Setup Guide
Cisco Unified CME Telephony Service Provider 2.1 Setup Guide Revised: January 12, 2007 Introduction Cisco Unified Communications Manager Express (Cisco Unified CME, formerly known as Cisco Unified CallManager
More informationDigital Audio Basics
CSC 170 Introduction to Computers and Their Applications Lecture #2 Digital Audio Basics Digital Audio Basics Digital audio is music, speech, and other sounds represented in binary format for use in digital
More informationDOWNLOAD PDF CORE JAVA APTITUDE QUESTIONS AND ANSWERS
Chapter 1 : Chapter-wise Java Multiple Choice Questions and Answers Interview MCQs Java Programming questions and answers with explanation for interview, competitive examination and entrance test. Fully
More information