java-me

sending bitmap image via email in blackberry

别说谁变了你拦得住时间么 提交于 2019-12-20 07:21:49
问题 How could I send the bitmap from a BitmapField to an email address on BlackBerry? 回答1: Not rly sure if this is what you try to accomplish. Sending an image as attachment. If you rly need a BitmapField to get the image from, can you extend it to hold the bitmap and implement a getImage method? 来源: https://stackoverflow.com/questions/5937775/sending-bitmap-image-via-email-in-blackberry

J2me detecting first start of application

白昼怎懂夜的黑 提交于 2019-12-20 07:08:26
问题 My question is simple how can I recognize first start of application? I think it can be accomplished by saving some value in RMS and reading it when app starts and decide what to do. But isn't there simpler solution? 回答1: There is'nt a simpler method as far as I know, but that's very easy anyway; public static boolean isFirstRun() { RecordStore rs = null; try { rs = RecordStore.openRecordStore("myAwesomeRecordStore", false); //check return false; //record store exists, so it's not our first

J2me detecting first start of application

瘦欲@ 提交于 2019-12-20 07:08:12
问题 My question is simple how can I recognize first start of application? I think it can be accomplished by saving some value in RMS and reading it when app starts and decide what to do. But isn't there simpler solution? 回答1: There is'nt a simpler method as far as I know, but that's very easy anyway; public static boolean isFirstRun() { RecordStore rs = null; try { rs = RecordStore.openRecordStore("myAwesomeRecordStore", false); //check return false; //record store exists, so it's not our first

Catching Throwable in Blackberry Java: Good Idea?

南笙酒味 提交于 2019-12-20 06:45:51
问题 I often see catch clauses for Throwable in Blackberry documentation, such as the Network API docs. My sense is that this is not generally a good practice in Java. Is there a reason for this in Blackberry programming? Does it have to do with stack trace generation for Throwables? 回答1: When you catch Throwable in a BlackBerry app, not only does it preserve the stack trace, it saves that stack trace in the device event log. There is no way for an app to get a stack trace itself, so unfortunately

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

匆匆过客 提交于 2019-12-20 05:01: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 ? 回答1: save using Preferences preferences = new Preferences("mydbname"); preferences.put("key","lastname;firstname;moneyborrowed"); preferences.save(); and retrieve using String val = (string) preferences.get("key");

Common Signing tool for java mobiles

蓝咒 提交于 2019-12-20 04:39:09
问题 Can anyone tell me what is the common signing tools used by almost all java mobile vendors like Samsung, Sony, Nokia, Micromax, Moto and so on. 回答1: AFAIK, Thawte, Verisign and Java verified supports most of the devices. But all are cost. Once I was chatted with Thawte and Verisign technical team for this purpose. They said most of the devices will support after signing the application. But they don't have supported mobile model list. Better you can go with Thawte. 来源: https://stackoverflow

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

我只是一个虾纸丫 提交于 2019-12-20 04:27:14
问题 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

Where to see the stored data in derby database in j2me

删除回忆录丶 提交于 2019-12-20 04:09:25
问题 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. 回答1: 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

How to get the power of a number in J2ME [duplicate]

只愿长相守 提交于 2019-12-20 03:42:37
问题 This question already has an answer here : Closed 8 years ago . Possible Duplicate: J2ME power(double, double) math function implementation I'm developing a simple j2me application. There I need to get the power of a number as like as in the pow(double num1, double num2) in java. But as I got to know, j2me doesn't support to this pow() method. Any helpful option is appreciated. 回答1: public double pow(double num1, double num2) { double result = 1; for (int i = 0; i < num2; i++) result *= num1;