java-me

BlackBerry - waiting screen [closed]

人走茶凉 提交于 2019-12-01 13:16:28
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 7 years ago . i am developing one application in blackberry java development. I am requesting to http means i am connecting to web service .response of web service taking some time .That time i want to display some waiting

Create Landscape Game Canvas for Asha 303

[亡魂溺海] 提交于 2019-12-01 13:12:03
i've searched all the forum bet never found any answer satisfy my question. I want to create a game with landscape orientation for Nokia Asha 303, are there any way to rotate the game canvas 90 degrees so the orientation become landscape orientation? Because i look at this video Angry Bird Asha 303 . The game has landscape orientation so i curious how to do that in j2me. Thanks, Since MIDP 2.0 we can use an Sprite to rotate an image in 90 degrees. First thing we need is an Image of the correct size. Following code could be inside the constructor of a class that extends Canvas - considering an

Is there email validator code for Java ME or BlackBerry?

蓝咒 提交于 2019-12-01 12:53:07
问题 Is there some standard email validator code sample for Java ME or BlackBerry? 回答1: public static boolean validateEmailID(String email) { email = email.trim(); String reverse = new StringBuffer(email).reverse().toString(); if (email == null || email.length() == 0 || email.indexOf("@") == -1) { return false; } int emailLength = email.length(); int atPosition = email.indexOf("@"); int atDot = reverse.indexOf("."); String beforeAt = email.substring(0, atPosition); String afterAt = email.substring

Blackberry date time string formatting

不想你离开。 提交于 2019-12-01 12:51:51
I need to parse the date/time string, to add the raw offset and convert it according to local time zone. The date time that I get from server is in this format : "05-25-2012 02:30 PM" This format is not parsed by : HttpDateParser.parse(time) method But HttpDateParser does parse this format : "25-MAY-2012 02:30 PM" Can you tell me, how should I parse "05-25-2012 02:30 PM" String in BB to get a long value. I have 1 more problem, I need to display time zone in format GMT, IST, but all I can display is Asia/Calcutta, America/Los_Angeles and so.. BlackBerry Java is missing some useful String

SHA-256 hashing function in Java ME/J2ME

大兔子大兔子 提交于 2019-12-01 12:45:45
问题 I've posted this question on the Nokia Developer forums so please bear with me. I'm writing an app which needs to find the SHA-256 hash of a URL keyed with a unique value – i.e. hmac('sha256', '27/3', '9EWVFmHpHN6n2YKW9QtvUqX3xbsFQUBovlrFddqnF7fpcSDA2q') . What would be the best way to do this in Java ME/J2ME? I've found many examples using the Mac class but this isn't supported in Java ME/J2ME. Thanks in advance. 回答1: I managed to get things working, the solution is as follows: Digest digest

“undecompilable” source code in java [duplicate]

别来无恙 提交于 2019-12-01 12:18:58
Possible Duplicate: Jar executable that cannot be decompiled How can I make "undecompilable" source in java? I have a microedition app that has code that I need to hide Is it possible? Thanks in advance gkrogers You can't. See this question: make your Jar not to be decompiled Interesting-looking book on the subject: http://apress.com/book/view/9781590592656 You cannot make code undecompilable, you can only obfuscate it: http://en.wikipedia.org/wiki/Obfuscated_code In short. You can obfuscate your code to make it difficult for someone to read it and reuse it. If that is what you want, it could

List with checkbox using LWUIT

前提是你 提交于 2019-12-01 11:52:45
I am using LWUIT for getting a search facility for selection in the List . Now I want to know how can I display the list with CheckBoxes ? list=new List(vector); cform.addComponent(list); cform.addComponent(t); cform.show(); I don't know if there is a more simple solution then mine, but mine is highly customizable and can serve for a lot of purposes. List l = new List; Vector v = new Vector(); for(int i = 0; i < 10; ++i){ v.addElement(new CheckItem("itemtekst")); } l.setListCellRenderer(new CheckItemRenderer()); l.setModel(new CheckItemModel(v)); the code above makes it work. As you can guess

“undecompilable” source code in java [duplicate]

╄→гoц情女王★ 提交于 2019-12-01 11:44:51
问题 This question already has answers here : Closed 9 years ago . Possible Duplicate: Jar executable that cannot be decompiled How can I make "undecompilable" source in java? I have a microedition app that has code that I need to hide Is it possible? Thanks in advance 回答1: You can't. See this question: make your Jar not to be decompiled Interesting-looking book on the subject: http://apress.com/book/view/9781590592656 回答2: You cannot make code undecompilable, you can only obfuscate it: http://en

Convert char to lower case in J2ME without using the Character class

爱⌒轻易说出口 提交于 2019-12-01 11:26:10
I'd like to convert a char to lower case in a J2ME app. The usual Character.toLowerCase() doesn't work for an arbitrary Unicode character in J2ME, so I need some light API, or, preferably, a piece of code that would do so. Thanks! Based on the toLowerCase() method from Character in JavaSE JDK: char lowerChar = (char)CharacterData.of((int)upperChar).toLowerCase((int)upperChar); You can read the source code from the JDK and understand what is really done here and apply the same thing with your own classes in JME. Resources : grepcode - Character.toLowerCase() char toLowerCase(char c){ if(c>=97 &

Can I open a “.pdf” document on a blackberry using java?

大憨熊 提交于 2019-12-01 11:21:43
Can I open a ".pdf" document on a blackberry using java? If yes, then how? theres nothin native in blackberry to load pdf files, but you can achieve that loading google viewer inside your Browser field, that will do the trick! =D! public ScrLoad() { String url = "http://docs.google.com/gview?embedded=true&url=http://prueba.agenciareforma.com/appiphone/android/elnorte.pdf"; add(new BrowserField(url)); } Google Docs Viewer http://docs.google.com/gview The BB doesn't have a built-in PDF viewer. You can view PDF attachments in emails, but that works with some server-side magic. I think the best