java-me

How to modify values of a XML in J2ME?

柔情痞子 提交于 2019-11-29 17:04:46
Suppose there is a XML in my J2ME application : <?xml version="1.0"?> <appli> <client id=134447> <name>Patrick</name> <email>patrick@mail.com</email> </client> </appli> How to modify from J2ME the node value "patrick@mail.com" for example ? For you XML sample you could write a class like: class Client { String id; String name; String email; } And unmarshall your XML to it. I have shared a way of doing this with SAX from JSR 172 at http://smallandadaptive.blogspot.com.br/2010/11/xml-data-binding.html . To marshall your class back to XML you can create a method like: String toXML() {

how do I access mobile inbox, call log, photo gallery using j2me APIBridge?

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-29 16:37:06
I was searching for the method or some kind of examples, by which i can access my mobile phone call logs or message inbox. But, I failed to find, because in all blogs and even in this site (Stack Overflow), everyone saying that, it can't be possible. Today, I found this answer , which increase my hope, which I wanted to do. As Lucifer said, using APIBridge we can achieve this. Then, I found this example , in which accessing call logs and photo gallery has been explained. But, when i was trying to use this example on my phone, then it tried to access the internet. I checked the code, but didn't

A unique identifier for cell phone other than IMEI or IMSI?

心已入冬 提交于 2019-11-29 16:35:24
I'd like to have an unique identifier for a cell phone. Since there is not a particular way to find IMEI or IMSI on every mobile, I want to know if there are other ways to find an unique identifier for a cellphone. Can anyone suggest a way? You can use just time in millis if you don't need strong UID. Or you can get UUID implementation from J2SE and port it to J2ME. In this way UUID should be stored in RMS. One of the best way is to build server side and distribute app only via this service. When new user try to download app you can put into manifest and jad any UUID you want and use it in

How to remove installed Java programs on the simulator?

给你一囗甜甜゛ 提交于 2019-11-29 16:34:52
There are lots of java apps on my simulator menu screen which I have been coding and testing? Now I want to remove some of them to clean my simulator a bit. How do I remove them? Maksym Gontar Quote from Reset and clean the blackberry simulator : Are you sick of having a million icons on your BlackBerry simulator for every HelloWorld and demo project you have every tested? Try this to remove old programs from the simulator and start with a clean ribbon. From the command line browser to your rim jde directory, switch to the simulator sub directory and run clean.bat. This program takes longer

How to call HTTP URL using wifi in J2ME code for BlackBerry 5.0 and above?

爱⌒轻易说出口 提交于 2019-11-29 16:23:22
I am calling a web service from BlackBerry using J2ME code. When I try to open a connection using HttpConnection , it is checking only the GPRS connection. Now, I want to check the Wi-Fi connection and call a webservice through Wi-Fi. The following code is my connection section. How to change the code for a Wi-Fi connection? public boolean HttpUrl() { HttpConnection conn = null; OutputStream out = null; String url = "http://www.google.com"; try { conn = (HttpConnection) new ConnectionFactory().getConnection(url).getConnection(); if (conn != null) { conn.setRequestMethod(HttpConnection.POST);

You must include the platform port before the LWUIT in the classpath runtime exception

与世无争的帅哥 提交于 2019-11-29 16:01:17
I recently started using LWUIT. Great job and great program. I'm using Netbeans 6.9.1, S60 SDK and the webstart version of LCWUIT. The first problem I faced was that I couldn't preverify Transitions3D.java file , however that was not an issue. I just removed that part of the code and recompiled the library from scratch. So I created a simple form with a "Hello World" Label and tried the "Create Netbeans Project" option of the resource editor. I did a Clean Build at the test_MIDP (where test is the name of my project) and tried to run it on the emulator. However I'm receiving this error message

j2me/BlackBerry - How to send Email with Attachment from Application?

若如初见. 提交于 2019-11-29 15:42:07
hey i am building an application in which user can send an email to a person. The user enters the email id of the person to whom email is to be sent in a Edit field and then presses a send button the email must be delivered with an attachment. how can i do it?????? i m really confused after googling. can someone tell me the exact way also,cant i send email from simulator if my cod file is unsigned thanks in advance Try this. Address[] address = new Address[1]; try { address[0] = new Address(email,name); } catch (AddressException e1) { // TODO Auto-generated catch block e1.printStackTrace(); }

XML parsing not working on android build of lwuit app

依然范特西╮ 提交于 2019-11-29 15:36:12
I use Kxml2 parser to parse the xml response I get as a response from a remote page. It is for user authentication, and the returned xml gives several details about the user. The app is built with LWUIT 1.5 and it works on MIDP and Blackberry versions. On the Android version it doesn't work. Is there any extra specification I am supposed to add, for Android to work properly? There is a XMLParser in LWUIT, is very easy to use. You can try to use it. It works fine in my MIDP and BB apps. I can't test it in Android but I think It could be the solution. How do you port your LWUIT apps to Android?

ClassFormatError: 56 while using hessian in j2me

倾然丶 夕夏残阳落幕 提交于 2019-11-29 15:20:09
I am trying to use the hessian j2me implementation @ http://hessian.caucho.com/ using java me sdk 3.0. http://hessian.caucho.com/doc/hessian-overview.xtp#Hessian%20Client%20for%20a%20cell-phone mentions the usage for j2me. The application builds without any errors/warning. But, the moment the line where MicroHessianOutput is instantiated is hit, a ClassFormatError ( java.lang.Error: ClassFormatError: 56 ) is thrown. Heres the trace : TRACE: <at java.lang.Error: ClassFormatError: 56>, startApp threw an Exception java.lang.Error: ClassFormatError: 56 - alert.AlertDemo.showOption(), bci=26 -

Dynamic table in lwuit

こ雲淡風輕ζ 提交于 2019-11-29 14:47:31
How to create a Dynamic table in lwuit TableModel model = new DefaultTableModel( new String[]{"A", "B", "Call Avg"}, new Object[][]{ {"0", "50", "0.00"}, {"0", " " + "2", "0.00"}, {"0", "52", "0.00"},}) { public boolean isCellEditable(int row, int col) { return col != 0 ; } }; Table table = new Table(model); This is for static . I want to create dynamically number of rows and columns .. Plz help See this sample code. I have created dynamic table with LWUIT using this code. Form form = new Form(); form.setLayout(new BorderLayout()); ValueBeans[] valueBeans = new ValueBeans[size]; // Here you