Guide to getting started in J2ME for the Motorola A780 phone

Similar documents
Installing Photran with Eclipse (MinGW or Cygwin)

Campuses that access the SFS nvision Windows-based client need to allow outbound traffic to:

Transferring a BERNINA V8 software license

Enabling Your Personal Web Page on the SacLink

WorldShip PRE-INSTALLATION INSTRUCTIONS: INSTALLATION INSTRUCTIONS: Window (if available) Install on a Single or Workgroup Workstation

I - EDocman Installation EDocman component EDocman Categories module EDocman Documents Module...2

These tasks can now be performed by a special program called FTP clients.

Municode Website Instructions

Deploy Your First Cloud Foundry App to Any Cloud Foundry Service Provider

Integrating QuickBooks with TimePro

PowerTeacher Classroom Management Tool Quick Reference Card

Programming Project: Building a Web Server

Installing the Citrix Citrix Receiver 3.3 from Citrix Web Interface for SSL VPN Users

INSTALLING CCRQINVOICE

istartsmart 3.5 Upgrade - Installation Instructions

ENSC 351 software installation instructions

August 22, 2006 IPRO Tech Client Services Tip of the Day. Concordance and IPRO Camera Button / Backwards DB Link Setup

Getting Started with the SDAccel Environment on Nimbix Cloud

Trimble Survey GNSS Firmware Version 4.81 (July 2013)

CROWNPEAK DESKTOP CONNECTION (CDC) INSTALLATION GUIDE VERSION 2.0

BI Publisher TEMPLATE Tutorial

Apache Solr for FSI SERVER. User Manual. Version 4.5

Wave IP 4.5. CRMLink Desktop User Guide

1on1 Sales Manager Tool. User Guide

Using the Swiftpage Connect List Manager

Configuring the McAfee Windows Event Collector Management Utility *Also can provide client transmission of other non-windows log files*

Backup Operator Mode User Manual

RISKMAN REFERENCE GUIDE TO USER MANAGEMENT (Non-Network Logins)

Date: October User guide. Integration through ONVIF driver. Partner Self-test. Prepared By: Devices & Integrations Team, Milestone Systems

FAQ. Using the Thinkific Learning Platform

Graduate Application Review Process Documentation

Extended Vendors lets you: Maintain vendors across multiple Sage 300 companies using the Copy Vendors functionality. o

Second Assignment Tutorial lecture

DS-5 Release Notes. (build 472 dated 2010/04/28 08:33:48 GMT)

Project #1 - Fraction Calculator

Tutorial on Eclipse Leshan Internet of Things (2IMN15) , Eindhoven University of Technology By Leila F. Rahman

TECHNICAL REQUIREMENTS

Enterprise Installation

HPE AppPulse Mobile. Software Version: 2.1. IT Operations Management Integration Guide

Using the Swiftpage Connect List Manager

The screenshots/advice are based on upgrading Controller 10.1 RTM to 10.1 IF6 on Win2003

Troubleshooting Citrix- Published Resources Configuration in VMware Identity Manager

Firmware Upgrade Wizard v A Technical Guide

Proficy* System Requirements

Launching Xacta 360 Marketplace AMI Guide June 2017

Quick Installation Guide

Create Your Own Report Connector

DocAve 6 Deployment Manager

Upgrade Guide. Medtech Evolution General Practice. Version 1.9 Build (March 2018)

Lab 0: Compiling, Running, and Debugging

MyUni Adding Content. Date: 29 May 2014 TRIM Reference: D2013/ Version: 1

IMC QoS Manager 7.3 (E0502) Copyright 2015, 2016 Hewlett Packard Enterprise Development LP

Secure File Transfer Protocol (SFTP) Interface for Data Intake User Guide

Repstor custodian. On Premise Pre-Requisites. Document Version 1.1 January 2017

UiPath Automation. Walkthrough. Walkthrough Calculate Client Security Hash

Lab# 10: Embedded Applications and Location Tracking Applications

Technical Paper. Installing and Configuring SAS Environment Manager in a SAS Grid Environment

USER GUIDE. Thanks for purchasing the igate! You ll need to follow these five Configuration Steps to get your igate up and running:

Case Metrics Guide. January 11, 2019 Version For the most recent version of this document, visit our documentation website.

In Outlook, how do I allow other users to view my Calendar or other folders in my Exchange mailbox?

Kaltura Video Extension for SharePoint 2013 Deployment Guide for Microsoft Office 365. Version: 1.0

TN How to configure servers to use Optimise2 (ERO) when using Oracle

WebEx Web Conferencing Quick Start Guide

Using MeetingSquared as an Administrator

Technical Paper. Installing and Configuring SAS Environment Manager in a SAS Grid Environment with a Shared Configuration Directory

Introduction to Eclipse

REFWORKS: STEP-BY-STEP HURST LIBRARY NORTHWEST UNIVERSITY

UPGRADING TO DISCOVERY 2005

Properties detailed info There are a few properties in Make Barcode to set for the output of your choice.

Form Filing Instructions

