blackberry

How to pass button text to another page?

我们两清 提交于 2019-12-31 06:59:08
问题 I'm making an app for the BlackBerry PlayBook using jQuery Mobile, and in a page (actually a div with data-role='page' ), I've got a lot of (say, 125) buttons each with a unique text. I've used the a tag with data-role='page' for this. There's a separate page like the above, but with different content in the same HTML file. The content in this page depends on the button clicked in the page 1. So my question is, how can I load the page 2, along with the associated content, according to the

Image gone After Focusing

人走茶凉 提交于 2019-12-31 05:10:21
问题 This is before focus state. It work fine. This is on focusing state. It work fine. This is after focus state. It occurred problem where the image gone. It works fine for the top right but top left image got problem. Here is my custom VerticalFieldManager : public class Custom_TopField extends HorizontalFieldManager implements FieldChangeListener { private Bitmap bg = Bitmap.getBitmapResource("header_bar.png"); private Bitmap download = Bitmap.getBitmapResource("btn_download.png"); private

GPS Lat Lon Issue in Blackberry Storm

流过昼夜 提交于 2019-12-31 03:59:06
问题 I Write the following code in my application. It will run successfully in Simulator but while i m trying to run in my device then it gives Lat & Lon (0.0,0.0). What is the problem. My Code is . public class GetLatLon extends TimerTask{ public static Timer timer; private double longitude; private double latitude; public GetLatLon(int duration) { timer = new Timer(); try { // TODO: update criteria with desired location distances, etc LocationProvider.getInstance(new Criteria())

In Blackberry, can we create common library that can be used by different applications?

一个人想着一个人 提交于 2019-12-31 03:05:48
问题 I want to create a common 3rd party library, that can be shared and used by different applications and be consistent. Can we acheive this ?.If yes, how and where will this library be installed ? and how can these library files be accessed from other apps ? 回答1: Yes you can do this. You create and compile the libary. You can either install it by itself ahead of the applications that depend on it, or with the applications. The desktop manager can use ALX files generated by the JDE to do this

Blackberry: select item in a list, return to previous screen

匆匆过客 提交于 2019-12-30 14:36:49
问题 I have prepared a very short test case (s. below) for my question. On a button click I would like to display a list of strings in a new screen. After the user selects one item in the list, the previous screen should be displayed again and the button label should be set to the selected string. My 2 problems are: From inside the menu I don't know how to pop the currently displayed screen How to pass the selected item from one screen to another (assuming I don't want to introduce a public

Blackberry date time string formatting

こ雲淡風輕ζ 提交于 2019-12-30 11:47:46
问题 I need to parse the date/time string, to add the raw offset and convert it according to local time zone. The date time that I get from server is in this format : "05-25-2012 02:30 PM" This format is not parsed by : HttpDateParser.parse(time) method But HttpDateParser does parse this format : "25-MAY-2012 02:30 PM" Can you tell me, how should I parse "05-25-2012 02:30 PM" String in BB to get a long value. I have 1 more problem, I need to display time zone in format GMT, IST, but all I can

Pop to home screen

╄→гoц情女王★ 提交于 2019-12-30 11:34:13
问题 In my app I fave some screens one after another, and I need to pop to home screen any time. Is there any way to find out is active screen is the first one? Or, may be, there is any function to pop to root screen without cycle of poping to previous ones? EDIT In different words, I need my app to go to previous screen on click on blackberry "back" button (it do this without any additional code), and go to the screen, user first see when starts this application on click on "Home" button from my

Blackberry - Disable Save option in BasicEditField?

房东的猫 提交于 2019-12-30 10:13:49
问题 I am using a basiceditfield to take input from the user to do some simple string search. But if i type a few letters and wish to go back without continuing the search, it automatically asks me whether to save the contents of the field. I don want this to happen. Can i in any way disable the "Changes made!-save-discard-cancel" option in basiceditfield(or any editfield for that matter)????please help!!! 回答1: Try adding this to your MainScreen class: protected boolean onSavePrompt() { return

What is the best way to force a try block to break in between?

让人想犯罪 __ 提交于 2019-12-30 09:34:11
问题 I have a try - catch block that I wish to break like a switch block but I couldn't find a recommended way of doing it. I'm fetching a lot of data in the try - catch block and wish to stop the fetching in between in case a certain condition is met. Just to get it working for now, I've deliberately forced the code to go into the catch block: int i=0; try { //--do stuff---- if(//-------is condition met?--------//) i = 1/0; // divide 1 by 0 -- a definite exception } catch (Exception e) {//-------

Timeout for Blackberry HttpConnection

我只是一个虾纸丫 提交于 2019-12-30 07:40:27
问题 In my project for Blackberry 4.5, I create HttpConnection via Connector.open. If I connect over MDS, I can specify ConnectionTimeout in additional params to my URL. How can I specify timeouts if using direct TCP connection or TCP over WiFi? 回答1: According to this KB article, it's not possible to specify a connection timeout value for transports other than MDS. 回答2: In some cases it's possible to use Http over Socket and SocketConnectionEnhanced with READ_TIMEOUT option: public class