Presentation is loading. Please wait.

Presentation is loading. Please wait.

J2ME Technology J2ME Home Monitoring. The Java™ 2 Platform.

Similar presentations


Presentation on theme: "J2ME Technology J2ME Home Monitoring. The Java™ 2 Platform."— Presentation transcript:

1 J2ME Technology J2ME Home Monitoring

2

3 The Java™ 2 Platform

4 Learn Once… Write Anywhere Dynamic provisioning of new applications Enhanced User experience –Dynamic, graphical content –Fast interaction (local operation) –Disconnected operation (convenience, cost- effective) –Intelligent network bandwidth usage Leverage 2.5 million Java developers Availability of development tools –Large selection of available tools Java Technology Benefits

5 Java Enabled Content for Wireless SMART Wireless Portal Infrastructure Mobile Communication Services Mobile Information Services Mobile Entertainment Services Mobile Enterprise Services Mobile Commerce Services News Stock Updates Weather forecast Directories Location-based services Music Games Video Streaming Productivity Collaboration Work-Force Automation Auctions Banking and Trading Travel Reservations Email CRM Instant Messaging

6 J2ME User Initiated Provisioning Advertise App on Web Page User Selects App Descriptor File Name Version Size App URL... Descriptor File Name Version Size App URL... Java Application Jar file “Breakout” game Java Application Jar file “Breakout” game HTTP Network Transfer OTA Handset Downloads Application Handset Downloads Descriptor File OTA

7 Java Service Vending Machine J2ME CDC J 2 M E C L D C J 2 S E

8 Major J2ME Adoption Handset Manufacturers Wireless Operators

9 Major Industry Interest Java Service Vending Machine Industry Players Iplanet Ellipsus Openwave ATG BEA Mobilitec 4thpass

10 J2ME Home Monitoring What is J2ME Home Monitoring: It is a Java Application for your remote visual monitoring needs. You can monitor your office, warehouse, yard and other places while you are on-the-go. The software package allows you to easily view up-to-the-minute images of the places or things you wish to monitor, right on your mobile device. David Fox won the Motorola-Nextel Developer Challenge at JavaOne by whipping up a program that lets you control lights and appliances at home via cell phone, and stream webcam images to its tiny screen. And, he did it in six hours, and drove away in a BMW Z3 for his efforts. The contest was simple enough -- write an application, any application, for the new Motorola i85s cell phone. From design to prototype to build to deploy, in six hours or less.

11 J2ME Home Monitoring Hardware and Software Requirements  IBM-compatible personal computer with an attached PC Camera.  JDK1.3.1( base tools needed to develop Java applets and applications)  J2ME emulator for developing and testing the MIDlet ( a set of tools that provides developers with the emulation environment, documentation and examples needed to develop CLDC/MIDP compliant applications, Microsoft Windows 98 Second Edition, Microsoft Windows NT or Microsoft Windows 2000. ) 4. PNG Image converter  A web server or a web space for your home page

12 J2ME Home Monitoring A use case of J2ME Home Monitor 1. The PC Camera can be set to take a picture each 10 seconds. 2. The picture will be placed in a certain directory. 3. The PNG Converter will pick the image from a certain directory and convert it from jpg to png format. 4. The batch file will pick the png image and ftp it to a certain directory on your web server. 5. The Java 2 application allows you to “pull” down the last image uploaded to your website and view it on your mobile device.

13 J2ME Home Monitoring Batch script :start C:\PROGRA~1\2png\2png.exe s="C:\delete\Source\*.*" d="c:\delete\destination" -q75 -w200 -h100 -prop c:\WINNT\system32\ftp -s:ftp.TXT @echo off echo Starting! echo Wscript.Sleep 10000> sleep.vbs start /w wscript.exe sleep.vbs echo Done! del sleep.vbs @echo off goto :start d at: Description: Pic2Pic Pro is easy to use and powerful utility for batch conversion of image files using scripts. Description:

14 J2ME Home Monitoring ftp script open 10.213.51.154 userID Password # directory of destination cd /app cd weblogic cd nunivak cd wlserver6.1 cd config cd eghosh01domain cd applications binary hash #directory of source lcd c:\delete\source put Sample.png bye d at: Description: Pic2Pic Pro is easy to use and powerful utility for batch conversion of image files using scripts. Description:

15 Testing your application I http://people.ku.edu/~eghosh01/monitor.png http://people.ku.edu/~eghosh01/monitor.png J2ME application: Consists of two classes VideoTimer Class J MIDlet Class J VideoTimer, which calles a nextImage() method every couple of seconds: nextImage httpconnection.openDataInputStream() datainputstream.readFully(abyte0) createImage() J2J powerful utility for batch conversion of image files using scripts. Description:

16 class VideoTimer extends TimerTask { VideoTimer() { } public void run() { try { nextImage(); frm.append(image); disp.setCurrent(frm); } catch (Exception ex) { System.out.println("Exception " + ex); } MIDlet Class : The timer is triggered like this: timer = new Timer(); vt = new VideoTimer(); timer.schedule(vt,(long)10,10); It also needs to pass the Form and display obkect to VideoTimer Class

17 J2ME Home Monitoring Software 1. Java TM 2 SDK, Standard Edition Version 1.3.1_02 http://java.sun.com/j2se/1.3/download-windows.html Description: 2. Java TM 2 Platform Micro Edition, Wireless Toolkit 1.0.3 http://java.sun.com/products/j2mewtoolkit/download.html 3. Pic2PicPro http://www.wavelsoftware.com/pc2pcpro.htm

18 References n Wireless Java with J2ME in 21 days n Wireless programming with Java 2 Micro Edition n http://www-106.ibm.com/developerworks/ http://www-106.ibm.com/developerworks/ n http://java.sun.com/j2me/


Download ppt "J2ME Technology J2ME Home Monitoring. The Java™ 2 Platform."

Similar presentations


Ads by Google