Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Android™ Development

Posts: 1
Registered: ‎06-24-2014
My Device: BlackBerry 10 Device Simulator
My Carrier: -

porting from Android - camera orientation issue

Hi guys,


I am new in the blackberry world. I am trying to port an android app. I don't have any blackberry device so i am just using Eclipse and the simulator. 


I have an issue with the camera. I take a picture and it seems to be saved correctly in the simulator gallery but when I try to show the preview in an ImageView it seems always loaded in landscape orientation.


The cose I use is this:


BitmapFactory.Options bmOptions = new BitmapFactory.Options();

BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);

int scaleFactor = 1;

bmOptions.inJustDecodeBounds = false;
bmOptions.inSampleSize = scaleFactor;
bmOptions.inPurgeable = true;

Bitmap bitmap = BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);

int w = bitmap.getWidth();
int h = bitmap.getHeight();



w>h always! Also if the picture is portrait shaped. 


Can anyone help me please?


Thank you in advance

Posts: 108
Registered: ‎04-14-2013
My Device: BlackBerry Z30
My Carrier: Chunghwa Telecom

Re: porting from Android - camera orientation issue

In my experience, there was simulator bug about the orientation...
Not sure it existed still or not.
I can check it

BlackBerry Certified Cascades Developer