简体   繁体   English

在Android应用中使用相机

[英]Using the camera inside an Android app

I want to create an Android app which uses a camera, but I don't want the app to redirect to the default camera app on the device. 我想创建一个使用相机的Android应用程序,但不希望该应用程序重定向到设备上的默认相机应用程序。

I want a custom-made camera app specifically for the app. 我想要一个专门为该应用程序定制的相机应用程序。 How do I implement it? 如何实施?

Look into this tutorial http://www.airpair.com/android/android-camera-surface-view-fragment 查看本教程http://www.airpair.com/android/android-camera-surface-view-fragment

Link 2 连结2

you can use SurfaceView Fragment. 您可以使用SurfaceView Fragment。

Here is a nice tutorial to accomplish it. 这是一个很好的教程来完成它。

Camera Integration with Surface View 相机与Surface View集成

You can make your custom changes on the SurfaceView according to your requirements. 您可以根据需要在SurfaceView上进行自定义更改。

I used https://github.com/commonsguy/cwac-camera to get custom camera done. 我使用https://github.com/commonsguy/cwac-camera来完成自定义相机。

The library @commonsware made, great library with great documentation and support. 库@commonsware制成,具有出色的文档和支持的强大库。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM