java-me

Best binary XML format for JavaME

六月ゝ 毕业季﹏ 提交于 2019-12-23 07:55:17
问题 Can anyone recommend a good binary XML format? It's for a JavaME application, so it needs to be a) Easy to implement on the server, and b) Easy to write a low-footprint parser for on a low-end JavaME client device. And it goes without saying that it needs to be smaller than XML, and faster to parse. The data would be something akin to SVG. 回答1: You might want to take a look at wbxml (Wireless Binary XML) it is optimized for size, and often used on mobile phones, but it is not optimized for

How to communicate with mobile devices using Bluetooth in j2me?

安稳与你 提交于 2019-12-23 05:31:08
问题 I need to develop a project based on Bluetooth in mobile. Since I am new to j2me I studied some of the articles and run the project until the discovery of devices and services. I need to communicate between devices and transfer the desired files. I search code for client server communication through Bluetooth and got it but I didn't know how to run those code and implement further. I have go through articles and I can run client server communication. Now I need to transfer the file and

How do I get to load image in J2ME?

99封情书 提交于 2019-12-23 05:17:27
问题 I am using TimerTask and ImageLoader class to load n image to an image item. public class Imageloader implements Runnable{ private ImageItem item=null; private String url=null; /* * initializes the imageItem */ public Imageloader(ImageItem item,String url){ this.item=item; this.url=url; } private Image getImage(String url) throws IOException { item.setLabel(item.getLabel()+12); System.out.println("Test 5"); HttpConnection connection = null; DataInputStream inp = null; int length; byte[] data;

Howto Base64 decode (library) in J2ME?

試著忘記壹切 提交于 2019-12-23 04:51:04
问题 There are lots of Base64 libraries for Java SE but I can't seem to find one for J2ME. Does any one have a algorithm or library in their coding toolkit? I receive following from a REST webservice (cut for clearity) : [137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,1,64,0,0,0,46] How do I decode the string above? Thanks! 回答1: Try this code. Confirm it once. 来源: https://stackoverflow.com/questions/3657047/howto-base64-decode-library-in-j2me

Java Micro Edition (J2ME) - Update Record using recordstore enumeration

 ̄綄美尐妖づ 提交于 2019-12-23 04:38:07
问题 I have a record store of items which have (name, quantity, owner, status) Now when the user triggers an event I want to set the status of all items in my RecordStore with "purchased" re = shoppingListStore.enumerateRecords(null, null, false); while (re.hasNextElement()) { // read current values of item byte [] itemRecord = re.nextRecord(); // deserialise byte array newItemObject.fromByteArray(itemRecord); // set item status to purchased newItemObject.setItemStatus("Purchased"); // create new

How to get and set JSONObject , JSONArray in J2ME

左心房为你撑大大i 提交于 2019-12-23 04:26:49
问题 I am new to JSON programming in J2ME. I discovered that Json is used to exchange data much like XML. I want to know about the exchange in Array object from JSONtoObject and vice versa Below written is code where I convert from JSON to Object and vice versa. But I don't know about how to do for complex data structure like arrays etc. // App Loader import javax.microedition.midlet.MIDlet; import javax.microedition.midlet.MIDletStateChangeException; public class AppLoader extends MIDlet { public

Blackberry - DatabaseIOException when creating database in store folder

醉酒当歌 提交于 2019-12-23 04:20:44
问题 In my app i am creating database,its working well in 9000 simulator but it throws "DatabaseIOException can not create folder file:///store/Databases/" exception when testing on 9700 simulator and in 8900 device.What is the problem please help me. Thank You 回答1: You generally can't create folders or add files from the root of the /store filesystem. Try "/store/home/user" 来源: https://stackoverflow.com/questions/6440982/blackberry-databaseioexception-when-creating-database-in-store-folder

j2me: Recommended way to display a considerable number of results

ⅰ亾dé卋堺 提交于 2019-12-23 04:18:33
问题 I want to ask you if you know of practical way to display data (maybe in tabular format) coming from a WebService. I'm really new to j2me, I've just learned how to consume RESTful webservices, now I need to learn how show that data (which comes in json format) to the user. Basically this is the code I use: protected String jsonParse(String url) { StringBuffer stringBuffer = new StringBuffer(); InputStream is = null; HttpConnection hc = null; System.out.println(url); String Results = null; try

j2me: Recommended way to display a considerable number of results

…衆ロ難τιáo~ 提交于 2019-12-23 04:18:01
问题 I want to ask you if you know of practical way to display data (maybe in tabular format) coming from a WebService. I'm really new to j2me, I've just learned how to consume RESTful webservices, now I need to learn how show that data (which comes in json format) to the user. Basically this is the code I use: protected String jsonParse(String url) { StringBuffer stringBuffer = new StringBuffer(); InputStream is = null; HttpConnection hc = null; System.out.println(url); String Results = null; try

2d barcode reader Java ME sdk

徘徊边缘 提交于 2019-12-23 03:35:15
问题 Does anyone know a good sdk for reading and decoding 2d barcodes (preferably Datamatrix or QR) from within a Java ME application? The application will be closed source, and while I'd prefer that the SDK be free (perhaps MIT or LGPL licenses), I would not mind forking over some cash for a commercial license. I've come across the Semacode SDK but it's GPL licensed and the links to the commercially licensed version do not seem to be working. There's also one from http://qrcode.sourceforge.jp but