Blackberry dev - Question about jre 1.5 - blackberry

I THINK I know the answer to this, but can't find any plain English to confirm it.
I am currently porting an Android app to blackberry. I've gotten over most problems, but ArrayLists are the one I'm stuck on, since they were only introduced in 1.5 .
Can anyone tell me if it is possible to develop for newer blackberry devices, while having java compliance set to 1.5?
I'm thinking that J2ME is the deciding factor with blackberry. So if that only supports 1.3, then EVERY app made for blackberry must be written in eclipse with a compliance level of 1.3 set, and any newer blackberrys would be the same, and therefore ArrayLists are impossible.
Can someone confirm this for me?
Thanks.
PS Would it be possible to create my own ArrayList class, with the angle brackets < > as well?

You have to use Java 1.4 compliance for BlackBerry because they use J2ME.
Use Vector for your dynamic list. You can't use Generics<>.

Related

Can I code iPhone apps using Eclipse?

As you can probably guess, my knowledge of coding is very limited. Nonetheless, I do know a little Java. I have Eclipse and was wondering if I could use it to code for iOS iPhone/iPad applications. I know that I would almost certainly have to use a language other than Java, but I'm clueless as to what packages or plugins I would need to install in Eclipse to use it to code for iOS. If you guys could answer this question in extreme detail or link me to a very good sequence of video tutorials, I would be extremely grateful.
Yes you can!
If you can live with coding ActionScript, which should be easy to learn with a Java background, you can use Eclipse & AIR to code for iOS (and Android at the same time)
Some resources:
http://flex.apache.org/
http://labs.adobe.com/technologies/flashruntimes/
http://blogs.adobe.com/flashplayer/
http://flashdaily.net/
Be aware that many apps in the store have been build on this platform, and the community is pretty alive and supportive.
The short answer is, "not natively."
Apple pretty much restricts "native" iOS development to XCode which, as #Bob said in his answer, is only available for OS X. So that means no Eclipse or Java-based development. However, there are several cross-platform development frameworks and tools that work to varying degrees of quality. Here are a few, in no particular order:
PhoneGap
Appcelerator
Corona
Adobe AIR (see answer by #dogsgod)
There are others, but those are ones that I've at least heard of and might have tried a little bit. Some, like Appcelerator, have IDEs built on Eclipse, so at least the dev environment would be familiar.
IOS apps are written in Objective-C or Swift using XCode. (This also means you'll need a Mac to do so. XCode is only available for OSX.)
So unfortunately this means the answer to your question is no. You cannot use Eclipse to write an iOS app.

Compiling different scetions for different version - Java

Is there any way to compile BlackBerry Java code for different sections using eclipse ?
There is a class named LocationInfo available in BB version OS 6.0 onwards.
I get a compilation error if try to compile for OS 5 (because LocationInfo is
not defined)
But if I compile my code for OS 6, I wont be able to deploy on any 5 based devices.
I want to my code base to be of version 5 and support the methods of Locationinfo (which is available only in 6.0 onwards).
Is a sectional compile possible or is there any work around for this ?
Thanks
Try the BlackBerry preprocessor
Coding for Multiple Blackberry Devices - Using Preprocessor Directives in Eclipse
The OP wanted to know whether there was a way to a class available in os 6.0 , in an os 5.0 device. The blackberry processor does help in creating builds for different versions, but doesnt answer the question. The OP would like to know whether there is the blackberry equivalent to androids "Support Package" or the "Compatibility package" which allows to use APIs that are not available for older platform versions.
Sorry , but there is no similar package on blackberry which you can use to address your issue.
You will have to use blackberry pre processor and then develop features for different devices based on the os they provide. Later OS's will have more apis you can play with, so you can implement better features on those. In earlier OS's you are stuck with using the restricted set of api methods, and hence some features may not be implemented on those.
Hope this helps

What do you need to do to create a single package for blackberry OS5 and OS6 devices?

A newb question and one I haven't been able to see much advice on, but is it possible to create a single package that will install and run on both blackberry OS5 and OS6 devices?
I want to avoid preprocessing or creation of two different COD files.
I am not using anything special that differs between the two OS's (afaik!)
Yes, absolutely. So far, RIM has made all of it's OS revisions backwards-compatible. So anything you write against any given OS version will work on that version and all newer versions.
That's not to say that you won't run into funny quirks when moving to newer OS versions, but your code will execute without recompilation. You just can't take advantage of any of the newer OS's API changes without doing preprocessing.
Basically in this case you just should not use APIs which were added in OS6.

Blackberry OS 4.6 and 5.0

What is difference between Blackberry OS 4.6 and 5.0?
Thanks.
Two major differences that I've found are that SQLite does not work on anything below OS5.0 (though it only 75% works on OS5.0 anyway) and that BrowserField2 does not work in anything below OS5.
Really? Try to compile your code using a different JDK and see what happens :)
That's sort of a vague question. From the developers side you can look at the differences between the 4.6 API and the 5.0 API yourself. The major additions I noticed were the accelerometer classes and the ConnectionFactory.
From the user side you can google any number of articles on new features for 5.0. Here are a couple I found: BoyGeniusReports, PCMag.
If you tell us more about your application we might be able to tell you whether you'd likely need to use the 5.0 OS or not.

What is difference between J2ME and J2ME Polish

I did j2me program...now i need convert to j2me polish...how to do it..
As Graham already stated J2ME Polish is not a new technology but rather a framework to simplify the development of J2ME applications across a broad range of devices. To use Polish you have to include their JARs into your buildpath, familiarize with their ANT build scripts and basically work through the documentation. It takes some time, but it's definitely worth it if you try to develop for different devices. Polish delivers a rich set of UI extensions, preprocessing of your source, localization and so much more. By taking advantage of their device database you can avoid known device bugs and build your application individually for each device.
Take the time to read the documentation.
Everything from installation to application build is explained there.
Dont use J2Mepolish.It causes many problem.If you use j2mepolish then your application become working in a single type of device.Without using j2mepolish your application is working more than 1 type of devices.
If you want to use any framework means then you use "LWUIT".It is well suited to J2ME .
Both J2ME and LWUIT are Sun's (Oracle) product.

Resources