java-me

Loading image in Java J2ME

此生再无相见时 提交于 2019-12-21 17:54:06
问题 I have a problem with loading image with java 2ME. I have a image file "picture.png" in location drive "C:". After that I wrote my like this to show image from this location. import javax.microedition.midlet.*; import javax.microedition.lcdui.*; import java.io.*; public class ImageMidlet extends MIDlet implements CommandListener{ private Display display; private Command exitCommand; private Command backCommand; private Command okCommand; private Form form; private ImageItem imageItem; private

Compacting Http Headers

亡梦爱人 提交于 2019-12-21 12:19:12
问题 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. 回答1: I've never had to optimize site performance by chopping off headers. That said, most of the issues had to do with: Large

connect to non-discoverable bluetooth device

余生长醉 提交于 2019-12-21 09:22:04
问题 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. 回答1: 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

What is a good toolkit for developing Blackberry applications?

孤人 提交于 2019-12-21 04:51:16
问题 Looking for a toolkit/SDK for general Blackberry development or application toolkits. Anything like an MVC framework? 回答1: My understanding is that blackberry's OS is Java ME - based, and that there's a decent development kit for them. I presume you have already looked over everything here... you can find a lot of information, including the development kit download link. Regarding model-view-controller, there's no particular framework to my knowledge, but I don't see why you wouldn't be able

What is a good toolkit for developing Blackberry applications?

天大地大妈咪最大 提交于 2019-12-21 04:51:09
问题 Looking for a toolkit/SDK for general Blackberry development or application toolkits. Anything like an MVC framework? 回答1: My understanding is that blackberry's OS is Java ME - based, and that there's a decent development kit for them. I presume you have already looked over everything here... you can find a lot of information, including the development kit download link. Regarding model-view-controller, there's no particular framework to my knowledge, but I don't see why you wouldn't be able

BlackBerry InputStream to String conversion

佐手、 提交于 2019-12-21 02:47:28
问题 How do I convert an InputStream to a String on a BlackBerry? 回答1: I would store the data from the inputStream in a StringBuffer. The code would look like this: byte[] buffer = new byte[1024]; StringBuffer sb = new StringBuffer(); int readIn = 0; while((readIn = inputStream.read(buffer)) > 0) { String temp = new String(buffer, 0, readIn); sb.append(temp); } String result = sb.toString(); 回答2: How about this for minimal code: String str = new String(IOUtilities.streamToBytes(is), "UTF-8"); 回答3:

What libraries are available to help create 2D Java games for phones?

笑着哭i 提交于 2019-12-21 02:37:19
问题 I want to begin developing 2D Java games for phones (on J2ME) therefore I'd like to know if any libraries or "engines" exist to help out in the various graphical tasks: Drawing text with pixel fonts? Drawing bitmaps for sprites with multiple frames like animated GIFs? Drawing graphics with code, lines, beziers, flood-filling and gradient fills? Ordering / layering of sprites? Or maybe a great book exists, that gives you enough code samples to get off the ground quickly? 回答1: I didn't use it

Debugging j2me on a Device

时光总嘲笑我的痴心妄想 提交于 2019-12-21 00:32:30
问题 Has anybody had any success ever attaching a debugger to a tethered device? I am able to debug my j2me application in the emulator, but have a lot of trouble sorting out phone-specific problems when they come up. The phone I'm using is a Nokia N95, but ideally the debug process would work on any phone. Is this possible? If so does anyone have steps they've used to set it up? 回答1: Sony Ericsson supports debugging on ebery phone at least since K700, this is done by using KDWP. UIQ 3

Desigining a Form in j2me [closed]

心不动则不痛 提交于 2019-12-20 08:00:08
问题 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 trying to design a Form in J2ME without the use of Canvas class which has List like structure and an image as a Header. I want to add command button (OK) So by clicking on it ... i can choose a particular

How to save an image into photo gallery using j2me

 ̄綄美尐妖づ 提交于 2019-12-20 07:50:51
问题 I am making an application for nokia, samsung, lg ets using j2me. I want to save an image into photo gallery of mobile. But i didn't have any idea what path i use to save image? 回答1: Look on this article, Getting Started with the FileConnection APIs. Also look on this example, File Connection Using J2ME api JSR 75. 回答2: String initDir = System.getProperty("fileconn.dir.photos"); Mobile's Internal Memory can make issue if it is limited. So You should use Memory card to save the images. You can