J2me Midlets For Android Download Rating: 4,5/5 8320 votes

About This Article

Download conformant Java ME. Here's a quote: This port is merely a proof-of-concept that running J2ME applications and midlets on Android is possible. Soon you can run any of the same MIDlets using phoneME on Android phones as you can run on the 3 billion Java ME feature phones in the world. Android users can still run midlets with J2ME Loader emulator. The.jad file describing a MIDlet suite is used to deploy the applications in one of two ways. Over the air (OTA) deployment involves uploading the.jad and.jar files to a Web server which is accessible by the device over HTTP.


Apr 19, 2017  Download Interview Questions for J2ME apk 1.0.1 for Android. It is for software professional engineering students for prepare J2ME interview. Using APKPure App to upgrade Interview Questions for J2ME. Hello World J2ME Style, Multiple MIDlets in a MIDlet Suite, J2ME Wireless Toolkit,J2ME Best Practices and Patterns: The Reality of.

This article gives brief introduction on MIDlet class and it’s Life Cycle. Sample code snippet demonstrating the MIDlet lifecycle is provided at the end of this document.


Scope:


This article is intended for MIDP developers wishing to develop MIDlet applications. It assumes good knowledge of java programming language. This document focuses on Java ME MIDlet class and therefore explaining the Java technology is out of the scope in this documentation.
To know more about Java ME basics and Java programming language, refer to the Knowledge Base under Samsung Mobile Innovator (SMI).
http://developer.samsung.com/java/


Introduction

Java ME also known as J2ME is a stripped-down version of Java targeted at devices which have limited processing power and storage capabilities and intermittent or fairly low-bandwidth network connections. These include mobile phones, pagers, wireless devices and set-top boxes among others.
At the heart of Java ME are three core concepts:


Configurations (CLDC)
Profiles (MIDP)
Optional packages

You can't write a J2ME application without understanding these concepts, because they determine the features of Java that you can use, which application programming interfaces (APIs) are available, and how your applications are packaged.
So before moving ahead to Java ME programming, it is recommended to read the Java ME documents that give in depth detail of Java ME. Please refer to Samsung Mobile Innovator > Java > Knowledge Base section.
Java and Samsung SDK installation is the pre-requisite for developing Java ME Applications.
If user has not downloaded or installed Java, IDEs please refer to documents present in Samsung Mobile Innovator > Java > Knowledge Base section.
Similarly to download Samsung SDK, please refer to Samsung Mobile Innovator > Java > Tools & SDK section.
Latest version of Samsung SDK is Samsung SDK 1.2.1 for the Java ME Platform.


Overview


Java ME programs are called as MIDlet. It is just like you write applications and applets in Java, you write MIDlet in Java ME.


What is MIDlet?


A MIDlet is a Java application framework for the Mobile Information Device Profile (MIDP). MIDlet is a MID Profile application which is managed and controlled by the Application Management Software (AMS) built in the device.
The application management software (AMS) is the software on a device that manages the downloading and life-cycle of MIDlets. The AMS provides the runtime environment for a MIDlet. It enforces security, permissions, and execution states, and provides system classes and scheduling.
Just as J2SE applications have an entry point (any class with a main() method). MIDlets javax.microedition.midlet.MIDlet class that offers the abstract startApp() method which serves as the entry point to your MIDlet.
One should extend the abstract javax.microedition.midlet.MIDlet class or in other words the MIDlet needs to be a subclass (derived) of (from) javax.microedition.midlet.MIDlet class.
The javax.microedition.midlet.MIDlet class acts as an interface between the MIDlet and the application management software.


Life-Cycle of MIDlet


Understanding the MIDlet life-cycle is fundamental to creating any MIDlet. The life-cycle defines the execution states of a MIDlet:
There are three possible states in a MIDlet's life-cycle as shown in Figure 1:
Paused

Active

Destroy


MIDlet has three life-cycle notification abstract methods related to MIDlet lifecycle:
startApp()
pauseApp()
destroyApp(boolean unconditional)
These methods need to be overridden by the MIDlet.
paused: The MIDlet instance has been constructed and is inactive. pauseApp() method causes the MIDlet to enter into paused State. This is where MIDlet lose focus.
active: The MIDlet is active. startApp() method causes the MIDlet to enter into active state. This is where the MIDlet gains focus.
destroyed: The MIDlet has been terminated. destroyApp(boolean unconditional) method causes the MIDlet to enter in destroyed state.
The following definitions are used in the MIDlet lifecycle:
Application management software - a part of the device's software operating environment that manages MIDlets. It directs the MIDlet through state changes.
MIDlet - a MIDP application on the device. The MIDlet can signal the application management software about whether is it wants to run or has completed.
MIDlet States - the states a MIDlet can have are defined by the transitions allowable through the MIDlet.


