blackberry

Intercept incoming SMS

和自甴很熟 提交于 2019-12-11 03:53:38
问题 I would like to know what are the options for intercepting an SMS. I want to be able to launch some code to handle the SMS when it is received. Any advise on whether this is technically possible and what options I have if there is more than one way, would be greatly appreciated. Thanks Paul 回答1: Since you have so many tags, it's hard to tell which OS you're actually developing for. On the iPhone, you cannot "snoop in" on SMS messages without the help of a patched Kernel (jailbreak). 回答2: I

Blackberry - LabelField Dynamic Update Issues

十年热恋 提交于 2019-12-11 03:43:28
问题 I am trying to develop a BlackBerry app for a Storm2. I am facing a problem when trying to update a LabelField from a different instance of the app. The program is working fine without updating this LabelField, but when I tried to add the code to update the text, it becomes unresponsive after the "settext" line. Am I missing something? public class AgentTrackerScreen extends MainScreen { public static LabelField _outputText; ... } public class BtService implements Runnable { ... public void

BlackBerry use of the simulators

一曲冷凌霜 提交于 2019-12-11 03:38:58
问题 Hallo, on the BlackBerry homepage you can download different simulators for every different model. There are a lot fo simulators there... My question is, how do you develop BlackBerry applications: do you use the simulators - can you relay on them. If an application works on the simulator, does it works 1:1 on the phone? Do you develop for every model a different UI, as the screensize is different? Thanks you very much for your replay? 回答1: In most cases application behaves same way. However,

Date/Time conversion to local time

送分小仙女□ 提交于 2019-12-11 03:33:34
问题 See the below code Date date1 = new Date(HttpDateParser.parse(dateString); int offset = TimeZone.getTimeZone("GMT+5:30").getRawOffset(); date1.setTime(date1.getTime() + offset); String pattern = "yyyy-MM-dd hh:mma"; SimpleDateFormat date = new SimpleDateFormat(pattern); String dateNow = date.format(date1); It converts fine to indian standard time in simulator. When i try to use in device, the time remain unchanged. 回答1: HttpDateParser.parse says in the docs: Parses a date string and returns

BlackBerry memory usage

风流意气都作罢 提交于 2019-12-11 03:28:39
问题 I am looking for some advice on memory usage on mobile devices, BlackBerry in particular. Using some profiling tools we have calculated a working set size in RAM of 525kb. Problem is we don't really know whether this is acceptable or too high ? Can anyone give any insight into their own experience with memory usage on BlackBerry? What sort of number should we be aiming for? I am also wondering what sort of things we should be looking out for in particular to reduce memory usage. 回答1: 512KB is

Calling atan function on Blackberry 4.2 JDE

爱⌒轻易说出口 提交于 2019-12-11 03:11:33
问题 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. Version 4.6 of the Blackberry JDE has it, but not 4.2. Does anyone know of a workaround to calculate atan? 回答1: From Arctan in J2ME by Stephen Zimmerman: // calculation functions public class Calculation { // Because J2ME has no floating point numbers, // some sort of fixed point math is required. // My implementation is simply to shift 10 places. //

Calling Between Classes in Blackberry Java

纵饮孤独 提交于 2019-12-11 03:01:58
问题 I am trying to push a new screen when a bitmap is "clicked" on the screen. For this I have created a Class from this post: Blackberry Clickable BitmapField whose partial code I've posted below: public class CustomMenuButtonField extends Field{ Bitmap normal,focused; ... protected boolean navigationClick(int status, int time) { // push new screen fieldChangeNotify(0); return true; } ... I want to push a new screen when the user clicks the bitmap. I have consulted this thread: Communicating

Strange things happen when set margin to VerticalFieldManager

天涯浪子 提交于 2019-12-11 02:54:38
问题 I'd like to generate a VerticalFieldManager that has a none-zero margin, so I create a VerticalFieldManager , and then use vfm.setMargin(10, 10, 10, 10); after that, put some fields( buttonField , ObjectChoiceField ) in it. It seems too simple, right? but strange thing happens. When I focus to the last ObjectChoiceField and press space to toggle choice of it, the ObjectChoiceField disappeared. How can that be? here is the demo code, anyone kindly find the bug? final class HelloWorldScreen

get data from url in blackberry

∥☆過路亽.° 提交于 2019-12-11 02:36:22
问题 I have a url of a file "http://www.example.com/123.aes" ( it contains data of a mp3 file with morethan 2MB). Now i want to fetch the data from this url. When i tried http connection to get data, its showing an error - Requested entity too large . How to solve this problem ?. my code is given below - try { HttpConnection httpConn = (HttpConnection) Connector.open(httpURL, Connector.READ, true); final int iResponseCode = httpConn.getResponseCode(); Dialog.alert(iResponseCode+""); InputStream is

Blackberry BrowserField white empty page issue

限于喜欢 提交于 2019-12-11 02:06:45
问题 Hi i want to show html content in BrowserField. I used the code blove to do this but i only see white empty page. BrowserField demo = new BrowserField(); String res="<html><body><p>demo</p></body></html>"; demo.displayContent(res, "http://localhost"); Sometimes it shows my page correctly with css fonts but sometimes it does not show anything. What is the problem in my code? 回答1: If you look at this BlackBerry example, they make sure to add() the BrowserField to its parent Manager before