Search icon CANCEL
Subscription
0
Cart icon
Cart
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Android Studio Cookbook

You're reading from  Android Studio Cookbook

Product type Book
Published in Oct 2015
Publisher
ISBN-13 9781785286186
Pages 232 pages
Edition 1st Edition
Languages
Author (1):
Mike van Drongelen Mike van Drongelen
Profile icon Mike van Drongelen
Toc

Orientation issues


On some devices (such as the Samsung ones), captured images in portrait mode are rotated 90 degrees; and on other devices (such as the Nexus devices), things seem to be just fine. You won't notice this if you have a look at the file using the Astro app, for example, but you will if you see the preview in the Facebook share dialog.

This is a well-known challenge for many Android developers. Images may contain metadata about the rotation degree, but apparently not every app respects that metadata. What is the best solution? Should you rotate the image every time you want to display it? Should you rotate the bitmap itself, which could be very time and processor consuming?

Getting ready

For this recipe, you need to have the previous recipe completed successfully. It would be ideal if you had multiple Android devices to test your app on. Otherwise, it would be great if you had at least a Samsung device available, as the orientation issue can be reproduced for most (if not all...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}