Giter VIP home page Giter VIP logo

photograph's Introduction

Photograph

android 调用相机拍照。适配到Android 10

这个demo展示了android如何调用手机相机拍照并拿到拍出来的图片。demo兼容到android 10。 在这个demo中,android 10和10以下是分别处理的,使用了不同的方式创建图片uri和加载图片。但其实android 10的创建uri和加载图片方式在android 10以下的手机也是可以使用的,所以只用android 10的方式也是可以兼容所有版本的手机的。

如果想把图片放在手机的共享储存区,比如Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES)文件夹下,需要申请文件读写权限,这点在demo中没有体现,因为demo中拍出来的图片是放在app的私有储存区的。

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.