1.1 Use a built-in camera application to capture images

Source: Internet
Author: User

As mobile phones rapidly become mobile computers, they have replaced various consumer electronic products in many ways. Camera is one of the first hardware features that were added to a mobile phone and irrelevant to the phone. Now, it's hard to imagine buying a mobile phone with no camera function. Of course, Android-based phones are no exception. From the very beginning, Android SDK supports accessing the phone's built-in hardware camera to capture images.

On Android, the most convenient way to accomplish many things is to use intent to take advantage of every existing software on the device. The intent is the core component of Android, in this document, it is interpreted as "description of the operation to be executed ". In practice, the intent is used to trigger another application to accomplish something, or to switch between activities of a single application.

All Android devices with the right hardware (CAMERA) are attached with the camera application. The camera application contains an intent filter that allows developers to provide the same image capture capabilities as the camera application without building their own custom Capture routines.

Intent filters are a method used by programmers to specify that their applications provide a specific function. Specifying an intent filter in the andrioidmanifest. xml file of the application tells android that the application (especially the activity that contains the intent filter) will execute the specified task according to the instruction.

The camera application specifies the intent filter in its listing file. The intent filter shown here is included in the "camera" activity tag.




Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.