java-me

Modifiying j2me midlet

我的梦境 提交于 2019-12-02 07:58:48
问题 I want to change some strings in opensource app ( testing purpose ). So I decompiled my app using jad decompiler. Original class file http://dl.dropbox.com/u/32657135/YourTube.class issued command Jad.exe Yourtube.jar.java Got jad as output http://dl.dropbox.com/u/32657135/YourTube.jad.java Compiling Code Again with no modification command in cmd javac Yourtube.jar.java Error YourTube.jad.java:57: error: ';' expected JVM INSTR monitorenter ; ^ YourTube.jad.java:57: error: not a statement JVM

BlackBerry - Unicode text display

筅森魡賤 提交于 2019-12-02 07:41:07
I would like to display some Arabic text into LabelField in j2me app on BlackBerry device. Presume that Arabic font is installed on device. In localization resources, if Arabic locale is used, all text is saved in Unicode sequences. But event if I use such format explicitly, also setting Arabic locale, it's not working: Locale.setDefault(Locale.get(Locale.LOCALE_ar, null)); add(new LabelField("\u0627\u0644\u0639\u0631\u0628\u064A\u0629")); Please advice: In what format or code page I should save Arabic text? How to display Arabic text in Label using installed Arabic font? Thank you! Solution

How to read files from phone memory and memory card in J2ME

余生长醉 提交于 2019-12-02 07:37:45
问题 I am trying to create a music player in J2ME. I want to read all mp3 files from phone memory and memory card and add it to list. How to retrieve these .mp3 files? 回答1: Read this document for go through files and folders for reading files in memory card, In many device you can search by E:\ and for phone memory you can search by C:\ See following links for help http://www.java2s.com/Code/Java/J2ME/FileConnection.htm http://www.coderanch.com/t/230849/JME/Mobile/file-browse-ME 来源: https:/

Blackberry: Kill an application

我们两清 提交于 2019-12-02 07:29:06
I want to kill an running application in blackberry, just like as task manager. Is there is any way to do that or any API available? Thanks in advance. Suraj Air call this method to kill a UiApplication.... public void killApp() { System.exit(0); } As per other forums, below are the information I found. Try this if it helps you First Way: you might have to just do a hard boot. take the battery out if all fails. Second Way: Stop a job that is running 1. In the BlackBerry® Administration Service, on the Devices menu, expand Deployment jobs. 2. Click Manage deployment jobs. 3. Search for the job

Why numeric constraint didn't work on Virtual keyboard in LWUIT?

安稳与你 提交于 2019-12-02 07:19:00
I have tested many ways to give the numeric and password constraint in the TextField. But its not working, See the below code. textField.setConstraint(TextField.NUMERIC | TextField.PASSWORD); textField.setInputModeOrder(new String[]{"123"}); Above code should work on the non touch mobiles. But its not working on the touch mobiles. So i have set the input mode value for VKB and bind that TextField with VKB , see this code. TextField txt = new TextField(); txt.setConstraint(TextField.NUMERIC |TextField.PASSWORD); txt.setInputModeOrder(new String[]{"123"}); VirtualKeyboard vkb = new

How to access Main Application from alternate entry point on Blackberry?

余生长醉 提交于 2019-12-02 07:13:41
In my app, I have used one alternate entry point to check time. If smartphone go to the time I set here, it will push one screen (ex Screen1) in my main app. public static void main(String[] args) { MyApp theApp = new MyApp(); if ( args != null && args.length > 0 && args[0].equals("autorun") ) { theApp.enterEventDispatcher(); } else { theApp.pushScreen(new MyScreen()); theApp.enterEventDispatcher(); } } in Screen1 have some button (ex New button), generally when I run my app and click "New button" , it will push Screen2. but in this case, no thing occur. How can I solve this problem ? RVG

Where to see the stored data in derby database in j2me

谁说胖子不能爱 提交于 2019-12-02 07:12:56
I created MIDlet class which contains name and number and i used RecordStore to store the data in apache derby database.The program is executing successfully.Now i want to see my entered data in derby database.Please help me where i can see.I am using netbeans IDE. The database data is stored in files in the filesystem. The exact location of those files is controlled by the JDBC connection URL that you specified when you opened the database. Generally this URL describes a filesystem path. If the path is an absolute path, look there. If it is a relative path, look for the location relative to

How to sort recordstore records based on a certain field in it?

余生长醉 提交于 2019-12-02 07:02:41
For example there are three records in a recordstore , and the structure of a record in the recordstore is like this : lastname;firstname;moneyborrowed I want to show these three records inside a LWUIT Table and I want them to be sorted by the lastname column. How to achieve that ? save using Preferences preferences = new Preferences("mydbname"); preferences.put("key","lastname;firstname;moneyborrowed"); preferences.save(); and retrieve using String val = (string) preferences.get("key"); Preferences.java import java.util.Enumeration; import java.util.Hashtable; import javax.microedition.rms

Image in button - j2me

佐手、 提交于 2019-12-02 07:02:19
I am trying to build a simple menu-based GUI with J2ME. The menu entries are currently objects of classes derived from the class Button. Is there any way I can: Replace the text in the button and have an image show instead, sort of an icon? Make the text and image appear side by side on the same menu bar. If my question is not clear, please let me know and I will edit it. You can create your own Item that looks like a button by extending the CustomItem class . This is a working MIDlet with a good MyButton class: import javax.microedition.lcdui.Canvas; import javax.microedition.lcdui.CustomItem

JME: How to get the complete screen in WHITE without buttons, etc etc

别来无恙 提交于 2019-12-02 06:54:33
问题 Please have a look at the following code First, Please note I am a 100% newbie to Java Mobile. In here, I am making the light on and vibrate on when user click the button. However, I really wanted to create a SOS application which turn the whole screen into white, and go to black, like that, in the thread. I guess I didn't achieve that by this app because even the lights are on, the buttons are still there. I tried to turn the "Form" color to "white" but it seems like JME has no "Color" class