blackberry-simulator

BlackBerry SQLite database creation: “filesystem not ready”

霸气de小男生 提交于 2019-12-17 06:51:25
问题 My application takes data from a server and saves it to an SQLite database. This works fine in the 9550 (BlackBerry Storm 2) simulator, but when I run this in any other simulator it gives me this error: file system not ready Code snippet: URI myURI = URI.create("file:///store/MyDataBase.db"); Why is this happening? 回答1: It may be that store is not a mounted and available file system root on the 9550. You should use javax.microedition.io.file.FileSystemRegistry.listRoots() to get an

BlackBerry - “Media unloaded while initializing” error

我的未来我决定 提交于 2019-12-14 02:38:40
问题 I am trying to play a video based on the videorecordingdemo sample from JDE7.0 (code below). I am building for OS5.0 - which is why I cannot just run the whole demo app which is written for OS7.0. I am using the emulator (9300) and have set up a folder to be used as my sd card. I have placed a .AVI video in there. I have also tried placing the .AVI into the resources, and streaming it from there. In both cases, when I call Player.start() , the following exception is thrown: net.rim.device

@ validation for email in BlackBerry

徘徊边缘 提交于 2019-12-13 10:52:37
问题 I am developing a form where the user needs to enter a valid email. He/she will use it as a loginid to play the game.I want to know how can I validate the username containing @, similar to string.contains function. I learnt we can use string.indexOf() but it is not supporting "@". Kindly suggest how do I carry out this validation. When the email editfield loses focus, the username must be checked to see if it contains "@" or not. 回答1: Use EmailAddressEditField.. here is the way

Blackberry json parser

心不动则不痛 提交于 2019-12-13 08:26:14
问题 I want to create a simple json parser for BlackBerry to test. I found this example, and implement my code as follows import java.io.ByteArrayOutputStream; import java.io.InputStream; import java.util.Vector; import javax.microedition.io.Connector; import javax.microedition.io.HttpConnection; import org.json.me.JSONArray; import org.json.me.JSONObject; import net.rim.device.api.ui.component.Dialog; import net.rim.device.api.ui.container.MainScreen; public final class MyScreen extends

How to make background of BrowserField transparent in Blackberry

无人久伴 提交于 2019-12-12 14:20:06
问题 I am using BrowserField component of RIM BB . It is right now displaying a white background. I want make a transparent background, so it could match with the Manager's background color. I had tried with below code. But it's not working. BrowserField contentField = new BrowserField(); bgTransparent = BackgroundFactory.createSolidTransparentBackground(0xffffff, 0); contentField.setBackground(bgTransparent); How to solve this? 来源: https://stackoverflow.com/questions/12421300/how-to-make

What is the database location in Blackberry while using phonegap

可紊 提交于 2019-12-12 04:59:15
问题 I have a 9800 simulator. I mounted a directory as SDcard... Now if i use function populateDB(tx) { tx.executeSql('DROP TABLE IF EXISTS DEMO'); tx.executeSql('CREATE TABLE IF NOT EXISTS DEMO (id unique, data)'); tx.executeSql('INSERT INTO DEMO (id, data) VALUES (1, "First row")'); tx.executeSql('INSERT INTO DEMO (id, data) VALUES (2, "Second row")'); } function errorCB(err) { alert("Error processing SQL: "+err.code); } function successCB() { alert("success!"); } var db = window.openDatabase(

Load URL into webview and hide address bar

淺唱寂寞╮ 提交于 2019-12-12 02:12:58
问题 As i am newbie in BlackBerry development, i don't know what should i implement for the below problem: I want to load web page inside the webview (Navigation should be within application) and hide the URL address bar of the webview.) I know the solution we do in Android as to make webViewClient and load the same inside the WebView inside the Android. But i don't know about the exact solution for the BlackBerry. One more thing, i have gone through BrowserField demo but i am not able to load

Do I need to have a BIS or BES service in order to use MapField in the code?

我只是一个虾纸丫 提交于 2019-12-11 18:27:40
问题 I am trying to learn about MapField in Blackberry and I need to know that wheter I need to have a BIS or BES service in order to use MapField. I can use the MapFiel while using the simulator but when I read some forums I saw some people wrote that people need to have BIS or BES to show the MapField. Is it true or not ? Thank you all... 回答1: You need to have a BIS conection, so you should run the MDS emulator to have the BIS server emulation on your computer, this will work for your mobile

Blackberry simulator 9900 not working?

你离开我真会死。 提交于 2019-12-11 15:00:42
问题 I have just switched to Blackberry from android. I have downloaded and installed BlackBerry_JDE_PluginFull_2.0.0_indigo . And created a helloworld project but when I run the project on simulator a dialog comes up "Blackberry Touch" . If I press OK it hangs and dialog and simulator doesnt work .Please help what is the problem here I am new to all this? 来源: https://stackoverflow.com/questions/18378387/blackberry-simulator-9900-not-working

Upload Image using blackberry

≯℡__Kan透↙ 提交于 2019-12-11 13:54:23
问题 I want to upload an image in blackberry simulator using MultipartPostData, the following is my code but it does not seem to work. I have also signed my .cod file. Can anyone help me please? public void postData(String Url, bytes[] data) { if (DeviceInfo.isSimulator()){ Url=Url+";deviceSide=true"; } HttpConnection httpConn=null; OutputStream os=null; InputStream is=null; String url=Url; try { PostData form = new MultipartPostData(MultipartPostData.DEFAULT_CHARSET, false) ; byte [] postData =