Little Green Button (LGB)

DIVAR IP 3000 Field Installation Guide

Installing and using QGIS

DAVE TM & DAVE TM SDK

Using CppSim to Generate Neural Network Modules in Simulink using the simulink_neural_net_gen command

Single File Upload Guide

Troubleshooting of network problems is find and solve with the help of hardware and software is called troubleshooting tools.

Element Creator for Enterprise Architect

BANNER BASICS. What is Banner? Banner Environment. My Banner. Pages. What is it? What form do you use? Steps to create a personal menu

Tool Chain Setup User Guide

SAS Hot Fix Analysis, Download and Deployment Tool

Open CASCADE Technology. Building OCCT with WOK CONTENTS

Interfacing to MATLAB. You can download the interface developed in this tutorial. It exists as a collection of 3 MATLAB files.

Internet Explorer Configuration Reference

CaseWare Working Papers. Data Store user guide

Element Creator for Enterprise Architect

HW4 Software version 3. Device Manager and Data Logging LOG-RC Series Data Loggers

User Guide. Document Version: 1.0. Solution Version:

Exporting and Importing the Blackboard Vista Grade Book

I. Introduction: About Firmware Files, Naming, Versions, and Formats

Introduction to Adobe Premiere Pro for Journalists:

Gmail and Google Drive for Rutherford County Master Gardeners

Preparation: Follow the instructions on the course website to install Java JDK and jgrasp on your laptop.

Upgrading Kaltura MediaSpace TM Enterprise 1.0 to Kaltura MediaSpace TM Enterprise 2.0

Migrating iway Data Quality Server Plans and Components on Windows

Entering an NSERC CCV: Step by Step

Troubleshooting Citrix- Published Resources Configuration in VMware Identity Manager

Outlook Web Application (OWA) Basic Training

Class Roster. Curriculum Class Roster Step-By-Step Procedure

NiceLabel LMS. Installation Guide for Single Server Deployment. Rev-1702 NiceLabel

Transcription:

Guide t getting started in J2ME fr the Mtrla A780 phne This guide will take yu thrugh setting up a build envirnment fr J2ME in Windws and in writing a few sample applicatins fr the A780 phne. There are sme ntes at the end if yu are n anther platfrm, but we strngly recmmend using a Windws envirnment s that yu can make full use f the simulatr and debug utput. 1. Setting up Eclipse We recmmend using Eclipse fr yur Java editing. If yu're nt familiar with Eclipse, yu can get mre infrmatin here: http://www.eclipse.rg/ The latest versin f Eclipse can be dwnladed here: http://www.eclipse.rg/dwnlads/dwnlad.php?file=/eclipse/dwnlads/drps/ R-3.1.1-200509290840/eclipse-SDK-3.1.1-win32.zip 2. Setting up the Mtrla J2ME SDK Next, yu'll need t set up the Mtrla SDK. Yu will need t create an accunt n the Mtcder website: https://www.mtcder.cm/mtrla/template.jsp;jsessinid=1efdf:43cd0cee:99 0f451891647ff?filename=center_registratin.jsp Then dwnlad the latest SDK frm: http://www.mtcder.cm/mtrla/dwnlad.jsp?filename=dwnlads/files /SDK542.zip Install this SDK t yur windws system in the default directry (makes later steps much easier!) 3. Setting up EclipseME J2ME Plugin Next, yu need t set up the J2ME plugin that will tie the Mtrla SDK int the Eclipse envirnment. Install EclipseME with these instructins: http://eclipseme.rg/dcs/installeclipseme.html Cnfigure EclipseME with these instructins: http://eclipseme.rg/dcs/cnfiguring.html

4. Creating a simple J2ME applicatin Here's a basic runthrugh n hw t create a simple J2ME applicatin, basically a J2ME hell wrld. 1. Create a new J2ME prject: http://eclipseme.rg/dcs/createprject.html 2. Create a new Midlet in the prject named "HellWrld" A midlet is a J2ME applicatin and represents the main UI class fr a prject. http://eclipseme.rg/dcs/createmidlet.html 3. Yu can use the fllwing surce fr the midlet: Hellwrld.java 4. Yu can debug and install using the installatin instructins belw. 5. Debugging J2ME applicatins in the simulatr This sectin will cver debugging and the use f the M3 simulatr in cnjunctin with Eclipse. It is recmmended that yu try t run applicatins in the emulatr befre trying t run them n the phne. 1. Chse Run... frm the Run menu f ecipse. 2. Under Cnfiguratins, duble click n the header Wireless Tkit Emulatr t create a new cnfiguratin. The prject name shuld be autppulated with yur current prject. Under "Executable: Midlet" enter the name f yur Midlet. 3. Under the emulatin, platfrm definitin tab, chse "Mtrla SDK fr J2ME MOJM3" 4. Click n Run t start the Midlet in the emulatr. T debug instead f run, cmplete the same setup under "debug..." 6. Installing the applicatin n the phne There are tw files needed t install yur J2ME applicatin n the phne. One is the jar file which cntains all f yur cmpiled java cde. The ther is the jad file while cntains metadata abut yur applicatin and permissins infrmatin. Bth f these are generated by Eclipse. T make sure they have been updated prperly befre lading them nt the phne, right click n yur prject name in the Package Explrer and select "J2ME" "Create Package" frm the cntext menu. This will frce a regeneratin f the jar and jad file in the deplyed flder fr yur prject. Make sure yu phne is in USB Mass Strage mde by ging t the main menu, set up, usb mde and chsing "mass strage." Select "save" t exit ut f the settings. Yur phne will nw munt as a USB hard drive when plugged int yur cmputer. Plug in yur phne and pen up a file explrer windw with the newly munted drive. Cpy the jad and jar files frm the deplyed flder f yur prject t the drive. Wait a few secnds and then unplug yur phne. The files are nw in the flash file system f the phne.

