java-me

IllegalStateException BlackBerry

纵然是瞬间 提交于 2019-12-12 05:18:10
问题 public class show extends MainScreen { private String date1; private long date1l; private long date2l; private LabelField curDate = new LabelField(); private LabelField toDate = new LabelField(); private LabelField diffe = new LabelField(); // private LabelField info; // private LabelField empty; // private InvokeBrowserHyperlinkField hello; ButtonField activate = null; ButtonField disactivate = null; Timer timer; Timer timer2; public String date1s[]; int d, m, y; int x = 1; String day, hour,

Blackberry - get image data from bitmap

两盒软妹~` 提交于 2019-12-12 04:38:55
问题 how to get image data from a bitmap image ? i searched, but i cant find a solution int height=bmp.getHeight(); int width=bmp.getWidth(); int[] rgbdata = new int[width*height]; ByteArrayOutputStream bos = new ByteArrayOutputStream(); DataOutputStream dos = new DataOutputStream(bos); //Graphics g = new Graphics(bmp); bmp.getARGB(rgbdata,0,width,0,0,width,height); for (int i = 0; i < rgbdata.length ; i++) { if (rgbdata[i] != -1) { dos.writeInt(rgbdata[i]); dos.flush(); } } bos.flush(); 回答1: Try

possible to get default browser history in my application in blackberry

天涯浪子 提交于 2019-12-12 04:08:38
问题 I have created my own browser, but I want to get default browser history. 回答1: The title says default browser: No, there is no way to programmatically access the default browser history. The content says "my own browser": with a BrowserField you can use the eventOccurred method to get the destination URL and build your own history. 来源: https://stackoverflow.com/questions/4722594/possible-to-get-default-browser-history-in-my-application-in-blackberry

How are sms stored in any phones?

↘锁芯ラ 提交于 2019-12-12 03:54:33
问题 I just wanted to know how all the sms in the phone stored internally?? and how do i access this internal files? 回答1: It depends on various flavors of phone OSs like Symbian, android, iOS For example: Android saves its SMS's in /data/data/com.android.providers/telephony/databases/mmssms.db iPhone also used SQLite database internally. /var/root/Library/SMS/sms.db It's a lightweight embedded SQLite database. 回答2: Have a look at the Wammu project. It can access phonebooks, SMS, calendars, etc. on

removing security in j2me

陌路散爱 提交于 2019-12-12 03:52:12
问题 i have developed application reading and adding the contacts by using PIM api but the problem is it is prompting allow application to use network and send or receive data? allow application to read user data? allow application to write user data? It is prompting two times for read and write. how to remove this and allow application to do everything without prompting? 回答1: Get your MIDlet signed! 来源: https://stackoverflow.com/questions/2881278/removing-security-in-j2me

J2ME SMS Server on mobile phone

有些话、适合烂在心里 提交于 2019-12-12 03:38:48
问题 Is it possible to have a j2me app on a mobile to act as a "SMS gateway" that will handle incommming messages, do a query on a database via GPRS and reply the user back? 回答1: This is entirely possible on any J2ME handset that supports JSR 120 (i.e.: most of them). However as Wonil said, you can't just process ANY incoming SMS message. It has to be an SMS sent to a port number on which your app is listening (using a server connection as Wonil explained). It wouldn't be automatic unless the app

pointing cursor over textarea in lwuit

房东的猫 提交于 2019-12-12 03:06:37
问题 How do we set the cursor in TextArea ? Mainly the cursor should be visible to the user. The cursor is visible in the TextField where as it is not visible in the TextArea .How to set the cursor when the TextArea has focus?. 回答1: You can't. LWUIT 1.5 supports a multi-line text field which has a cursor element. 来源: https://stackoverflow.com/questions/8118510/pointing-cursor-over-textarea-in-lwuit

Can I have CustomItem and Canvas class on same Screen in j2me

可紊 提交于 2019-12-12 02:57:14
问题 Can I have CustomItem object and Canvas class on same screen in j2me? I created a Tab Menu which extends Canvas and then a custom Header class which extends CustomItem class so I want it to integrate in one form. Can I do it? 回答1: As long as Tab Menu extends Canvas, there is no way to integrate it into Form with MIDP 2 API. To integrate it into Form I would probably just redesign that Tab Menu to extend CustomItem instead of Canvas. That way would make it possible to have it on same form

How to create a field of format dd/yyyy?

依然范特西╮ 提交于 2019-12-12 02:03:46
问题 The field is like a DateField but instead its value is just the month and the year like '05/2011' : how to create such a field ? 回答1: In java-me, you can use the java.util.Calendar package for formatting the date. Here is snippet from this tutorial on displaying the date and time in Java ME: private void outputDateUsingCalendar(Date date) { Calendar calendar = Calendar.getInstance(); calendar.setTime(date); StringBuffer sb = new StringBuffer(); int day = calendar.get(Calendar.DAY_OF_MONTH);

j2me running thread while device is in energy saving mode

送分小仙女□ 提交于 2019-12-12 01:55:31
问题 I have created an application which stores a set five different times, at each time i play an audio. I have done this using thread. But the audio does not play when the device is not in active mode. How can i play the audio despite the status of the mobile? In android i have done this using alarm manager. Is there such an option in j2me? Please help with code if you have the solution. 回答1: If i remember correctly, background operations are not possible in j2me, due to midlet lifecycle. If