java-me

How should I strip invalid XML characters from a stream in J2ME? org.xml.sax.SAXParseException: Invalid character

自古美人都是妖i 提交于 2019-12-06 14:21:56
问题 This code is running on Blackberry JDE v4.2.1 It's in a method that makes web API calls that return XML. Sometimes, the XML returned is not well formed and I need to strip out any invalid characters prior to parse. Currently, I get: org.xml.sax.SAXParseException: Invalid character '' encountered . I would like to see ideas of a fast way to attach an invalid character stripper on the input stream so that the stream just flows through the validator/stripper and into the parse call. i.e. I'm

What format should my Blackberry application be in to submit to App World?

落爺英雄遲暮 提交于 2019-12-06 14:17:03
I already have an installation using .alx/.cod files that we use to install our Blackberry application via Desktop Manager, and also an "over the air" install version consisting of a .jad file and .cod files (uncompressed and no larger that 64K as specified by the mime type) that is downloaded from our website. What format should I upload the application to App World as? I gather all the files should be in a zip file but apart from that I'm struggling to find much more information on the RIM website RIM has a document with the exact requirements for a submission bundle for an app for

Get battery status from J2ME

爷,独闯天下 提交于 2019-12-06 14:03:43
How can I get battery status through J2ME ? michael aubert Well, the only standard way of doing this is through JSR-256. The mobile Sensor API. You can read the specifications from http://www.jcp.org/en/jsr/detail?id=256 Unfortunately it is very recent and not actually implemented in most retail phones yet. When it ships, the Sony Ericsson Satio (or Idou) will have it. Edit: Nokia N97 has JSR-256 and it can be installed on Nokia N85 and Nokia 5800. Edit: Here's Attilah's other JSR-256 question with some code in the answer. I am not sure there is a generic way through J2ME alone. With Nokia and

Blackberry: Push Notification in Blackberry application

那年仲夏 提交于 2019-12-06 13:54:39
Has anybody implemented push notifications for a BlackBerry application? Yes, Blackberry provides an example application with the SDK and you can use the material on the blackberry website to see how to implement a push service: http://us.blackberry.com/developers/platform/pushapi.jsp 来源: https://stackoverflow.com/questions/8396978/blackberry-push-notification-in-blackberry-application

BlackBerry - How to start a messenger application?

霸气de小男生 提交于 2019-12-06 13:35:46
I would like to use gtalk or any other messenger in my application but i don't know how to do this.can u please give me idea about how to solve this one.if u can provide me some web link to know more about this. BB KB - How To - Launch a third-party application from another third-party application Try this for standard BB Messanger: int mh = CodeModuleManager.getModuleHandle("net_rim_bb_qm_peer"); if (mh == 0) { try { throw new ApplicationManagerException( "BB Messanger isn't installed"); } catch (ApplicationManagerException e) { System.out.println(e.getMessage()); } } ApplicationDescriptor ad

Don't let the display go to stand-by in JavaME

无人久伴 提交于 2019-12-06 13:27:41
Im streaming video to my MIDLET. And while it is playing it, after 20 seconds (depends on a system setting) display on the phone goes to stand-by mode. How can I prevent this so I can watch the video for 5 minutes for example without having to tap something to wakeup the display? Yeeeey I figured it out!!! But its a little hack and not the actual "Dont-Go-To-Stand-By" functionality... nevertheless it works PERFECT !!!! =D Ok so the idea is to define the timeout that the display needs to be woken up. I let the user define this in the "Settings" screen and I write that in RMS so I can read it

Windows Mobile 6 J2SE-scale JVM implementation

情到浓时终转凉″ 提交于 2019-12-06 13:14:44
Does anybody have experience of a decent J2SE (preferably at least Java JDK 1.5-level) Java Virtual Machine for Windows Mobile 6? If you know of any CLDC VMs, I'm also interested because even that would be better than what we currently have for the platform. Yes, I've tried doing things with Java on Windows Mobile. I tried really hard. The best advise I can give you is: Stop right now, and start using .NET Compact Framework. Anyway, the two 'good' JVMs for WM are IBM-J9 and NSICom Creme, which still are both terribile to work with. You've already seen Creme - IBM-J9 isn't much better. They are

OutOfMemoryError in j2me application

纵饮孤独 提交于 2019-12-06 12:48:20
I am getting OutOfMemoryException in a J2ME Application. How can I find what is causing this error? And how to prevent getting this error ? I make a http request. While the request isn't completed the screen shows a loading image (like a browser shows when a page is loading). This was done by creating an Image and repainting the screen. create image 1 -> repaint -> create image 2-> repaint-> create image 3 -> repaint -> create image 1-> repaint -> . I noticed (using wtk memory monitor) that this was consuming too much memory that wasn't garbage collected. Then I tried to create a class that is

Receive sms on specific port j2me

爱⌒轻易说出口 提交于 2019-12-06 12:29:29
I am developing j2me app. I need to receive sms on specific port. Which is the best port to define for receiving sms? Thanks for advice The SMS spec ( JSR 120 ) says you can't have a port that another app is using at that time, and also you can't have any of the ports that are specified in the following table. For security reasons, Java applications are not allowed to send SMS messages to the port numbers listed in Table A-4. Implementations MUST throw a SecurityException in the MessageConnection.send() method if an application tries to send a message to any of these port numbers. Table A-4:

J2me -Polish ---Problem related to create and build the project

 ̄綄美尐妖づ 提交于 2019-12-06 12:14:00
I am beginner of j2me-polish.I had installed j2me-polish2.1.4.As per the steps shown in below link:- http://www.j2mepolish.org/cms/leftsection/documentation/installation/ide-integration/netbeans/installation.html After installing it,I tried to create project by following the step in below link:- http://www.j2mepolish.org/cms/leftsection/documentation/installation/ide-integration/netbeans/creating-projects.html But i am unable to create the project.it is showing me reference problem.And wen i tried to solve that problem my adding the emulator of nokia N97 then it not happening properly. I can't