Navigate t the flder that yu saved the files t n yur phne by ging t the main menu and pening the "files" applicatin. Click nce n the jad file (NOT the jar file) t install the applicatin. Say k t any dialgs that may appear and chse the main menu grup that yu want the shrtcut t yur new applicatin t appear in. Yu may nw launch yur applicatin frm the main menu by clicking n its icn. Nte: Since yu dn't have a debugging cnsle when yu are running applicatins n the phne, it is recmmended that yu catch all exceptins and call the fllwing methd with the tstring() f yur exceptin: public vid displayexceptin(string e) { Alert a = new Alert("errr:",e,null,AlertType.ERROR); a.settimeut(alert.forever); mydisplay.setcurrent(a,titlescreen); 7. A wrd abut permissins When yu use varius classes in J2ME, yu need t make sure yu set the permissins in yur JAD file apprpriately. Yu can d this by clicking n the JAD file in yur main prject (nt the ne in "deplyed") and ging t the "ptinal" tab. Under "Midlet Permissins:" add the apprpriate permissins cmma separated. The fllwing are cmmn permissins: javax.micreditin.lcatin.lcatin cm.mtrla.file.readaccess cm.mtrla.file.writeaccess javax.micreditin.i.cnnectr.http cm.mtrla.phne javax.wireless.messaging.sms.send javax.wireless.messaging.sms.receive 8. Example cde: 0. HTTP Dwnlad: StringBuffer s = new StringBuffer(); HttpCnnectin c = (HttpCnnectin)Cnnectr.pen("http://web.mit.edu/index.ht ml"); InputStream is = c.peninputstream(); byte b; while ((b = (byte)is.read())!= -1) { s.append((char)b);

is.clse(); c.clse(); Permissins needed: javax.micreditin.i.cnnectr.http 1. Writing t a file: FileCnnectin sc = (FileCnnectin)Cnnectr.pen("file:///phne/tmp.txt"); OutputStream s = sc.penoutputstream(); s.write(("text t g int the file").getbytes()); s.flush(); s.clse(); Permissins needed: cm.mtrla.file.writeaccess 2. Reading a file: FileCnnectin sc = (FileCnnectin)Cnnectr.pen("file:///phne/tmp.txt"); InputStream is = sc.peninputstream(); StringBuffer sfar = new StringBuffer(); byte c; while ((c = (byte)is.read())!= -1){ sfar.append((char)c); is.clse(); Permissins needed: cm.mtrla.file.readaccess 3. Sending an SMS: sender = (MessageCnnectin)Cnnectr.pen("sms://"); TextMessage t = (TextMessage)sender.newMessage(MessageCnnectin.TEXT_MESSA GE); t.setpayladtext(message); t.setaddress("sms://" + cntactnumber); sender.send(t); Permissins needed: javax.wireless.messaging.sms.send 4. Listening fr an SMS: blah Permissins needed: javax.wireless.messaging.sms.receive 5. Getting GPS lcatin: LcatinPrvider lc = LcatinPrvider.getInstance(null); lc.setlcatinlistener(ll,0,-1,-1); Lcatin lcatin = lc.getlcatin(60*3);

String lat = lcatin.getqualifiedcrdinates().getlatitude(); String ln = lcatin.getqualifiedcrdinates().getlngitude(); Permissins needed: javax.micreditin.lcatin.lcatin 6. Getting Cell ID: String cellid = System.getPrperty("phne.cid"); Permissins needed: nne 7. Placing a phne call: Dialer dialer = Dialer.getDefaultDialer(); dialer.startcall("6172531000"); 9. Helper classes Permissins needed: cm.mtrla.phne The fllwing helper classes implement cmmn features f standard desktp java that yu might find useful t use in J2ME: PrpertiesFile.java StringTkenizer.java BufferedInputReader.java Timer.java / TimerListener.java 10. J2ME develping n Linux/Mac While the Mtrla emulatr nly runs n Windws, yu shuld be able t cde J2ME apps n ther platfrms. Sn, we will pst the jar file fr the a780 sdk that yu can link int yur prject in eclipse n any platfrm. 11. Mre cmplete references Mtrla a780 develper guide J2ME In a Nutshell