blackberry

Efficient way of checking if a location is inside a rectangular perimeter?

喜夏-厌秋 提交于 2020-01-24 11:44:45
问题 I'll first introduce the problem: I'm developing an application where I've to show a map field, and overlay markers and lines. However, in BlacBerry OS 5.0, the only MapField available in the API does not provide means to overlay stuff, only show the map at a location. It also provides methods to transform screen coordinates (pixels) to/from WGS84 coordinates. These methods might be computationally expensive. So to paint my own items, I need to extend this class and override its paint()

Efficient way of checking if a location is inside a rectangular perimeter?

大憨熊 提交于 2020-01-24 11:44:31
问题 I'll first introduce the problem: I'm developing an application where I've to show a map field, and overlay markers and lines. However, in BlacBerry OS 5.0, the only MapField available in the API does not provide means to overlay stuff, only show the map at a location. It also provides methods to transform screen coordinates (pixels) to/from WGS84 coordinates. These methods might be computationally expensive. So to paint my own items, I need to extend this class and override its paint()

Efficient way of checking if a location is inside a rectangular perimeter?

元气小坏坏 提交于 2020-01-24 11:44:14
问题 I'll first introduce the problem: I'm developing an application where I've to show a map field, and overlay markers and lines. However, in BlacBerry OS 5.0, the only MapField available in the API does not provide means to overlay stuff, only show the map at a location. It also provides methods to transform screen coordinates (pixels) to/from WGS84 coordinates. These methods might be computationally expensive. So to paint my own items, I need to extend this class and override its paint()

Blackberry Java: TextField *without* the caret?

▼魔方 西西 提交于 2020-01-23 03:43:45
问题 I want a non-editable TextField (or a subclass) that doesn't even have the caret displayed. Alternatively, I want a multiline LabelField. Is any of these possible? 回答1: TextField without focus cursor TextField readOnly = new TextField(NON_FOCUSABLE); readOnly.setText("Read only, no carret"); add(readOnly); TextField drawFocus override If text is too large to fit the screen, you can override drawFocus method in TextField, so scrolling will be available: TextField readOnly = new TextField

Bing Maps SDK For Blackberry 6.0

こ雲淡風輕ζ 提交于 2020-01-20 05:21:44
问题 I need to use Bing maps in an app being developed targetting blackberry OS 6.0. But could not find any natively available framework or SDK. Please help me on using either Bing or Google Maps SDK on blackberry. Please provide the references from where I can get the SDK. Thank you. 回答1: Here is an example of using Google Maps , don't know how to use Bing maps. First, install Google Maps on your device/simulator from http://m.google.com/maps/ by hitting this link on the browser of the device

Bing Maps SDK For Blackberry 6.0

别来无恙 提交于 2020-01-20 05:21:08
问题 I need to use Bing maps in an app being developed targetting blackberry OS 6.0. But could not find any natively available framework or SDK. Please help me on using either Bing or Google Maps SDK on blackberry. Please provide the references from where I can get the SDK. Thank you. 回答1: Here is an example of using Google Maps , don't know how to use Bing maps. First, install Google Maps on your device/simulator from http://m.google.com/maps/ by hitting this link on the browser of the device

How to call a .NET web service from Blackberry Simulator?

谁说胖子不能爱 提交于 2020-01-20 04:16:06
问题 I have to call a .NET web service (http://192.168.1.14/CG/authentication.asmx) from the Blackberry Simulator. Already i have done it in Android with KSOAP2, but i have no idea about how to do this in Blackberry. Can i use KSOAP2 in Blackberry? If i can please give some code snippets. Also please tell if you know any other ways to do this. 回答1: I've not used KSOAP2 before but I know that you can use it for Blackberry. To call web services I use the Sun Java Wireless Toolkit (WTK) to generate

BlackBerry read json string from an URL

╄→尐↘猪︶ㄣ 提交于 2020-01-17 14:45:47
问题 I tried to read a json string loading from an URL, but I could not find complete code sample. Can any one provide or point me to a complete client code. I'm newer to BB development. this is what I have done but still can't get it work please help me. Thanks! 回答1: To read and parse data from an URL you need to implement two routines. First one of them will handle reading data from the specified URL over HTTP connection, and the second one will parse the data. Check the following application

scroll change listener on blackberry

独自空忆成欢 提交于 2020-01-17 08:11:24
问题 When I execute the following code on a simulator it throws stackoverflow error. I think the error came for, Each newhorizontalScroll value when I scroll. How to avoid it or how to calculate the final horizontal scroll value? int customfiledwidth = Display.getWidth()/3; HorizontalFieldManager horizontalScrollLayout = new HorizontalFieldManager(HorizontalFieldManager.HORIZONTAL_SCROLL) horizontalScrollLayout.setScrollListener(this); // i add number of customfield on horizontalscrolllayout.....

Upload image to server from Blackberry

二次信任 提交于 2020-01-17 08:05:46
问题 I am trying to send an image to server. I converted the image to a byte array. I then tried the code from "HTTP Post multipart file upload in Java ME" on the Nokia developer forums. I also tried the code from "HTTP POST and passing parameters in URLs" on the BlackBerry forums. I am passing parameters and getting response code 200. But image is not sent to the server. I am stuck on this. 回答1: try{ FileConnection fis=(FileConnection)Connector.open(filename); InputStream inputStream = fis