blackberry

NoClassDefFoundError importing a library project

大城市里の小女人 提交于 2019-12-20 05:31:13
问题 I'm currently writing a unit test project using the version 4.6.1 (Windows Vista + Eclipse). My project is divided in 3 part: A. Unit test application (type:CLDC application) B. Application to be tested (type:CLDC application) C. A library project (type: library,no .jar file imported) The A project should reference the code present in B (and of course even in C). I would like to specify that I can run without problems the project B (referencing C). My problems start when I try to run the

Blackberry - make a call from native address book

偶尔善良 提交于 2019-12-20 04:26:11
问题 how to make a call from menu item appended in native book of BB('Call from ABC' option)? 回答1: Initiate call programmatically For RIM OS 4.7 and lower use Invoke: PhoneArguments phoneArgs = new PhoneArguments(PhoneArguments.ARG_CALL, "555-5555"); Invoke.invokeApplication(Invoke.APP_TYPE_PHONE, phoneArgs); For RIM OS 5.0 declared we can use Phone.initiateCall method: Phone.initiateCall(Phone.getLineIds()[0], "519-555-0100"); See Make a call from a BlackBerry device application (multi-line

HTTP Post request on BlackBerry

老子叫甜甜 提交于 2019-12-20 04:19:32
问题 I am trying to send a json string , from my BlackBerry OS < 7.X application to my Server. I am trying to use an HTTP Post request. What i have done so far is : String httpURL = "http://ip_of_my_server/phpServer/receiver2.php/" + jsonString; try { HttpConnection httpConn; httpConn = (HttpConnection) Connector.open(httpURL + getConnectionString()); httpConn.setRequestMethod(HttpConnection.POST); httpConn.setRequestProperty("Content-Type", "application/json; charset=utf-8"); DataOutputStream

Blackberry webview can not connect to internet and/or display a web page

佐手、 提交于 2019-12-20 04:07:31
问题 I am creating a simple app using Eclipse and Blackberry JRE 7.0 as per the example given at: http://docs.blackberry.com/en/developers/deliverables/11958/Configure_a_browser_field_825671_11.jsp I am trying to load a simple HTML page hosted on a remote server inside browser field in the app. When running the app on 9930 Simulator I always get the error 'Local connection timeout after 120000 on simulator'. The same remote page shows up fine on the web browser of the same simulator.. I am making

Delete Persistent Object when app is Deleted in Blackberry

梦想的初衷 提交于 2019-12-20 03:33:09
问题 I am using persistent object in blackberry to store config details specific to the app. Here is how I am implementing the class public class Preferences implements Persistable { private static PersistentObject persistentObject = PersistentStore.getPersistentObject(0x2759d6ff72264bdbL); private static Hashtable tbl = new Hashtable(); public static void storeLoginToken(String token) { token = removeCharAt(token,0); token = removeCharAt(token,token.length()-1); tbl.put("token", token);

Create a mobile app that listens to incoming phone call events

﹥>﹥吖頭↗ 提交于 2019-12-20 02:55:24
问题 As the title suggests, I would like to create a mobile app that runs in the background and catches "incoming call" events. Moreover I would like to use a Cross-Platform Development Tool to do this. I looked at three tools: PhoneGap, Rhomobile and Appcelerator. But I couldn't find any documentation or examples that suggest they support such events. It seems like the iPhone (correct me if I'm wrong) does not support this but Android and Blackberry do. Did I miss something when I looked at the

Blackberry wifi http connection

痞子三分冷 提交于 2019-12-19 12:49:10
问题 I am building a blackberry application takes input from user then send input to a server and displays the xml returned from server. The problem is, while application works fine on simulator it doesn't show results all the time on real device. Sometimes it is working but usually it's not. I am using wifi connection on device. The code is: Connector.open(url + ";interface=wifi"); I am not using wifi on simulator. I just delete the 'interface=wifi' part and it runs using mds. When input taken, a

Language for phone software development

自闭症网瘾萝莉.ら 提交于 2019-12-19 12:08:08
问题 Exists an universal phone developement language? I mean, for example, php or java or whatever Edit : We have to develop a few phone applicatons, and we are looking for the best reusable language in differents devices (Blackberry, iPhone, Motorola, etc) 回答1: Java is as close as you'll come, but it's no where near universal (iPhone doesn't support it!) Since iPhone's language isn't used by anything else either, it's pretty much a given that you won't find a universal solution. 回答2: Rhodes by

How can I get latitude and longitude of the current location in Blackberry?

こ雲淡風輕ζ 提交于 2019-12-19 11:20:14
问题 I am developing an app which has GPS functionality. How can I get latitude and longitude of the current location. 回答1: I found a solution by myself. The following code works fine for me: package mypackage; import javax.microedition.location.Location; import javax.microedition.location.LocationException; import javax.microedition.location.LocationListener; import javax.microedition.location.LocationProvider; import net.rim.device.api.ui.UiApplication; import net.rim.device.api.ui.component

BlackBerry - how to occupy a complete button with image

前提是你 提交于 2019-12-19 10:44:12
问题 I have written BlackBerry code to add an image to a ButtonField. I want the whole button to be occupied by the image, but the image is not displayed completely on the ButtonField. There is a lot of margin on the top, left and right of the button. I tried to use cellpadding but it didn't work. How can I reduce the width and height of the ButtonField so it matches the original image size of 41 x 41? 回答1: Instead of adding an image to a button extend the image class and turn that into a button