You are on page 1of 10

Richard's Mobile Blog

What is autumn but a sign that the other half of the world
has borrowed spring?
J2ME & Sony Ericsson
This page contains general useful, public information about developing on the Sony Ericsson phones with
Java 2, Microedition (J2ME). You will nd this information a useful supplemental to Sonys Developer
Website
Link to Sonys Developer Website
(hp://developer.sonyericsson.com)
Connection Proxy
Connection Proxy is a software utility that comes with the Sony Ericsson SDK 2.5.0.2 for the Java(TM) ME
Platform (hps://developer.sonyericsson.com/site/global/docstools/java/p_java.jsp). It is used to connect
your PC to a Sony phone.
This section covers tips and common issues that pop up in Connection Proxy so you can have a way of
dealing with them.
When Connection Proxy Wont Connect.
No need to be embarrassed. It happens to all of us at one time or another. Its a natural part of life. You
wait with anticipation while Connection Proxy gets all red up and ready to go. That unmistakable
Stauts: Connecting message winks at you telling you its eager to hook up.
Then it happens. Connection Proxy just simply stops making connections and leave you there
unsatised. And worse, it seems to send conicting messages about whats wrong. Does she it give you
a bogus message to divert your aention to whats really going on? Of is there something need to know
about? Does it have a headache? Did it get bad news? Is it telling you things just to pacify your ego?
Rest assured it happens to everyone. But, the good news is theres help. Start with a checklist:
J2ME & Sony Ericsson | Richard's Mobile Blog http://rschilling.wordpress.com/mobile-development/java-microedition-d...
1 of 10 4/20/2014 8:30 AM
(hp://rschilling.les.wordpress.com/2008/09/stock_fullscreen.png)
center buon
(hp://rschilling.les.wordpress.com/2008/09/gtk-go-back-ltr.png)
left
(hp://rschilling.les.wordpress.com/2008/09/stock_fullscreen.png)
center buon
(hp://rschilling.les.wordpress.com/2008/09/gtk-go-back-ltr.png)
left
(hp://rschilling.les.wordpress.com/2008/09/gtk-go-back-ltr.png)
left
(hp://rschilling.les.wordpress.com/2008/09/stock_fullscreen.png)
center buon
(hp://rschilling.les.wordpress.com/2008/09/go-next.png)
right
Push the Right Buttons
The phone has to have Java Developer Mode turned on. This means you have to know how to press the
right buons on your phone. Try
Graphics provided by The
Gnome Project
(hp://www.gnome.org).
Start the Relationship Over
A hint on the Sony Developer Connection (go to the webpage (hps://developer.sonyericsson.com
/docs/DOC-197)) about T610 and Z600 phones suggests to cycle the phone power. This worked for me on
the Z770i wouldnt connect up as well. Read as, turn o the phone, shut down Device Explorer and
Connection Proxy if theyre on, and then try again.
J2ME & Sony Ericsson | Richard's Mobile Blog http://rschilling.wordpress.com/mobile-development/java-microedition-d...
2 of 10 4/20/2014 8:30 AM
Be Patient and Do Things Right
One of the things I do that seems to cut down errors is to be patient with the software and methodical in
how I actually connect the phone physically to the computer. This seems to solve a lot of problems. When
disconnecting the phone, for example, dont just unplug the chord from the USB port. Shut down Device
Explorer and then disconnect the Connection Proxy rst. Then unplug the phone from the computer.
Kick Her It To The Curb and Upgrade
Make sure youre using the latest version of Connection Proxy and Device Explorer. If youre not then
this might be your problem. Installing the latest version actually solved a lot of connection problems for
me, especially when developing on the JP-8 phones. Check out this link
(hps://developer.sonyericsson.com/device/searchDevice.do?defaultSearch=true&
aributes=7096f489-22d6-4f12-89d2-b0ee1860b338&aributes=99f72d05-cee3-4af6-b41c-f90x06de352&
aributes=604d0y-3d33-46ec-85d2-917368f41d6e&aributes=d15dce77-2bd6-4947-b02b-ab4db3ebf09d&
aributes=32b8dcd0-7d3b-4d7d-a1d2-21796f359c59) for a list JP-8 phones.
Device Explorer
The Device Explorer is a software utility comes with the Sony Ericsson SDK 2.5.0.2 for the Java(TM) ME
Platform (hps://developer.sonyericsson.com/site/global/docstools/java/p_java.jsp). It is used to manage
MIDP applications on your Sony phone. Use it to install, delete, and debug the applications you write for
the phone.
Device Explorer relies on the Connection Proxy utility (see above) to communicate with your phone. In
other words, you have to start Connection Proxy and get a valid connection to your phone before Device
Explorer will work.
Errors
Device Explorer generates a number of errors. And, not surprisingly, some of them are not well
documented. So, all the ones Ive run into are here. Both the text is shown with the graphic so this
webpage can be searched.
OAFcode=44 EXEcode=1.
J2ME & Sony Ericsson | Richard's Mobile Blog http://rschilling.wordpress.com/mobile-development/java-microedition-d...
3 of 10 4/20/2014 8:30 AM
Error Text:
Install failed.
Internal method error: point-2 OAFcode=44 EXEcode=18
Application Management, Execution Environment error.
Execution Environment, authentication failure.
Reason: The phone date and time are not set properly.
This error shows up when you try to install a signed MIDlet suite onto the phone and the date and time
are not set. The MIDlet will upload to the phone and everything looks like its going ne, but then
suddenly, this error pops up just as the loading completes. This error is shown because the phone got the
MIDlet, but is complaining because it thinks the date and time of the certicate in the MIDlet is not valid.
Why would the phone think that? Its easy: the date and time of the phone are not set properly.
So I would expect to see this error whenever you install a signed MIDlet that has an expired certicate.
(hp://rschilling.les.wordpress.com
/2008/09/device-explorer-44-182.png)
Error shown when the certicate valid date does not agree with the phone
Security and Signing
Always ask your mother for permission. You know the rules. If shes not available, then get a certicate.
That way no one gets into trouble.
Sonys information on MIDlet Permissions from their forum: hps://developer.sonyericsson.com
/docs/DOC-1049 (hps://developer.sonyericsson.com/docs/DOC-1049).
A list of permissions used for different APIs in Java ME.
Add appropriate permissions to the Jad and MANIFEST le before the application is signed. In Netbeans,
J2ME & Sony Ericsson | Richard's Mobile Blog http://rschilling.wordpress.com/mobile-development/java-microedition-d...
4 of 10 4/20/2014 8:30 AM
its in the project properties, under Application Descriptor. Theres a tab on that form called API
Permissions.
The aribute in the .jad MANIFEST le will look something like this:
MIDlet-Permissions: javax.microedition.io.PushRegistry, javax.microedition.io.Connecto
To nd a list of permission seings in Sony Ericsson phones look here >>>
(hp://developer.sonyericsson.com/getDocument.do?docId=99421)
The official table of permissions
Net Access javax.microedition.io.Connector.hp
javax.microedition.io.Connector.hps
javax.microedition.io.Connector.cbs
javax.microedition.io.Connector.datagram
javax.microedition.io.Connector.datagramreceiver
javax.microedition.io.Connector.socket
javax.microedition.io.Connector.ssl
javax.microedition.io.Connector.serversocket
Messaging javax.microedition.io.Connector.sms
javax.microedition.io.Connector.mms
javax.wireless.messaging.cbs.receive
javax.wireless.messaging.mms.receive
javax.wireless.messaging.mms.send
javax.wireless.messaging.sms.receive
javax.wireless.messaging.sms.send
Application Auto Invocation javax.microedition.io.PushRegistry
javax.microedition.content.ContentHandler
Local Connectivity javax.microedition.io.Connector.comm
javax.microedition.io.Connector.bluetooth.client
javax.microedition.io.Connector.bluetooth.server
javax.microedition.io.Connector.obex.client
javax.microedition.io.Connector.obex.client.tcp
javax.microedition.io.Connector.obex.server
javax.microedition.io.Connector.obex.server.tcp
Multimedia Recording javax.microedition.media.control.RecordControl
javax.microedition.media.control.VideoControl.getSnapshot
javax.microedition.amms.control.camera.enableShuerFeedback
javax.microedition.amms.control.tuner.setPreset
J2ME & Sony Ericsson | Richard's Mobile Blog http://rschilling.wordpress.com/mobile-development/java-microedition-d...
5 of 10 4/20/2014 8:30 AM
Read User Data Access javax.microedition.io.Connector.le.read
javax.microedition.pim.ContactList.read
javax.microedition.pim.EventList.read
javax.microedition.pim.ToDoList.read
Write User Data Access javax.microedition.io.Connector.le.write
javax.microedition.pim.ContactList.write
javax.microedition.pim.EventList.write
javax.microedition.pim.ToDoList.write
Location javax.microedition.location.Location
javax.microedition.location.Orientation
javax.microedition.location.ProximityListener
Landmark javax.microedition.location.LandmarkStore.category
javax.microedition.location.LandmarkStore.management
javax.microedition.location.LandmarkStore.read
javax.microedition.location.LandmarkStore.write
Smart card javax.microedition.apdu.aid
javax.microedition.apdu.sat
javax.microedition.jcrmi
Authentication javax.microedition.securityservice.CMSMessageSignatureService
Call Control javax.microedition.io.Connector.sip
javax.microedition.io.Connector.sips
Other javax.microedition.payment.process
15 Comments
15 thoughts on J2ME & Sony Ericsson
asima says:
March 11, 2014 at 10:01 AM
Superb..!!!!sony mobiles
Reply
1.
Man Of Snow says:
August 17, 2011 at 9:19 AM
Hi, thanks for the useful information, well never break up! (the connection :D)
Im still unable to connect my JP-8 handset to connection proxy using Bluetooth! it shows me an error
message saying for JP-8 handsets network interfaces should be used. NOT com ports. Im using the
latest version!
Reply
rschilling says:
August 17, 2011 at 7:39 PM
2.
J2ME & Sony Ericsson | Richard's Mobile Blog http://rschilling.wordpress.com/mobile-development/java-microedition-d...
6 of 10 4/20/2014 8:30 AM
Gotcha. I guess I didnt realize you were trying to use Bluetooth as a proxy Youre in territory I
personally havent charted yet. It sounds like your phone is congured to connect to a network
(Internet?) using Bluetooth as a proxy, but that communication channel happens through COM
ports on the phone (which is like an on-board RS-232 port ). Depending on the type of
networking your application is trying to do, the OS may simply not be able to do networking over
that kind of port. You may have a case where your application wont work when connected to
Bluetooth for network access. Just a guess though
Reply
Steve says:
February 22, 2011 at 6:45 AM
hei,
i installed a j2me application on sony ericcson k850i. It is meant to restart after 1min after the
execution. But the application works ne but it is not running again. I did it using
PushRegistry.RegisterAlarm() method. Please help me x it.
It worked ne on nokia devices.
Thank you
Reply
rschilling says:
February 25, 2011 at 5:35 PM
Hi Steve. Thanks for writing in. I have seen this kind of. Thing a lot. It is no surprise that your
application behaves dierently or does not work in lile ways from phone to phone. That is part of
the complexity we all run into.
I cant help you solve this problem without seeing some code. So please feel free to post some.
In the meantine consider writing a lile test program that just has the one feature you are having
issues with. Then you can isolate specics of the bad behavior and make changes quickly.
Reply
3.
raj says:
March 8, 2010 at 9:21 AM
hey,
im basically into modding and that part of w910i and also have a few videos on youtube.
now i nd this topic too really interesting..
It would be of great help for me if you can tall me how to start on this
RON
Reply
rschilling says:
March 10, 2010 at 2:01 PM
What do you mean by modding, exactly?
Reply
4.
tequilacat says:
November 9, 2009 at 3:35 PM
5.
:-)
J2ME & Sony Ericsson | Richard's Mobile Blog http://rschilling.wordpress.com/mobile-development/java-microedition-d...
7 of 10 4/20/2014 8:30 AM
Hi
I stumbled upon your blog from your old post on hp://developer.sonyericsson.com/community
/thread/46135
Seems my question ts here nicely.
My software functions include controlling backlight. For SE phones (starting with K700, K750) I use
Nokia API.
Users report there are repeated problems on some phones (K800 , W910) while it works ne on other
(P1i, K750, many other modern non-smartphones released after K750)
To control backlight I use setLights, the function is below:
void setBacklight(boolean on , int intensityPercentage){
com.nokia.mid.ui.DeviceControl.setLights(0, on ? intensityPercentage:0);
}
Users report that on W910i instead of turning backlight ON the screen starts blinking, unlike models
like k750.
Is there some specic on K800 and similar models?
Another problem which is not exactly pertinent to K800:
after some idle (no keys pressed) the screen goes black. I do refresh backlight from separate thread,
using setLights(0,0), setLights (0,100) on some models it works , on other models it does not. Did
something change in backlight control as SE JavaPlatform evolves?
Looking forward to your answer
Alex
Reply
Sri says:
November 4, 2009 at 5:47 AM
Hi ,
I have developed a game and I have following issue.
The game loads and plays well from the Organizer>File Manager>Games menu but does not load
at all from the Entertainment>Games menu.
This issue is there when I tested on W995 but works ne on k800i.
Can YOU help me to gure out the issue?
Thank you.
Reply
rschilling says:
November 25, 2009 at 8:42 PM
Hi Sri.
Sorry for the late response. Been really busy and havent had time to blog.
But, to answer your question, I just dont have an idea o the top of my head. Thats not a very
maven like answer.
6.
J2ME & Sony Ericsson | Richard's Mobile Blog http://rschilling.wordpress.com/mobile-development/java-microedition-d...
8 of 10 4/20/2014 8:30 AM
However, you may nd a clue in the on device debugging output. What does that tell you. Hook
up the debugger and run the application from both places. Its possible youll get a permissions
error of some type? This is a phone dependent issue, so it may be just a simple case of bad phone
behavior.
Hope that helps.
Reply
ksian says:
October 17, 2008 at 8:38 AM
dear rschilling,
i already gure it out.. and able to emulate now..
thanks for your reply..
Reply
7.
rschilling says:
October 16, 2008 at 5:31 PM
Ksian,
The answer to your question is yes!
I recommend you use the latest version of Netbeans 6., and download the Sony Ericsson SDK. Follow
the instructions to install Netbeans rst, and then the Sony Ericsson SDK.
Once that is done, you can build your program, and run it in the Sony emulator. If your specic model
of phone doesnt show up on the list of emulators in Netbeans, its not a problem. Just pick any phone
that uses the same platform as the k800 (JP8 Java Platform 8). The emulator may look dierent, but
thats just cosmetic. The software will function the same as it will on the K800.
This also means its important for you to pay aention to the phone specications more. Which
phones run on JP7, and which ones run on JP8? JP7/JP8 refer to Sonys implementation of the Java
Virtual Machine on the Sony phones. You can nd out what one the phone youre interested in used
by looking at the phone specications on the Sony website.
Reply
8.
ksian says:
October 16, 2008 at 6:10 AM
hi, im quite new to j2me, and currently i am trying to porting a mobile game to sony ericsson k800, but
didnt have the real k800 handset, so is it possible to use the sony ericsson sdk without connect to real
handset?? i want to emulate in my own pc with sony ericsson sdk.. is it possible?
Thanks..
Reply
9.
Pingback: Todays Update: 15 SEP 2008 Richard Schillings Professional Weblog 10.
Pingback: Todays Update Richard Schillings Professional Weblog 11.
Blog at WordPress.com. | The Splendio Theme.
J2ME & Sony Ericsson | Richard's Mobile Blog http://rschilling.wordpress.com/mobile-development/java-microedition-d...
9 of 10 4/20/2014 8:30 AM
Follow
Follow Richard's Mobile Blog
Powered by WordPress.com
J2ME & Sony Ericsson | Richard's Mobile Blog http://rschilling.wordpress.com/mobile-development/java-microedition-d...
10 of 10 4/20/2014 8:30 AM

You might also like