Showing posts with label Java. Show all posts
Showing posts with label Java. Show all posts

Tuesday, December 29, 2009

BlackBerry Security Permissions

If you are eager to find out about BlackBerry security permissions and ways to handle prompts following video from BlackBerry will help you in understanding the basics of it.

http://www.blackberry.com/DevMediaLibrary/view.do?name=SecurityPrompts

Further more if you are seeking ways to change application permissions using code, following link will help you to get more details of the Application Permissions class from RIM device API.

http://docs.blackberry.com/en/developers/deliverables/6022/net/rim/device/api/applicationcontrol/ApplicationPermissions.html#PERMISSION_INPUT_SIMULATION

Friday, August 21, 2009

Missing Textbox in BlackBerry Application

Recently in one of my BlackBerry projects my development team faced a peculiar error.
We were targeting the device BlackBerry 8900 Curve for the project.
The device we purchased was having OS version 4.6.1.114 and our application was functioning properly on that.
But when we sent the application to our client suddenly he was complaining that one textbox was missing completely. Only difference was that the client was using a BlackBerry 8900 Curve having the OS version 4.6.1.250.
Following are the view at the two ends.
At our device.
At the customer site.

To find out the issue we had to even upgrade the BlackBerry OS and we found that in the new OS version the HorizontalFieldManager is having its default width wrong. So our textbox was hidden. We corrected it by the following change, making the sub layout always have a width that we prefer.

hfmtxtPassword = new HorizontalFieldManager() {

protected void paint(net.rim.device.api.ui.Graphics graphics) {

graphics.setBackgroundColor(Color.WHITE);

graphics.clear();

super.paint(graphics);

}

protected void sublayout(int maxWidth, int maxHeight) {

super.sublayout(278, maxHeight);

}

};