30
J2ME Guide – Part 1
This is the first module of a guide about MIDP programming with the J2ME environment. In this first part we’ll introduce configuration and profile, fundamental concepts that are very important for understanding MIDP. After that we’ll install the WTK 2.5 that is the toolkit for creating, developing and testing your application to be used on real MIDP 2.0 devices.
There are at least two valid reasons for embedding a Flash Player instance into a native c++ application: the possibility of having two or more instances of the player running at the same time and the presence of our personalized icon in the system task manager.
To achieve this our application have to handle an instance of the player using CDocumentHandler class and in particular OpenFileEmbeddedL mehotd:
Embedded launching means that the UI of an application, which is responsible for handling given data type, is embedded into the parent application. There will be only parent applications icon shown in the fast swap window when an application is embedded.
The only thing we must remember is that our native application have to handle exit event from the embedded player.
So, basically, our view have to be defined as an Observer for such type of event by implementing MAknServerAppExitObserver interface and by defining HandleServerAppExit method:


To launch our document handler we must do something like this:

By this way the default player for the specified mime type is embedded in our application view… pretty cool! If we want to call a specific player we must define the specific UID in our TDataType object (please refer to the SDK documentation for any doubt).
I’ve compiled and tested the code for Symbian 9.x, but it can be used also for previous symbian versions. I hope this can be helpful. All comments, suggestions and corrections are appreciated.
THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
About MobileRevamp
The aim of this community is to share as much as possible information related to the mobile development using all the social networks and the new capabilities of the NET to make easier find updated contents and to create a deep feeling of connection between developers.
Updates
Archives
Recent Comments
- Giorgio Natili on Mobile Flash player 10.1 OR AIR 2.6 on Android?
- Patric on Mobile Flash player 10.1 OR AIR 2.6 on Android?
- AIR4Android on How to build your first AIR4Android application using FDT and Eclipse
- Tonsula on How to build your first AIR4Android application using FDT and Eclipse
- jbozabalian on Cross plarform mobile development
Adobe Mobile UGs
- Adobe Groups
- Australia MaDUG
- Boston MaDUG
- Brazil MaDUG
- Copenhagen MaDUG
- Dallas MaDUG
- India MaDUG
- Polish MaDUG
- Spain MaDUG
- UK MaDUG
Authors









