Martin Løbger – IT Konsulent

Slides:



Advertisements
Similar presentations
Java + OpenGL = JOGL Java and OpenGL Rich Truban Andrew Potozniak.
Advertisements

Android Application Development A Tutorial Driven Course.
A Programmer's Introduction to Java - from a S/370 user (c) IDMS/SQL News
Bruce Scharlau, University of Aberdeen, 2012 Networking for Mobiles Mobile Computing Some slides from MobEduNet This covers HTTP in detail, and mentions.
Bruce Scharlau, University of Aberdeen, 2010 Java ME Networking Mobile Computing Some slides from MobEduNet This covers HTTP in detail, and mentions other.
JSP and web applications
Extending Eclipse Kai-Uwe Mätzel IBM OTI Labs Zurich
MIDP Mobile Information Device Profile Johnny Yau CIS 642 Prof. Insup Lee.
05/07/2008kbele/cs5251 Study of Tools & Utilities in Mobile Application By Kunal Bele.
Mobile Development Environments Juha Linnanen Evtek
Contents Different O.S. and platforms. Different programming languages. Possibilities for mobiles. GPS, digital compass, accelerometer,… Augmented reality.
J2ME Melih Sakarya Java Teknolojileri Derneği. JVM JAVA Kullanılan yerler  Windows-Linux-Unix-Solaris  PDA lar  Smart Cardlar  Cep Telefonları  Appletler.
Web Toolkit Julie George & Ronald Lopez 1. Requirements  Java SDK version 1.5 or later  Apache Ant is also necessary to run command line arguments 
Sony Ericsson1 Tapuchin The Project Capuchin Energizing User Experience.
Java 2D Training. Basic Tools Java SDK 1.4x Wireless Toolkit 2.x NetBeans IDE + mobility pack Global Code editor Text Comparer Tools Graphics Editor Sprite.
Socket Programming ENTERPRISE JAVA. 2 Content  Sockets  Streams  Threads  Readings.
Presentation 10 SOAP on the Microsoft Platform (.NET)
It provides a framework for embedded multimedia facilities in java enabled mobile devices.
Developing for Symbian OS Andrei Tabarcea,
Simple, Scalable, Sensible Simplified Software Solutions (India) Company Profile
 2002 Prentice Hall. All rights reserved. Chapter 9: Servlets Outline 9.1 Introduction 9.2 Servlet Overview and Architecture Interface Servlet and.
Presentation 11: SOAP on small devices. Ingeniørhøjskolen i Århus Slide 2 af 14 Outline Which small devices? What are the limitations and what kind of.
Pengantar Teknologi Mobile 12
Building Mobile Apps in the Cloud – Comparing Approaches.
Dirk van Schalkwyk Supervisor: Prof Greg Foster Co-Supervisor: Mrs Madeleine Wright Project Title: A Comparative Study of JME and Flash Lite for Mobile.
Writing Your First MIDlet Running JAVA on a Cell Phone Jon A. Batcheller January 27, 2004.
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..
Developing an Application with J2ME Technology Scott Palmer, Nat Panchee, Judy Sullivan, Karen Thabet, Sten Westgard.
J2ME RMI 1 Java 2 Platform, Micro Edition Implementation of J2ME RMI Application Farooq Sheikh.
© 2009 Research In Motion Limited Advanced Java Application Development for the BlackBerry Smartphone Trainer name Date.
Molde University College INF 245 Fall 2007 OBø 1 INF245 Mobile Applications Networking H 2007 Ola Bø.
11 Web Services Dr. Miguel A. Labrador Department of Computer Science & Engineering
Making Cell Phone Games An Overview Ray Ratelis Guild Software, Inc.
Mobile Application Development
5 th Nov 2003 Mobile Technical Internet Architecture Terminals and Terminal software Samuli Lahnamäki Martta Seppälä
V0.01 © 2009 Research In Motion Limited Understanding Java APIs for Mobile Devices Trainer name Date.
Cosc 4730 Phone Programming in Java An Introduction.
Java 2 Micro Edition Mano Chen Senior Technical Consultant
Java Platform, Micro Edition (J2ME)
Java 2 Platform, Micro Edition (J2ME) By Xiaorong Wang.
J2ME and WAP Technologies CSCI – Independent Study Fall 2002 Presented by: Kashif Syed.
Introduction to Mobile Applications. Wireless Applications Personal Time and KnowledgeManagemnt Personal Health & Security PersonalNavigation Remote Monitoring.
Symbian os with smart phones Guided by: Hetal A Josiyara
EclipseME Java Micro Edition The Eclipse Way Craig Setera April 19, 2006.
J2ME Java for Mobile Environments Based on J2ME In A Nutshell, by Kim Topley, O’Reilly & Associates Inc., 2002, and Tetris by Alexei Patinov.
An Introduction to the Java ME Project Jens A Andersson.
J2ME Technology J2ME Home Monitoring. The Java™ 2 Platform.
Getting Started with JXTA for J2ME Advisor : Dr. Ching-Long Yeh Report : DI.2, 洪泰昌 ( ) Course: XML 文件管理.
Java Mobile Application sms,sim,mms and barcode application Presented by Ayedh(SIM and MMS) Asad(SMS and Barcode Application)
Week II Platforms and Engines. Overview Platforms and Engines Tools and SDKs Netbeans Game Development Walkthrough
Framework and application bytecode size CLDC MIDP kXML parser Utility classes Graphics Logic (MIDlet) Application Data (XML file)
J2ME Presented by May Sayed & Menna Hawash. Outline Introduction “Java Technology” Introduction “What is J2ME?” J2ME Architecture J2ME Core Concepts 
© 2002 IBM Corporation Confidential | Date | Other Information, if necessary June, 2011 Made available under the Eclipse Public License v Mobile.
Wireless Java Possibilities, Services, Limitations, and Competitors.Wireless Java.
 Installation of Android Development Environment  Creating the App with OpenGL ES API  Running the App on Emulator Android App Development.
