美文网首页Android
Android Camera 简介 (2)

Android Camera 简介 (2)

作者: 假装在去天使之城的路上 | 来源:发表于2018-06-14 16:33 被阅读5次

    自己动手,丰衣食足。
    需要:

    Manifest declarations

    Before starting development on your application with the Camera API, you should make sure your manifest has the appropriate declarations to allow use of camera hardware and other related features.

    By adding camera features to your manifest causes Google Play to prevent your application from being installed to devices that do not include a camera or do not support the camera features you specify.

    Camera Permission

    Your application must request permission to use a device camera.

    <uses-permission android:name="android.permission.CAMERA" />
    
    Note: If you are using the camera by invoking an existing camera app, your application does not need to request this permission.
    

    Camera Features

    <uses-feature android:name="android.hardware.camera" />
    
    

    For a list of camera features, see the manifest Features Reference.

    Storage Permission

    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    
    If your application saves images or videos to the device's external storage (SD Card), you must also specify this in the manifest.
    

    Audio Recording Permission

    <uses-permission android:name="android.permission.RECORD_AUDIO" />
    
    For recording audio with video capture, your application must request the audio capture permission.
    

    Location Permission

    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    
    <!-- Needed only if your app targets Android 5.0 (API level 21) or higher. -->
    <uses-feature android:name="android.hardware.location.gps" />
    

    相关文章

      网友评论

        本文标题:Android Camera 简介 (2)

        本文链接:https://www.haomeiwen.com/subject/psbyeftx.html