Android calls the camera to take photos and video
Application scenario:
In the process of Android development, it is sometimes necessary to call the functions of the mobile phone's own devices. The previous article mainly focused on the call of camera photographing function. This article will comprehensively realize the operation of photographing and video.
Introduction to knowledge points:
Please read [Android calls camera function] in this section
Usage:
Step 1:
Create a new Android project cameraphotovideo, which contains two activities: mainactivity and cameraactivity.
Step 2:
activity_ main.xml
MainActivity.java
activity_ camera.xml
CameraActivity.java
Step 3: the project needs a tool class formatutil.java
Step 4: this project needs to handle the background style of the interface and the background of the button, so you need to create a new shape in the RES / drawable file_ main.xml。
Page effect:
Effect screenshot
Download address: Android calls the camera to take photos and video
The above is the whole content of this article. I hope it will be helpful to your study, and I hope you can support programming tips.