Coder Social home page Coder Social logo

theappguruz / android-take-photo-from-camera-and-gallery-code-sample Goto Github PK

View Code? Open in Web Editor NEW
41.0 41.0 50.0 8.49 MB

Main objective of this tutorial is to help you to set Image/Photo from Camera or Gallery.

Home Page: http://www.theappguruz.com/blog/android-take-photo-camera-gallery-code-sample

Java 100.00%

android-take-photo-from-camera-and-gallery-code-sample's People

Contributors

tejas123 avatar yudiz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

android-take-photo-from-camera-and-gallery-code-sample's Issues

the app works on emulator but not on real device.. any suggestion for troubleshooting?

It works if I take a new photo using the camera, but if I try to select a photo from the gallery it won't display..
Any tips for troubleshooting? Thank you!


UPDATE

The problem was the image too big to fit into the imageView.
I actually solved scaling the image with this code:

int nh = (int) ( bitmap.getHeight() * (512.0 / bitmap.getWidth()) ); Bitmap scaled = Bitmap.createScaledBitmap(bitmap, 512, nh, true);

I guess it's a part you could add to the tutorial as many images in the gallery of modern phone will be quite big.

Thank you

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.