Blackberry Development-eclipse plugin - blackberry

I want to use JAVA SE Color class in my Blackberry application.
From java.awt.Color package
I have a project on image effect and control(hue,contrast).I have seen android code in that they use Color.colorToHSV().
I saw the same for Blackberry Color class but it has no methods.
So thats why i need JAVA SE color class so that i can use these methods,....
Can I use JAVA SE Color class?
What should I do to do so?

There is no Java SE Color class support in BlackBerry SDK.
Instead of this class there is net.rim.device.api.ui.Color class. It is less functional than Java SE java.awt.Color class.
But there's a workaround.
When you have installed Java SE SDK on your computer, then in that folder where Java SE SDK installed there is src.zip file.
This file contains source code for all standard Java SE classes, including java.awt.Color class. Unpack this src.zip file, find java/awt/Color.java and inspect it, how does it work.
And implement this functionality for your BB application.

Related

Using java code in ipad application

I have .jar file containing java code (Business Layer) of an android application.Is there anyway i can use the same .jar file for developing corresponding iPad application in xcode?
Since ipad applications are built using objective c,you must convert your java code in jar file to objective c.Use the tools like j2objc
http://code.google.com/p/j2objc/
Also refer:
https://stackoverflow.com/questions/4185334/is-there-a-good-java-to-objective-c-converter

Promlem on Adobe Air 3.6 preventBackup

adobe air 3.6 sdk beta released with preventBackup for ios application develop .
but when i used File.preventBackup.resolvePath(dbname) it gives,
1119: Access of possibly undefined property preventBackup through a reference with static type Class.
error,
how can i make directory do not back up with preventBackup
thx.
You get the error because there is no such method or property of File class called "preventBackup"
File class is described here: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/filesystem/File.html#propertySummary
.resolvePath is usually used in combination with a directory property, eg:
File.applicationDirectory.resolvePath(dbName);
Edit:
According to release notes for AIR 3.6 SDK:
To use this feature, application descriptor namespace 3.6 and SWF version 19 or greater would be required
So you need this at start of application descriptor file:
<application xmlns="http://ns.adobe.com/air/application/3.6">
And this in additional compiler arguments:
-swf-version=19

Blackberry AES encryption error

I have implemented AES encryption in BlackBerry using code from the Knowledge Base Article "How to - Use Advanced Encryption"
I keep getting error:
Module 'net_rim_crypto' not found.
In the code I have imported net.rim.device.api.crypto.*; package, but I can't find the package net.rim.crypto.
Do I need to add any external jar for that?
You should install JRE 4.6 and set the API level to 4.6 and OS of the target device should be higher than JRE version.
If you have problem with BlackBerry API or OS version, you may consider to use bouncy castle for j2me.

Generating EAN-13 barcode on Blackberry

I am tryint to generate an EAN-13 barcode in blackberry 5 sdk.I know I can do this in Blackberry 6.0 but I can not use ByteMatrix in 5.0, can you help me or give me an example about how to do this ?
ZXing is an open source project. You can copy the classes you need, or if it is too messy, just download the packages you need from the library and refactor them so that the package names do not collide with the Zxing ones already in blackberry 6.0.

Unable to Create a Database in Blackberry eclipse

I am trying to create a database in blackberry eclipse with jde plugins. I am using Eclipse IDE v.3.4 and pluging v. 1.1 . I have also downloaded an SqLite demo project to understand it. I have searched many sites and tried to run a sample program by copying the code, but it doesn't work. It shows a problem with the following lines:
import net.rim.device.api.database.*;
import net.rim.device.api.database.Database;
import net.rim.device.api.database.DatabaseException;
import net.rim.device.api.database.DataTypeException;
import net.rim.device.api.database.Row;
import net.rim.device.api.database.Statement;
I am not getting the following things:
1) Do I have to make the net.rim.device.api.database package myself?
2) How do I create, update and retrieve information at runtime?
From the sounds of it, I'm not sure that you are building your application with the BB JRE.
How did you create your project in Eclipse?
In your package view, there will be a line that shows something either like Blackberry JRE 5.0.0 or Blackberry JRE 4.5.0 or possibly JDK 6
In order to access your rims, you need to have the BB JRE 5.0 (or 6.0 since it came out yesterday) in your project's build path.

Resources