The Java Platform, The Java Language, JDK, IntelliJ
The way of hybrid mobile development Hybrid Mobile Applications Telerik Software Academy
Mobile Programming Mobile Programming - Ordibehesht Ordibehesht 1390.
Exploring Mobile Device Networking Lesson 4. Exam Objective Matrix Skills/ConceptsMTA Exam Objectives Understanding Networking for Mobile Devices Network.
Analysis And Research Of System Security Based On.
Android operating system N. Sravani M. Tech(CSE) (09251D5804)
The Java Platform Micro Edition Java ME
Java N Amanquah.
Building Web Apps with Servlets
Lab 3: More Phone-Based Techniques
By Jeff Heaton An Overview of J2ME By Jeff Heaton
DSDP Mobile Tools for Java 1
Presentation transcript:

Martin Løbger – IT Konsulent

Rich vs. Reach En introduktion til J2ME/JavaME

The Chasm Reach Rich J2MEiPhone Android Symbian Windows Mobile

Konsulentens svære valg...er ikke så svært J2MESymbian iPhone/ Android Windows Mobile Rich Reach

Symbian Eget af Nokia På vej mod Open Source Forum Nokia Carbide.c++ C/C++ IDE –Baserete på Eclipse plugins

Symbian OS API og C++ kode stilen static const char hellorom[] = “hello”; _LIT(KHelloROM, "hello"); const char *helloptr = hellorom; TPtrC helloPtr(KHelloROM); s/Symbian_C++/Code_and_Examples.xhtml

Java Udviklet af SUN Microsystems Fortolket sprog Bytekode Pakket i JAR filer (zip format) Obfuscating Magic token: CAFEBABE

J2ME

MIDP – JSR 118 javax.microedition.io javax.microedition.lcdui javax.microedition.lcdui.game javax.microedition.media javax.microedition.media.control javax.microedition.midlet javax.microedition.pki javax.microedition.rms

Den (langt fra) komplette JSR liste JSR 75 File connection v1.0 and PIM v1.0 APIs JSR 82 APIs for Bluetooth v1.1 JSR 118 MIDP v2.1 JSR 120 Wireless Messaging API 1.1 JSR 135 Mobile Media API 1.1 (audio and video play, audio capture only; does not support video capture, camera control, or FM radio) JSR 139 Connected Limited Device Configuration (CLDC) 1.1 JSR 172 JAX-XML Web Services API (XML parsing) and JAX-RPC API JSR 177 Security and Trust Services APIs SATSA-APDU and SATSA-CRYPTO JSR 179 Location API 1.0 JSR 184 Mobile Graphics API 1.1 JSR 205 Wireless Messaging API 2.0 JSR 211 Content Handler API 1.0 JSR 226 Scalable 2D Vector Graphics API 1.0 JSR 234 Advanced Multimedia Supplements (3D Audio & Music, Audio mixing, including audio progressive upload and video progressive playback) 1.1 JSR 248 Mobile Service Architecture Subset API 1.0 Nokia UI API 1.1a

