Mobile Applications with Java ME & BlackBerry. Overview Java ME –Networking –Databases Java ME and the BlackBerry –The BlackBerry wireless device –Converting.

Slides:



Advertisements
Similar presentations
MIDP Mobile Information Device Profile Johnny Yau CIS 642 Prof. Insup Lee.
Advertisements

Chapter 17: WEB COMPONENTS
Introduction of J2ME Mobile solutions. Overview What is J2ME. How does J2ME work? Java J2ME Carriers and Products. The Two Configuration of J2ME. Profiles.
Mobil game : A mobile game is a video game played on a mobile phone, smartphone, PDA, handheld computer or portable media player Type of language writing.
J2ME 25 July Overview  What is J2ME?  The CLDC and CDC configurations  MIDP and MIDlets  Development Tools  Demonstrations.
Writing Your First MIDlet Running JAVA on a Cell Phone Jon A. Batcheller January 27, 2004.
Introduction to push technology © 2009 Research In Motion Limited.
UNDERSTANDING JAVA APIS FOR MOBILE DEVICES v0.01.
J2ME Web Services Specification.  With the promise to ease interoperability and allow for large scale software collaboration over the Internet by offering.
Cosc 4730 Installing IDEs And a note on carriers..
JAVA Technology. Java Technology Java technology is a portfolio of products that are based on the power of networks and the idea that the same software.
© 2009 Research In Motion Limited Advanced Java Application Development for the BlackBerry Smartphone Trainer name Date.
Servlets and a little bit of Web Services Russell Beale.
© 2009 Research In Motion Limited Methods of application development for mobile devices.
Prepared By E.Musa Alyaman1 Chapter 2 The Java Overview.
Developing Software for Wireless Devices
J2ME Prepared by: - Gaery- Ronny - Alan- Andy. Why Technology for Mobile Devices? The nature of wireless devices is changing Old devices: All the software.
© 2009 Research In Motion Limited Data structures and memory management on mobile devices.
PDA Programming Using J2ME Presenter :涂俊凱 Date : 2003/4/8.
Making Cell Phone Games An Overview Ray Ratelis Guild Software, Inc.
V0.01 © 2009 Research In Motion Limited Introduction to Java Application Development for the BlackBerry Smartphone Trainer name Date.
V0.01 © 2009 Research In Motion Limited Understanding Java APIs for Mobile Devices Trainer name Date.
The 21th century Repairman Agenda Introduction J2EE J2ME Demonstration.
Cosc 4730 Phone Programming in Java An Introduction.
V1.00 © 2009 Research In Motion Limited Introduction to Mobile Device Web Development Trainer name Date.
WAP: Wireless Application Protocol Mike Mc Ardle ACSG April, 2005.
Java 2 Platform, Micro Edition (J2ME) By Xiaorong Wang.
SM3121 Software Technology Mark Green School of Creative Media.
IP Camera Security System Dallan Byrne th Electronic and Computer Engineering 2007 Supervisor: Fergal O’ Malley.
ANDROID PROGRAMMING MODULE 1 – GETTING STARTED
J2ME and WAP Technologies CSCI – Independent Study Fall 2002 Presented by: Kashif Syed.
J2ME Java for Mobile Environments Based on J2ME In A Nutshell, by Kim Topley, O’Reilly & Associates Inc., 2002, and Tetris by Alexei Patinov.
INTRODUCTION TO WEB DATABASE PROGRAMMING
Chapter 10 EJB Concepts of EJB Three Components in Creating an EJB Starting/Stopping J2EE Server and Deployment Tool Installation and Configuration of.
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 4 Web technologies: HTTP, CGI, PHP,Java applets)
Databases for Mobile Devices Introduction. Overview Different types of data storages Memory management Local database techniques.
Principles of Computer Security: CompTIA Security + ® and Beyond, Third Edition © 2012 Principles of Computer Security: CompTIA Security+ ® and Beyond,
Getting Started with JXTA for J2ME Advisor : Dr. Ching-Long Yeh Report : DI.2, 洪泰昌 ( ) Course: XML 文件管理.
Michael Brockway Advanced Applications Development in Java J2ME -- Introduction l Introduction / Overview l Java 2 Micro Edition n CLDC n MIDP l Examples.
Programming Handheld and Mobile devices 1 Programming of Handheld and Mobile Devices Lecture 11 J2ME and MIDlets Rob Pooley
Introduction to Android. Android as a system, is a java based operating system that runs on the Linux kernel. The system is very lightweight and full.
Small Devices on DBGlobe System George Samaras Chara Skouteli.
Framework and application bytecode size CLDC MIDP kXML parser Utility classes Graphics Logic (MIDlet) Application Data (XML file)
Computer Science Wi-Fi App using J2ME and MVC Architecture Advisor : Dr. Chung-E Wang Department of Computer Science Sacramento State University Date:
SUSE Linux Enterprise Desktop Administration Chapter 12 Administer Printing.
J2ME Presented by May Sayed & Menna Hawash. Outline Introduction “Java Technology” Introduction “What is J2ME?” J2ME Architecture J2ME Core Concepts 
Lecture 15 Introduction to Web Services Web Service Applications.
1Basics of J2ME. 2 Objectives –Understand the different java API’s and how the mobile edition API’s fit in –Understand what a mobile configuration and.
Martin Schmidt / The Silent Revolution Mobile Java.
Presentation: SOAP/WS in a distributed object framework, Application Servers & AXIS SOAP.
BlackBerry Persistent Storage Models Persistent Storage APIs and Record Management System.
BlackBerry Application Development 06PLM – Group 7 Andrian Eduard Bangga Ikhsan Baskara Joovanny Pasuhuk Rangga Fajarullah.
Computer Networking From LANs to WANs: Hardware, Software, and Security Chapter 13 FTP and Telnet.
1 MSCS 237 Overview of web technologies (A specific type of distributed systems)
Programming Handheld and Mobile devices 1 Programming of Handheld and Mobile Devices Lecture 19 MIDlet to Palm Rob Pooley
Getting to Know Your Computer Your File System Applications What’s running on your machine Its own devices Networking.
Programming technical terms Program is like a recipe. It contains a list of ingredients (called variables) and a list of directions (called statements)
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 JSP Application Models.
WHAT IS E-COMMERCE? E-COMMERCE is a online service that helps the seller/buyer complete their transaction through a secure server. Throughout the past.
MIDP Database Programming Using RMS: Jingwu He Csc 3360.
Enhanced mobile services in Java enabled phones Björn Hjelt Sonera zed ltd Supervisor: Professor Jorma Jormakka.
BLACKBERRY TECHNOLOGY PRESENTED BY SHAIK TABREZ (09J01A1225 )
Advance Computer Programming Market for Java ME The Java ME Platform – Java 2 Micro Edition (J2ME) combines a resource- constrained JVM and a set of Java.
Java N Amanquah.
BlackBerry Application Development
MOBILE DEVICE OPERATING SYSTEM
Wireless Instant Messaging Using J2ME
By Jeff Heaton An Overview of J2ME By Jeff Heaton
Android Platform, Android App Basic Components
Presentation transcript:

