java-me

Queue Thread In Blackberry

房东的猫 提交于 2019-12-09 17:06:53
问题 I've looked at the BB API(5.0) and I can't find any way of serially executing a batch of threads. I know BB has a limit on the number of threads it will launch, so I don't want to launch 7 if the user clicks through things fast enough but I cannot find anything like a thread pool. Is there an easy fix for this or do I have to create a data structure? 回答1: If you just want to execute a bunch of tasks on a single thread serially and order isn't important, you could create a Timer object (which

How to get Latitude and Longitude for particular city or street without using google map?

随声附和 提交于 2019-12-09 12:04:22
问题 How to get Latitude and Longitude for particular city or street or location without using google map? For example user entered city name is "Chennai" and i need to show only Latitude and Longitude for that city. How to do this? 回答1: This is called Geocoding, and requires matching a place name up to a latitude and longitude. You can either code a known list of place name/lat-lons into your app, read them in at runtime and search through them when required, or you can use an online Geocoding

What is the difference between httpconnection on J2ME and HttpUrlConnection on Android (http error 401)

佐手、 提交于 2019-12-09 06:36:17
问题 I connect to two servers (PROD is https, test server is http) on my applicaitons. on J2ME: I can connect to this two servers without a problem. on Android I can't connect to test-server. When connection is http, if I dont use setChunkedStreamingMode , I cant get responseCode(StringIndexOutOfBoundsException); if I use setChunkedStreamingMode , response code is 401 . What should I do, where is my fault?? Here is my android code, Also if you want to see J2me code, I can add it, too. URL url =

How to make Blackberry UI more attractive?

佐手、 提交于 2019-12-09 04:20:23
问题 I am working on BlackBerry user interface. But the BlackBerry UIs are less attractive compared to Android UI. I want to make my BlackBerry UI more attractive like in Android. 回答1: @Dave Markle is right, this is a fairly general question. Assuming that by 'attractive' you mean 'UI Controls that look better than the default' then you'll have to do a lot of custom control work. More an more in the BlackBerry industry it seems that leading applications are doing almost entirely custom UIs. I won

Developing photo gallery application

给你一囗甜甜゛ 提交于 2019-12-08 17:29:42
I want to develop a photo gallery in Blackberry. Please give any suggestions about functionality and implementation. Maksym Gontar There are couple things to do: gallery layout variations (table, list, tape) several thumbnail size variations info from file (format, resolution, size, etc) file browser component send mail/publish web etc camera integration Additional features: slide show rating functionality converter functionality synchronization device-device, device-desktop, device-web home screen wallpaper ( available up from 4.7 ) See for code samples: BlackBerry Dev Blog - How to use Table

how to kill a thread which is waiting for blocking function call in Java?

偶尔善良 提交于 2019-12-08 17:08:04
问题 I have a thread: Thread t = new Thread(){ public void run(){ ServerSocketConnection scn = (ServerSocketConnection) Connector.open("socket://:1234"); // Wait for a connection. SocketConnection sc = (SocketConnection) scn.acceptAndOpen(); //do other operation } }; t.start(); Lets say no client is connecting to the Server, so this thread will be blocked.Now I want to kill the above thread t? How can I kill it? 回答1: Thread.interrupt() will not interrupt a thread blocked on a socket. You can try

Query related to Connection type BIS-B Socket in Blackberry application

强颜欢笑 提交于 2019-12-08 13:37:26
问题 I am trying to establish BIS Socket connection. I am able to establish BIS Http connection from my service provider. I have downloaded one chat application that checks network types supported by my device/service plan which has following list: 1)BIS-Http : OK 2)BIS-SOCKET :OK 3)BES-HTTP : NA 4)BES-SOCKET : NA 5)TCP-HTTP : BAD DNS 6)TCP-SOCKET : TIMED OUT As I know direct TCP is not supported by my service provider. So I would like to use BIS-Socket connection. Can anypne please help me in

implementation of interp1 function of MATLAB in J2ME

南笙酒味 提交于 2019-12-08 11:58:24
问题 i am looking to implement the interp1, 1-D data interpolation (table lookup), function available in MATLAB in J2ME or JAVA. here is the link http://www.mathworks.com/access/helpdesk/help/techdoc/ref/interp1.html Is there any library available in J2ME or JAVA which has already implemented the same function ? If not can anybody help me in implementing interp1 function in J2ME or JAVA ? 回答1: Example code taken from here (linear only): public static final double[] interpLinear(double[] x, double[

how can i call background application from ui Application+blackberry

瘦欲@ 提交于 2019-12-08 10:43:24
问题 i am trying to make a uiapplication If i click on a button then a background thread must start which should run even when my application is exited how can i do that I created a background thread but it gets stop when the app exits. 回答1: Create your application as a system module that starts automatically and runs in the background. You can have an alternate entry point that will pass an argument to the main app to start your GUI. When you exit the GUI it won't exit the entire application. 回答2

tunnel failed in blackberry bold. why?

冷暖自知 提交于 2019-12-08 07:17:06
问题 I created a j2me program and ported it to the blackberry bold. The program does some http queries. Every now and then these fail with the exception: 'tunnel failed' My APN settings are correct (since sometimes it does work). I connect with ' ;deviceside=true ' appended to the url I notice that when the browser has just been active, the program always works. However when the browser hasn't been active for some minutes and I start the program, I get the tunnel failed errors. 回答1: The problem