java-me

Can we run Java applications on iPhone? [closed]

橙三吉。 提交于 2019-11-27 14:28:54
Can we run or develop apps for iPhone in Java? Have a look to these links and answer: http://www.iphonefaq.org/archives/9731 http://www.j2mepolish.org/cms/leftsection/documentation/platforms/iphone.html http://www.ibm.com/developerworks/opensource/library/os-eclipse-iphone/ gizmo Currently, there is no JVM running on the iPhone. This means that the only way you have to develop apps for iPhone in Java is to have a compiler that will compile your java code down to Objective-C code. There are several solutions that do exactly that: Codename One - focuses on building applications using Java with

Best practice for storing large amounts of data with J2ME

人走茶凉 提交于 2019-11-27 14:09:28
I am developing a J2ME application that has a large amount of data to store on the device (in the region of 1MB but variable). I can't rely on the file system so I'm stuck the Record Management System (RMS), which allows multiple record stores but each have a limited size. My initial target platform, Blackberry, limits each to 64KB. I'm wondering if anyone else has had to tackle the problem of storing a large amount of data in the RMS and how they managed it? I'm thinking of having to calculate record sizes and split one data set accross multiple stores if its too large, but that adds a lot of

How do I split strings in J2ME?

核能气质少年 提交于 2019-11-27 14:03:49
How do I split strings in J2ME in an effective way? There is a StringTokenizer or String.split(String regex) in the standard edition (J2SE), but they are absent in the micro edition (J2ME, MIDP). There are a few implementations of a StringTokenizer class for J2ME. This one by Ostermiller will most likely include the functionality you need See also this page on Mobile Programming Pit Stop for some modifications and the following example: String firstToken; StringTokenizer tok; tok = new StringTokenizer("some|random|data","|"); firstToken= tok.nextToken(); There is no built in method to split

Java obfuscation - ProGuard/yGuard/other? [closed]

一个人想着一个人 提交于 2019-11-27 14:00:20
This is along similar lines as these recent questions: Best Java Obfuscation Application For Size Reduction Creating non-reverse-engineerable Java programs However, one ends up recommending yGuard and the other ProGuard but neither mention both. I wonder if we could get a comparison of each one and hear peoples experiences from both sides of the fence. Looking at this comparison chart on the ProGuard website its clearly angled towards ProGuard. But what about real-world experience of each - which one produces smaller output? which one is harder to decompile from? what Java versions are

Audio spectrum analysis using FFT algorithm in Java

无人久伴 提交于 2019-11-27 12:15:30
I want to analyze the spectrum of an audio file in Java (ME). I want to draw spectrum as some media players do. But I don't understand some points: Input for FFT algorithm, which I have to get from the audio file. I don't now what it is called, what it is and more important, I don't know how to get it. Output: if input is an array (range?) I obtain other array, and it have range: 0-1, right (or not)? So what I have to do with it? You need a few additional steps in addition to the FFT. This has been covered many times already in previous similar questions here on SO, and you can find additional

How to parse the JSON response in Blackberry/J2ME?

我只是一个虾纸丫 提交于 2019-11-27 08:57:38
I want to parse the response coming from the server in JSON format. I have done some googling but i can't find any library or jar kind of thing. Everywhere there is provided open source code as zip file. How can i achieve this? if there is no jar available for blackberry then how to use that open source code in my application?? There is an open source JSON for J2ME API on Mobile and Embedded Application Developers Project Also you can download JSON ME (Zip file) at JSON.org not supported anymore. But you can get it from here . I believe you can simply copy content of json project src folder to

JSON parser for J2ME

十年热恋 提交于 2019-11-27 08:57:19
I need a basic JSON parser that works with J2ME / CLDC 1.1. A Google search returns tons of answers on this (some even on stackoverflow), but it appears that all point to libraries and solutions that are no longer available (for example, lots point to an implementation that is supposed to be on the json.org site, but at least I can't find anything that isn't J2SE only there). My best hope so far is the source linked here: https://meapplicationdevelopers.dev.java.net/mobileajax.html , but from that one I can't even find a straight forward way to download the code. Given the mature state of Java

Parse XML file on BlackBerry

匆匆过客 提交于 2019-11-27 08:47:01
I want to know how to parse XML data on a BlackBerry. I read somewhere that JSON is good method to parse xml data. Are there any tutorials to parse XML data using JSON, or any other mechanism? Maksym Gontar Parsing XML in Blackberry Simple API for XML (SAX) was developed by the members of a public mailing list (XML-DEV).It gives an event based approach to XML parsing. It means that instead of going from node to node, it goes from event to event. SAX is an event driven interface. Events include XML tag, detecting errors etc, J2ME SAX - see BlackBerry/J2ME - SAX parse collection of objects with

J2ME power(double, double) math function implementation

*爱你&永不变心* 提交于 2019-11-27 08:15:23
问题 I want to implement math function power to double, can you advice algorithm for this? I've reviewed sources of Java ME Open Source Software - Math but I want to implement it from the scratch. Thank you! 回答1: I don't know J2ME well enough to know, but do you have Math.log() and Math.exp() ? Then you can simply use this relation: x^y = exp(y * log(x)) If you don't have the aforementioned two functions, then you should start by implementing those. As far as I know, the above relation is the only

How to capture images using LWUIt VIdeoComponent

走远了吗. 提交于 2019-11-27 07:57:05
问题 I have tried using MediaComponent , but since it is now deprecated it wont be good moving forward. Also i was not able to get it to re-size to full screen on the form. I am trying to use VideoComponent to capture a screen shot in an S40 device. I cant find how to instantiate the VideoComponent properly for capturing an image and not playing a video. 回答1: You can use VideoComponent for capturing an image. First, to instantiate the VideoComponent, you need to create a native peer: