java-me

JavaME RaspBerryPi UART can't receive data from RS485

天大地大妈咪最大 提交于 2019-12-12 10:19:37
问题 I try to connect my raspberry pi (with raspbian weezy) with a strip LED module. To do this, I use the UART connection of RBPi in order to communicate with RS485 strip connection. My trouble : I can (yes I can) send data but I don't received ACK or anything else. However my strip LED module send data frame to the RBPi (I can see it on oscilloscope). EDIT : I think it's due to the following error that appears when the program opened UART connection. NO : The following error is due to an non

Java ME - is the Bluetooth address ID globally unique?

和自甴很熟 提交于 2019-12-12 09:57:55
问题 I'm coding a Java ME app and attempting to globally identify each phone using the app. The first attempt is to load the IMEI per this question. As a fallback ID I'm using the bluetooth address of the device. Is the bluetooth address of a cellphone a globally unique identifier? Is it a MAC address? Some other format? 回答1: Yes it is unique and works just as MAC addresses. Bluetooth use the MAC-48 identifier format. 回答2: It is unique, however do remember that on some handsets (Sony Ericssons?)

J2ME/Blackberry - get audio signal amplitude level?

我们两清 提交于 2019-12-12 09:13:46
问题 Is it possible in j2me to measure signal amplitude of audio record made by JSR-135 Player? I know I can access buffer, but then what? Target model Bold 9000, supported formats PCM and AMR. Which format I should use? See also Blackberry Audio Recording Sample Code How To - Record Audio on a BlackBerry smartphone Thank you! 回答1: Get raw PCM signal level Use menu and trackwheel to zoom in/out and move left/right within graph. Audio format: raw 8000 Hz 16 bit mono pcm. Tested on Bold 9000 RIM OS

how to check internet connection in java in blackberry

大憨熊 提交于 2019-12-12 09:06:04
问题 I want to check whether internet connection is there or not in blackberry device so that depending on the result I can call webservices to get data or upload data from my application I have tried this one CoverageInfo.isCoverageSufficient(CoverageInfo.COVERAGE_MDS))) || (CoverageInfo.isCoverageSufficient(CoverageInfo.COVERAGE_BIS_B)) != false 回答1: If you want to check the internet connection, then send any url to the web service and check the HTTP Response. If HTTPResponse is 200 then only

Is there a standard icon size and color depth for J2ME?

别说谁变了你拦得住时间么 提交于 2019-12-12 08:59:10
问题 There are many phones, each with it's own icon size (for example, Nokia has 19 different sizes, http://www.j2meforums.com/wiki/index.php/Application_Icon_sizes). I would like to use only one icon (even if it's displayed poorly). Is there a single icon size and color depth that displays in all phones? 回答1: There is no standard size, and some phones will not even show the icon if it is not the exact width and height specified for the device. Some phones may attempt to scale your icon up or down

How do you make a dropdown list that displays images to the user instead of text?

 ̄綄美尐妖づ 提交于 2019-12-12 07:59:22
问题 The ObjectChoiceField field meets all my requirements but it is not pretty. This is what I have: String pets[] = {"Dog", "Cat", "Duck" }; ObjectChoiceField dd = new ObjectChoiceField("My Pet",pets,0,ObjectChoiceField.FIELD_LEFT); But I would prefer to have pictures in the dropdown. My understanding is that the object array must contain objects that support the toString method. There are got to be a way to do I see it in other apps, I just can't find the correct object in the API. It doesn't

How to get the text of an exception stack trace in Java ME?

那年仲夏 提交于 2019-12-12 07:53:06
问题 In regular Java, you can get the text of a stack trace by passing a PrintWriter to printStackTrace. I have a feeling I know the answer to this (i.e. "No") but, Is there any way to obtain the text of a stack trace in JavaME as a String? Update: I should mention that I'm restricted to CLDC 1.0 回答1: AFAIK there is no way to get the stack trace as a string value, unless a specific platform provides a means to override the default System.err stream. On the BlackBerry platform, it throws out the

polling a HTTP server from J2ME client

十年热恋 提交于 2019-12-12 07:38:15
问题 I have a J2ME app running on my mobile phone(client), I would like to open an HTTP connection with the server and keep polling for updated information on the server. Every poll performed will use up GPRS bytes and would turn out expensive in the long run, as GPRS billing is based on packets sent and received. Is there a byte efficient way of polling using the HTTP protocol?. I have also heard of long polling, But I am not sure how it works and how efficient it would be. Actually the preffered

Data in J2ME RecordStore does not persist across sessions

只愿长相守 提交于 2019-12-12 07:22:40
问题 I'm building a mobile app with J2ME, and I've found that the data I write into a RecordStore can be accessed while the program is still running but it is lost after quitting and restarting it. No exception is thrown, the data is simply lost. UPDATE: Thanks everyone for your suggestions. I'm using NetBeans on Windows 7. I'm not sure if it is using the WTK version I have previously installed or another one it has installed somewhere else. I've checked my WTK folder for the files Pavel wrote

eclipse xml error

≯℡__Kan透↙ 提交于 2019-12-12 05:49:03
问题 i am programming in eclipse for the first time and when i create a blackberry project i am getting this error in BlackBerry_App_Descriptor.xml as Description Resource Path Location Type InvalidRegex: Pattern value '([a-zA-Z_]{1,63}[\s-a-zA-Z_0-9.]{0,63}[;]?)*' is not a valid regular expression. The reported error was: ''-' is an invalid character range. Write '-'.' at column '19'. BlackBerry_App_Descriptor.xml /sample Unknown XML Problem please help me out thanks in advance. 回答1: I have had