java-me

APN settings in Java ME

两盒软妹~` 提交于 2019-12-11 06:49:34
问题 Since it is not possible to specify the APN for HttpConnection in plain Java ME, are there vendor specific hacks other than BlackBerry OS URL suffixes? 回答1: The only way I know is using a suffix: "http://somenonexistingurl.fake;apn=<myapn>" I think it should also work in a J2ME MIDlet running on BB. As for the other non-bb devices, my guess is no. In J2ME you are not programming to a "phone" but to a "connected limited device" which may not have internet at all. 来源: https://stackoverflow.com

LWUIT Scrolling

梦想与她 提交于 2019-12-11 06:46:00
问题 Here is another question regarding JavaMe and LWUIT. I need to manually scroll TextArea with help of methods or etc. TextArea contains methods responsible only for obtaining current position of scrolling and its enable and disable. How can I do this? I solved problem by using inheritance from TextArea and delegation protected methods of scrolling (setScrollX and setScrollY accordingly). Thanks to all! 回答1: TextArea extends TextField. In the TextField class there is the setCursorPosition

How to launch a LWUIT form from a LCDUI form?

江枫思渺然 提交于 2019-12-11 06:40:00
问题 The question has been indirectly spoken about in some of the earlier questions but i havent seen anything decisive about it.. I am currently using this piece of code to show a LWUIT form inside CommandAction implementation. public void commandAction(Command cmnd, Item item) { if (item == LogIn && cmnd == maincommand) { RechForm = new com.sun.lwuit.Form("Basefook"); HttpRequestHandler handler = new HttpRequestHandler(); HTMLComponent htmlc = new HTMLComponent(handler); htmlc.setPage("http:/

In J2ME, is that possible to operate an Alert dialog box with Yes & NO command?

﹥>﹥吖頭↗ 提交于 2019-12-11 06:28:15
问题 I have created an Alert dialog box in my J2ME app to alert user when user press exit button to terminate an app and ask user confirmation to exit from app with yes and no command. When user press Yes button app will terminate and when user press No button app will return to its Main form. To do this I developed a code from scratch which are as follows: public class CustomAlert extends MIDlet implements CommandListener { Alert ExitAlrt; Display d; Command MainListSelect, Exit, YesCmdAlrt,

Advantage and Disadvantage of J2ME?

ぐ巨炮叔叔 提交于 2019-12-11 06:27:33
问题 I would like a list of advantages/disadvantages of J2ME, mainly MIDP. I figured that this would be the best place to ask since there seems to be a wealth of knowledge in this forum. Currently I have the following advantages in J2ME., * Rich Clients * Offline use * Consistency of applications across platforms * Reuse of existing code base I don't really have a list of disadvantages although I am sure that there are plenty. Any views on either advantages/disadvantages[ie., Limitations of J2ME]

No midp20.jar in J2ME SDK 8.3

走远了吗. 提交于 2019-12-11 06:09:30
问题 I downloaded Oracle Java ME SDK 8.3 for Ubuntu Linux . To create Java midlets I need the midp api which was supposed to be in lib directory. Currently I am having just these files in lib directory Has Oracle stopped support for J2ME mobile devices ? 回答1: Haven't looked into it too much, but I'm fairly sure you just need SDK 3.4 The problem is that JavaME isn't just one thing. Most people think "cellphones" (MIDlets) when they hear JavaME, but it's actually a lot of other things too, like for

WebDAV with J2ME

元气小坏坏 提交于 2019-12-11 06:07:24
问题 Is there a way to use WebDAV with J2ME (some libraries or manual coding)? I've tried: - javax.microedition.io.HttpConnection, but "SEARCH" method not supported there - javax.microedition.io.SocketConnection with Http request - nothing returns in response Maybe something wrong with my code or HTTP header: String response = ""; String query = "<?xml version='1.0'?> " + "<g:searchrequest xmlns:g='DAV:'> " + "<g:sql> " + "SELECT 'DAV:displayname' " + "FROM 'http://exchangeserver.com/Public/' " +

MediaException Using BlackBerry Media Player

蓝咒 提交于 2019-12-11 05:57:40
问题 I'm facing problem playing a video through a URL. The URL does not have .xyz extension but gives response in inputstream of a .3gpp video. On prefeching media player it throws exception-net.rim.internal.media.rimmediaexception:media unloaded while initialising. I can't understand the reason of exception, please help me. this is my code- con = HttpRequestHelper.service(url, null); inputStream = con.openInputStream(); final Player player = javax.microedition.media.Manager.createPlayer

JavaME, Implementing Peer to Peer communication

随声附和 提交于 2019-12-11 05:57:31
问题 I have 4 phones connected to a Wifi access point and I know the MAC/IP of all of these including the Wifi access point. I need to implement communication between each of these phones, a sort of peer to peer communication, I was thinking about using sockets but then each phone will have to implement a ServerSocket and Socket on each of the phones is this fine? The Ip's of these phones would be in private range 192.168.... so could I use something like http://192.168.xx.xx/port and contact any

J2ME LWUIT - Drawing email address error

流过昼夜 提交于 2019-12-11 05:39:08
问题 I'm working on my J2ME application trying to fix some bugs. One of this happens when I want to show a email address. I have a string with a valid email address (mark@mail.com as example) and when I use drawString of LWUIT it draws the email address without the @ (markmail.com) I try to draw the chain "@@@@" and shows "" Any idea?. Is it necessary to add some special character to draw @ 's? 回答1: Solved! The problem was the charset of the resource file. I added the @ to the charset and now it