MIDlet Transistions


When a MIDlet is executed, initially it is in paused state. When the execution environment changes focus to the executed MIDlet, midlets startApp() is called causing MIDlet to switch into Active state and gains focus.
MIDlet now start receiving key events and rendering of the MIDlet on physical display is shown. MIDlet becomes visible to the user; user can now interact with the MIDlet.
If a Runtime exception occurs during startApp() the MIDlet will be destroyed immediately. Its destroyApp(boolean unconditional) will be called allowing the MIDlet to cleanup.
When the execution environment switch focus from the executing MIDlet, its pauseApp() is called. MIDlet now enters into Paused state. Key events will not be consumed by the MIDlet in Paused. MIDlet that is currently in Active state consumes Key events. Also MIDlet may continue to render in background. However rendering of the MIDlet will not be visible on physical display. In the Paused state the MIDlet must release shared resources and become quiescent.
If a Runtime exception occurs during pauseApp the MIDlet will be destroyed immediately. Its destroyApp(boolean unconditional) will be called allowing the MIDlet to cleanup.
Developer should implement startApp() and pauseApp() properly as these methods are called as an when MIDlet transits from Active state to Paused state.
Also when MIDlet regains Active state, MIDlet doesn’t have knowledge of its suspension. Common example is of time based game MIDlet. When MIDlet enters into Paused state, time calculation should be stopped and should start only when MIDlet regains focus.
When developer exits MIDlet, ( destroyApp(boolean unconditional) should be called by developer ), destroyApp(boolean unconditional) signals the MIDlet to terminate and enter the Destroyed state. In the destroyed state the MIDlet must release all resources and save any persistent state. This method may be called from the Paused or Active states also.
MIDlets should perform any operations required before being terminated, such as releasing resources or saving preferences or state.
The destroyApp(boolean unconditional) method provides an unconditional parameter; if it is set to false, the MIDlet is allowed to refuse its termination by throwing a MIDletStateChangeException. If the parameter is set to true, the AMS terminates the MIDlet irrespective of what state the MIDlet is in.
If a Runtime exception occurs during destroyApp then they are ignored and the MIDlet is put into the Destroyed state.


Initiating MIDlet StateChange


MIDlet can initiate some state changes itself and notifies the application management software of those state changes by invoking one of these methods:
notifyDestroyed(): This method is used by a MIDlet to notify the application manager that it has entered into the destroyed state. The application management software will not call the MIDlet's destroyApp(boolean unconditional) method
notifyPaused(): This method notifies the application management software that the MIDlet does not want to be active and has entered the paused state. Invoking this method will have no effect if the MIDlet is destroyed, or if it has not yet been started. It may be invoked by the MIDlet when it is in the Active state.
resumeRequest(): This method provides a MIDlet with a mechanism to indicate that it is interested in entering the active state. Calls to this method can be used by the application management software to determine which applications to move to the active state. When the application management software decides to activate a MIDlet, it will call that MIDlet's startApp() method. Figure 2 shows MIDlet transition.



API Description


Each MIDlet must extend the abstract MIDlet class found in the javax.microedition.midlet.* package, much like creating an applet by extending the java.applet.Applet class.
At the minimum, your MIDlet must override three methods of this abstract class, startApp(), pauseApp(), and destroyApp(boolean unconditional).
Following are the other defined methods in MIDlet class.

Table 1: MIDlet class methods.

Methods Description
int checkPermission(String permission) Get the status of the specified permission.
protected abstract void destroyApp(boolean unconditional) Signals the MIDlet to terminate and enter the Destroyed state.
String getAppProperty(String key) Provides a MIDlet with a mechanism to retrieve named properties from the application management software.
void notifyDestroyed() Used by MIDlet to notify the application management software that it has entered into the Destroyed state.
void notifyPaused()nbsp;Notifies the application management software that the MIDlet does not want to be active and has entered the Paused state.
protected abstract void pauseApp() Signals the MIDlet to enter the Paused state.
boolean platformRequest(String URL) Requests that the device handle (for example, display or install) the indicated URL.
void resumeRequest() Provides a MIDlet with a mechanism to indicate that it is interested in entering the Active state.
protected abstract void startApp() Signals the MIDlet that it has entered the Active state.

