rim-4.2

Location API not working for custom/third-party applications

I'm trying to write a simple GPS based application for my BB 8800 (with Airtel, India). But for some reason my code getLocation(timeout) always returns with a non-valid location (only after timing out). I tried different combinations of criteria parameters with no success. I'm pretty sure that the problem is not with my code because ...

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

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 w...

How-to enable auto-capitalization, punctuation, text functionality in Blackberry app text Fields?

I'm using RIM JDE 4.2.1 I'd like my text fields to auto-capitalize the first letter of sentences, add punctuation at the end, and reference the AutoText DB on the device. It seems like this would/should be a Field type in the API but either I'm missing it or it's just not there. For reference, the API is located here: http://www.black...

blackberry simulator "fileconn.dir.photos" location?

I am facing a weird problem on BlackBerry JDE 4.2.0 and the 8100 simulator it comes with: String path = System.getProperty("fileconn.dir.photos"); This returns null! This works for all J2ME phones and emulators I've worked with so far. Is there anything special that I need to do to get it work on the Blackberry simulator? Note, that ...

Cancel scrolling in Layout Manager

Hi, I can't find solution for the following problem. I have custom list field, which overlaps the boundaries of its layout manager. List field consumes navigation events from manager to highlight currently selected row with special color. Layout manager is configured to support scrolling. When I scroll trackwheel down, layout manager in...

How to detect available APN settings?

Hi, I need to access somehow APN settings in my BlackBerry application. My app is running on JDE 4.2.1. Any help? ...

Calling atan function on Blackberry 4.2 JDE

Hi there. I need to calculate the arc tan value from my Blackberry Java app. Unfortunately, the blackberry 4.2 api doesn't have the Math.atan() function. Heaven knows why, but that's the Blackberry API for you. Version 4.6 of the Blackberry JDE has it, but not 4.2. Does anyone know of a workaround to calculate atan? ...

How to read resource file from classpath in BlackBerry app?

Hi, I need to read a resource file from classpath in my BlackBerry application. The directory structure of my project is pretty common: under src directory there are 2 child dirs, one represents source packages root, another - resources root. When I try to read any resource from classpath Class.getResourceAsStream method retures null ...

spacing issues with Blackberry Browser 4.2

I am writing a web application targeting the Blackberry Browser 4.2. I want to had some vertical spacing between a list of links. I know 4.2 doesn't support padding and margin but I thought it supported height or line-height. I can't get either to work. I really don't want to use a line break. Any suggestions ...

moveFocus is not called

I have a custom object list field with implemented scrolling routine. public int moveFocus(int amount, int status, int time) { invalidate(getSelectedIndex()); int unused = super.moveFocus(amount, status, time); return Math.abs(unused) + 1; } public boolean navigationMovement(int dx, int dy, int status, int time) { if (dy >...

Killing non-waiting thread

Hi, I need to kill specific worker thread in my application. I don't have any control over its execution, which means I cannot employ classic signal boolean variable approach. This thread is non-waiting. It doesn't sleep or wait on some monitor to be signalled - I can't interrupt it via Thread.interrupt, this throws IllegalThreadState ex...