Mobile Applications with Java ME & BlackBerry

Overview Java ME –Networking –Databases Java ME and the BlackBerry –The BlackBerry wireless device –Converting existing Java ME apps for the BlackBerry –Deploying applications on the BlackBerry –Blackberry AppWorld

Java Networking J2SE and J2EE networking APIs are not suitable for handheld devices –Require several megabytes of memory to run –Device manufacturers who work with circuit-switched networks require TCP support –Device manufacturers who work with packet-switched networks require UDP support –Other devices have specific mechanisms for communications

CLDC Generic Connections A set of related abstractions at the programming level No abstractions for different forms of communications All connections are created using the Connector.open() If successful, it returns an object that implements one of the generic connection interfaces

MIDP Generic Interfaces MIDP 1.0

MIDP Generic Interfaces MIDP 2.0

Connections: Examples HTTP: Connector.open(“ Socket: Connector.open(“socket://host.com:80”); Datagram: Connector.open(“datagram://address:port”); File: Connector.open(“file:/myfile.txt”);

MIDP Connectivity It provides support for HTTP (HttpConnection) Why? HTTP can be implemented using IP protocols or non-IP protocols

HttpConnection Part of the javax.microedition.io Defines the necessary methods and constants for an HTTP connection HttpConnection c = (HttpConnection) Connector.open(“ C.setRequestMethod(HttpConnection.POST); C.setRequestProperty(“Content-Language”, “en-CA”);

Invoking Remote Applications A MIDlet may invoke remote applications: –Fetching a page –Invoking a CGI script (GET or POST method) –Invoking a Servlet

Advantages of CLDC Generic Connections Isolate the differences between the setup of one protocol and another Most of the application code remains the same regardless of the protocol you use Note: CLDC itself does not provide any protocol implementation

Databases A persistent storage: a place to store the state of objects Facilities provided in J2SE and J2EE are not suitable for handheld devices MIDP provides a record-oriented database mechanism to persistently store data and retrieve it later

MIDP’S RMS Lightweight record-oriented database –Device independent API –Unique recordID for each record within the store –A record is an array of bytes –Shared within MIDlet suite –Support for enumeration, sorting, and filtering javax.microedition.rms

MIDP - RMS Methods Record Store openRecordStore, closeRecordStore, listRecordStore, deleteRecordStore, getRecordSize, getNumRecords Record Data addRecord, deleteRecord, getRecord, setRecord, getRecordSize Record Selection RecordEnumeration, RecordFilter, RecordComparator

RMS: Record Stores To open a record store: –RecordStoredb = RecordStore.openRecordStore(“myDB”, true); To close a record store: –db.closeRecordStore();

Create/Add a New Record To create a new record: ByteArrayOutputStreambaos= new ByteArrayOutputStream(); DataOutputStreamdos = new DataOutputStream(baos); dos.writeUTF(record); Byte b[] = baos.toByteArray(); db.addRecord(b, 0, b.length);

THE BLACKBERRY WIRELESS DEVICE

The BlackBerry Smartphone The BlackBerry is a wireless handheld device developed by Research In Motion (RIM) in Supports push , mobile telephone, text messaging, internet faxing, web browsing and other wireless information services. Delivers information over the wireless data networks of mobile phone service companies. RIM currently offers BlackBerry service to non- BlackBerry devices, such as the Palm Treo, through the BlackBerry Connect software.

Developing for the BlackBerry Unlike MIDlets, BlackBerry applications do not have a lifecycle Applications are compiled into.COD files rather than.JAD and.JAR In addition to full support of standard CLDC and MIDP APIs, RIM provides BlackBerry-specific extensions that enable you to develop applications with the look and feel of native applications

Developing for the BlackBerry (Cont.) The BlackBerry APIs provide tighter integration for BlackBerry devices, and access to BlackBerry features for user interface, networking, and other capabilities CLDC, MIDP, and BlackBerry APIs may be used together in the same application – with the notable exception of user-interface APIs RIM's UI APIs provide greater functionality and more control over the layout of your screens and fields, but at a cost: Resulting MIDlets will be non- standard, so porting to other platforms will require more effort

Java ME to BlackBerry Converting a J2ME MIDlet to a.COD involves the following steps: –Download and install the RIM Java Development Environment –Download and install Java SDK –Copy the jad & jar files in question to the /bin/ directory of your RIM JDE installation

Java ME to BlackBerry (Cont.) –From the command line (make sure you are in the bin directory of your RIM JDE installation) type: rapc import=“$your_JDE_dir\lib\net_rim_api.jar" codename=$your_app -midlet jad=$your_app.jad $your_app.jar where $your_JDE_dir is the directory of your RIM JDE installation, $your_app is the name of the MIDlet you're trying to convert, $your_app.jad is the name of the MIDlet descriptor and $your_app.jar is the name of the MIDlet jar file

Java ME to BlackBerry (Cont.) –The following files are generated: $your_app.debug $your_app.cod –$your_app.debug may be discarded –$your_app.cod is used to load the application onto the BlackBerry

Java ME to BlackBerry (Cont.) Some MIDlets can't be directly translated into RIM.cod files because attributes in the.jad contain ASCII characters that are not valid in a project name in the RIM tool used to build.cod files. BlackBerry devices do not install from.jar and.jad files, but from proprietary binary formats created from the.jar and.jad files.

Loading Applications on the BlackBerry To load the application onto the BlackBerry: –Connect BlackBerry to computer via USB and from the command line (make sure you are in bin directory of your RIM JDE installation) type: javaloader -usb load $your_app.cod –The J2ME application will appear in the home screen on the BlackBerry.

Removing Applications from the BlackBerry To remove an application from the BlackBerry: –Connect BlackBerry to computer via USB and from the command line (make sure you are in bin directory of your RIM JDE installation) type: javaloader -usb erase $your_app.cod –The J2ME application will no longer appear in the home screen on the BlackBerry.

Wiping the Blackberry Device Useful when transferring a device to another individual or cleaning the device after many application installations To wipe a Blackberry device of application data and third party applications enter the ‘Options’ menu, select ‘Security Options’ then ‘General Settings’, press the Blackberry button and select ‘Wipe Handheld’, confirm the dialog and type ‘blackberry’ to confirm

Blackberry AppWorld The Blackberry AppWorld allows mobile application developers to distribute their applications to customers AppWorld helps provide Blackberry developers a unified location to distribute their Blackberry applications and helps promote development on the Blackberry device RIM provides technical testing of applications and provides feedback on the suitability of the applications as well as information regarding the individuals who download your application

Java ME and BlackBerry Tools Sun’s Wireless Toolkit: – NetBeans(Mobility Pack) – RIM’sBlackBerryJDE: –

Resources Java ME (J2ME): – CLDC and KVM: – MIDP: – Sun Microsystems Developer Network: –java.sun.com/wireless WirelessDevNetDeveloper Portal: –