Kom godt igang NetBeans Eclipse Mobile Tools for Java ( ) –Tidligere kendt som EclipseME ( ) SDK –SUN Java Platform Micro Edition SDK –Nokia S40 –Sony Ericsson –LG –Blackberry –Skype/Amoi –Windows Mobile

Java – næsten som vi kender det J2SE public class Hello { public static void main(String[] args) { System.out.println("Hello, World!"); } J2ME import javax.microedition.midlet.MIDlet; public class Hello extends MIDlet { public void startApp() { System.out.println("Hello, World!"); }

Hello World Demo

/** * Tries to retrieve the IMEI number of the phone. Not all platforms * supports this feature. * The IMEI number or "na" if the platform does not support this * feature. */ protected String getIMEI() { String[] imeiProperties = { // Generic "IMEI", "phone.imei", "device.imei", "com.imei", // Nokia specific "com.nokia.IMEI", "com.nokia.mid.imei", // Sony Ericsson specific "com.sonyericsson.imei", // Motorola specific "com.motorola.IMEI", // Samsung specific "com.samsung.imei", // Siemens specific "com.siemens.imei" }; for (int i = 0; i < imeiProperties.length; i++) { try { if (System.getProperty("microedition.platform").startsWith("Nokia6280")) { continue; } String imei = System.getProperty(imeiProperties[i]); if (imei != null) { return imei; } catch (Exception e) { } return "na"; }

/** * Tries to retrieve the IMEI number of the phone. Not all platforms * supports this feature. * The IMEI number or "na" if the platform does not support this * feature. */ protected String getIMEI() { String[] imeiProperties = { // Generic "IMEI", "phone.imei", "device.imei", "com.imei", // Nokia specific "com.nokia.IMEI", "com.nokia.mid.imei", // Sony Ericsson specific "com.sonyericsson.imei", // Motorola specific "com.motorola.IMEI", // Samsung specific "com.samsung.imei", // Siemens specific "com.siemens.imei" }; for (int i = 0; i < imeiProperties.length; i++) { try { if (System.getProperty("microedition.platform").startsWith("Nokia6280")) { continue; } String imei = System.getProperty(imeiProperties[i]); if (imei != null) { return imei; } catch (Exception e) { } return "na"; }

byte data[] = null; HttpConnection connection = (HttpConnection)Connector.open(“ Connector.READ_WRITE); try { if (postData != null) { connection.setRequestMethod(HttpConnection.POST); connection.setRequestProperty("Content-Type", "text/xml; charset=utf-8"); OutputStream os = connection.openOutputStream(); try { os.write(postData.getBytes()); // os.flush(); //Including this line may produce undesired results on certain devices /* * If you call os.flush(), some devices will send the * request in HTTP 1.1 "chunked" encoding by adding a * "Transfer-encoding: chunked" header to the request * and writing the size of each block of data in * hexadecimal form as a text line before the data bytes * themselves. This is repeated for any number of blocks * you send, usually demarcated by calls to flush(). If * you have a HTTP 1.1-compliant Web server this should * be transparent to your server side scripts, but if * you do not, you will either want to avoid calling * flush() (though some devices may still chunk for you * automatically) or write some HTTP 1.1 chunk handling * code in your server scripts. All you will need to do * in the latter case is read the first text line of the * response, extract the size from it (i.e. "C\r\n" * where C means 12 bytes of chunk follow), and then * read 12 bytes of response data. Then read another * line to see if there is another chunk size, and * repeat until stream is closed or your script has all * the data it needs. See the HTTP 1.1 specification for * more details. */ } finally { os.close(); }

Test, test & test Modning Fysiske devices –Alle producenter –Bredt udsnit af modeller (eks. Nokia S40 + S60) –Skærmstørrelser –JSR features

Remote Device Access Services

Deploying Bluetooth MMS Web Server –Mimetypes.jarapplication/java-archive.jadtext/vnd.sun.j2me.app-descriptor

JAD & JAR JAD – Java Descriptor MIDlet-1: Main,,dk.hiq.helloworld.Main MIDlet-Jar-URL: [webserver]/HelloWorld.jar MIDlet-Name: PanicWorld MIDlet Suite MIDlet-Vendor: MIDlet Suite Vendor MIDlet-Version: MicroEdition-Configuration: CLDC-1.1 MicroEdition-Profile: MIDP-2.1 JAR – Java Archive Zip fil.class filer Manifest Resources (read only)

Konklusion Reach –Tja, i teorien –Man kan dog komme langt Code once, deploy many –Nok snarere: Code a couple of times, deploy many