Sample MIDlet Code

Class: HelloMIDlet
Following Sample code shows MIDlet Life Cycle.


Downloads

This article can also be downloaded in Word Document and PDF format. Click on the following link to download:
Introduction to Java ME MIDlet


J2me Midlets For Android Download Pc

A MIDlet is an application that uses the Mobile Information Device Profile (MIDP) of the Connected Limited Device Configuration (CLDC) for the Java ME environment. Typical applications include games running on mobile devices and cell phones which have small graphical displays, simple numeric keypad interfaces and limited network access over HTTP.[1] Android users can still run midlets with J2ME Loader emulator.[2][3]

The .jad file describing a MIDlet suite is used to deploy the applications in one of two ways. Over the air (OTA) deployment involves uploading the .jad and .jar files to a Web server which is accessible by the device over HTTP. The user downloads the .jad file and installs the MIDlets they require.[4] Local deployment requires that the MIDlet files be transferred to the device over a non-network connection (such as through Bluetooth or IrDa, and may involve device-specific software).[5] Phones that support microSD cards can sometimes install .jar or .jad files that have been transferred to the memory card.

J2me Midlets For Android Download

MIDlet security[edit]

J2me Midlets For Android Download

MIDP 2.0 (JSR 118) includes a comprehensive security model based on protection domains. MIDlet suites are installed into a protection domain that determines access to protected functions. The MIDP 2.0 specification also includes a recommended practice for using public key cryptography to verify and authenticate MIDlet suites.

For definitive information, consult the MIDP 2.0 specification. For an overview of MIDlet signing using the Sun JavaTM Wireless Toolkit for CLDC, read the article Understanding MIDP 2.0's Security Architecture.

If you need more background on public key cryptography, try the article MIDP Application Security 1: Design Concerns and Cryptography.

Some PDAs (Blackberry, Palm), tablets (iPad, Android, Windows Surface RT), smart phones (iPhone, Android), gaming consoles (Nintendo Wii), MP3/MP4 players (iPod), and other personal mobile devices do not support the Java plug-in. See your device manufacturer's website to determine if Java is available for your specific device. Java jdk free download - JDK Heating & Air Conditioning, Opera Mini - fast web browser, Java Manager; Emulate Java, and many more programs. Java for Mobile Devices is a set of technologies that let developers deliver applications and services to all types of mobile handsets, ranging from price efficient feature-phones to the latest smartphones. Oracle Java ME SDK 8.2 is now available to support Oracle Java ME Embedded 8.2 and 8.1. Download java software for android tablet

The MIDP 1.0 specification constrained each MIDlet suite to operate in a sandbox wherein all of the APIs available to the MIDlets would prevent access to sensitive APIs or functions of the device. That sandbox concept is used in this specification and all untrusted MIDlet suites are subject to its limitations. Every implementation of this specification MUST support running untrusted MIDlet suites.

MIDP 2.0 introduces the concept of trusted applications that may be permitted to use APIs that are considered sensitive and are restricted. If and when a device determines that a MIDlet suite can be trusted then access is allowed as indicated by the domain policy. The Trusted MIDlet Suite Security section below describes the concepts. Any MIDlet suite that is not trusted by the device MUST be run as untrusted. If errors occur in the process of verifying that a MIDlet suite is trusted then the MIDlet suite MUST be rejected.

Restrictions[edit]

Unlike a Java applet, a MIDlet is limited to use of the LCDUI rather than the more familiar widgets of AWT and Swing. There are also restrictions on the size of .jar files and the number of concurrent HTTP connections based on the MIDP specification.

See also[edit]

References[edit]

J2me Sdk

  1. ^Topley, Kim (2002). J2ME in a Nutshell. O'Reilly Media. pp. 46–47. ISBN978-0-596-00253-4. Retrieved 3 March 2010.
  2. ^Currently actively maintained emulators
  3. ^Official releases on Playstore
  4. ^'Introduction to OTA Application Provisioning'.
  5. ^'Deploying Wireless Java Applications'.

J2me Games Download

Retrieved from 'https://en.wikipedia.org/w/index.php?title=MIDlet&oldid=915424534'