java-me

send email through j2me application

老子叫甜甜 提交于 2019-12-04 07:05:18
问题 I am having an application build using j2me lwuit. I need to send e-mail from that app. 回答1: To make your application smaller, I'd suggest to implement SMPT over a SocketConnection . For small e-mails this shall be pretty straightforward: SocketConnection connection = (SocketConnection)Connector.open("socket://your.smtp.server:25"); DataInputStream is = sc.openDataInputStream(); DataOutputStream os = sc.openDataOutputStream(); //now the SMTP chat with server Using this approach may allow you

HashTable to Lwuit Table

℡╲_俬逩灬. 提交于 2019-12-04 06:09:46
问题 Hashtable iHashtable=new Hashtable(); iHashtable.put("Name", "Jhon"); iHashtable.put("Address","India"); Enumeration iEnumeration=iHashtable.keys(); while(iEnumeration.hasMoreElements()) { Object iresult1=iEnumeration.nextElement(); String iresult2=(String) iHashtable.get(iresult1); System.out.println(iresult1); System.out.println(iresult2); My problem is I want to put the value at LWUIT table dynamically using the HashTable key and value,here is iresult1 and iresult2,using the key and value

Compacting Http Headers

此生再无相见时 提交于 2019-12-04 05:12:46
Its so happening that my actual data is 1/4 that of the HTTP request header size in bytes. Is there a way to cut down on the size on the HTTP headers or any other relevant way to deal with this situation? I am sending data from a mobile device over GPRS to the server and dont want to be burdened with huge request packets that will eat into my $$ and also bandwidth. I've never had to optimize site performance by chopping off headers. That said, most of the issues had to do with: Large number of unwanted GET requests. This was often due to the server not sending the appropriate expiry and

Why getResourceAsStream method is in Class class?

送分小仙女□ 提交于 2019-12-04 04:53:06
Why public InputStream getResourceAsStream(String name) is in Class class? It just give inputstream of file which is in jar file and there is no relation with Class class. so it can be static method and it can be in any class. There is a relationship to the class: The package of the class is taken into account - if you give call getResourceAsStream("baz.txt") on the class for foo.bar.SomeClass it will look for /foo/bar/baz.txt The classloader is taken into account to find the resources in the first place - if it were a static method, how would it know which jar files (etc) to look in? There's

Why arabic font not supported in Samsung mobiles using LWUIT?

雨燕双飞 提交于 2019-12-04 04:04:18
问题 I have tested my mobile application on some Samsung mobiles for testing purpose(Samsung Corby b3410 and Samsung c6712). Here Arabic font not showing on these mobiles. But it will working properly on Nokia mobiles. I'm using System font for showing Arabic fonts. Why its not supporting on these mobiles? How to resolve this issue? 回答1: LWUIT doesn't support Arabic bitmap fonts, when the font type is 'system' we just delegate the Arabic support to the underlying OS. If the underlying phone OS

connect to non-discoverable bluetooth device

只愿长相守 提交于 2019-12-04 03:43:22
I am developing an app for android. Just a general questions as to , if is it possible to connect to a device which is non discoverable publicly? Thanks in advance. Alex If you have previously paired with the device then it is possible to connect to it again even if it is not in discoverable mode. See this post: programmatically-connect-to-paired-bluetooth-device // use paired devices or create a BluetoothDevice using a mac address //Set<BluetoothDevice> pairedDevices = mBluetoothAdapter.getBondedDevices(); BluetoothAdapter myAdapter = BluetoothAdapter.getDefaultAdapter(); BluetoothDevice

Is there a GZIP J2ME library? [closed]

梦想与她 提交于 2019-12-04 03:28:03
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . Is there a gzip compression library that will work on J2ME? 回答1: Try Jazzlib, although it's GPL, and seems like it hasn't been updated for a while. Another option is to try and lift the source from libgcj (which is what jazzlib did). J2SE includes java.util.zip which can compress/decompress gzip files, but the

J2ME - How to convert double to string without the power to 10 representation (E-05)

拈花ヽ惹草 提交于 2019-12-04 03:20:48
问题 I have a double value . I want to store it in String with out E notation (in J2ME) Example Double value 6.887578324E9 Want to show as 6887578342 回答1: You can create your own method to do that, or use some already existing library. Javolution, for example, gives you the class and method TypeFormat.format(double d, int digits, boolean scientific, boolean showZero, Appendable a) Check Javolution, it has lots of nice utilities, but if the only thing you need is to format numbers, just write your

Blackberry - change latitude and longitude on the device to test app

旧街凉风 提交于 2019-12-03 22:42:22
问题 I want to test my app on the device. Is it possible to hard code the latitude and longitude values somewhere in the device settings so the app reads those instead of the current location? I want to test my app for different locations other than my current location. 回答1: Inside GPS mockup If you have access to your application code, you can always create a mockup implementation for LocationProvider so it will read location and speed data from file or RecordStore and return it as a Location,

How can I use SqLite with BlackBerry OS 4.5?

≡放荡痞女 提交于 2019-12-03 21:23:19
问题 I am currently using Persistent Storage in BlackBerry. I want to use SqLite Database with BlackBerry OS 4.5, but I cannot find any tutorial for that. Can I use SqLite with BlackBerry OS 4.5 or do I need another version of BlackBerry OS? 回答1: There is no SqLite support for BlackBerry OS 4.5. BlackBerry OS 5.0 introduces SqLite support. For more information, see RIM's SQLite overview 回答2: You have 2 options at your disposal The Sybase solution UltraLiteJ Or McObject solution Perst 回答3: Sybase