资源简介

AndroidThings摄像头可视门铃例程,基于树莓派的AndroidThings摄像头可视化门铃例程。

资源截图

代码片段和文件信息

/*
 * Copyright 2016 The Android Open Source Project
 *
 * Licensed under the Apache License Version 2.0 (the “License“);
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing software
 * distributed under the License is distributed on an “AS IS“ BASIS
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.example.androidthings.doorbell;

import android.os.Build;

@SuppressWarnings(“WeakerAccess“)
public class BoardDefaults {
    private static final String DEVICE_RPI3 = “rpi3“;
    private static final String DEVICE_IMX7D_PICO = “imx7d_pico“;

    /**
     * Return the GPIO pin that the Button is connected on.
     */
    public static String getGPIOForButton() {
        switch (Build.DEVICE) {
            case DEVICE_RPI3:
                return “BCM21“;
            case DEVICE_IMX7D_PICO:
                return “GPIO6_IO14“;
            default:
                throw new IllegalStateException(“Unknown Build.DEVICE “ + Build.DEVICE);
        }
    }
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2018-05-18 19:27  doorbell-master\
     文件          76  2018-05-18 19:27  doorbell-master\.gitignore
     目录           0  2018-05-18 19:27  doorbell-master\.google\
     文件         195  2018-05-18 19:27  doorbell-master\.google\packaging.yaml
     文件        1612  2018-05-18 19:27  doorbell-master\CONTRIBUTING.md
     文件       11361  2018-05-18 19:27  doorbell-master\LICENSE
     文件        4496  2018-05-18 19:27  doorbell-master\README.md
     目录           0  2018-05-18 19:27  doorbell-master\app\
     文件        1127  2018-05-18 19:27  doorbell-master\app\build.gradle
     目录           0  2018-05-18 19:27  doorbell-master\app\src\
     目录           0  2018-05-18 19:27  doorbell-master\app\src\main\
     文件        1975  2018-05-18 19:27  doorbell-master\app\src\main\AndroidManifest.xml
     目录           0  2018-05-18 19:27  doorbell-master\app\src\main\java\
     目录           0  2018-05-18 19:27  doorbell-master\app\src\main\java\com\
     目录           0  2018-05-18 19:27  doorbell-master\app\src\main\java\com\example\
     目录           0  2018-05-18 19:27  doorbell-master\app\src\main\java\com\example\androidthings\
     目录           0  2018-05-18 19:27  doorbell-master\app\src\main\java\com\example\androidthings\doorbell\
     文件        1290  2018-05-18 19:27  doorbell-master\app\src\main\java\com\example\androidthings\doorbell\BoardDefaults.java
     文件        4501  2018-05-18 19:27  doorbell-master\app\src\main\java\com\example\androidthings\doorbell\CloudVisionUtils.java
     文件        7967  2018-05-18 19:27  doorbell-master\app\src\main\java\com\example\androidthings\doorbell\DoorbellActivity.java
     文件        9431  2018-05-18 19:27  doorbell-master\app\src\main\java\com\example\androidthings\doorbell\DoorbellCamera.java
     目录           0  2018-05-18 19:27  doorbell-master\app\src\main\res\
     目录           0  2018-05-18 19:27  doorbell-master\app\src\main\res\values\
     文件          75  2018-05-18 19:27  doorbell-master\app\src\main\res\values\strings.xml
     文件         642  2018-05-18 19:27  doorbell-master\build.gradle
     目录           0  2018-05-18 19:27  doorbell-master\companionApp\
     文件           7  2018-05-18 19:27  doorbell-master\companionApp\.gitignore
     文件        1109  2018-05-18 19:27  doorbell-master\companionApp\build.gradle
     目录           0  2018-05-18 19:27  doorbell-master\companionApp\src\
     目录           0  2018-05-18 19:27  doorbell-master\companionApp\src\main\
     文件         709  2018-05-18 19:27  doorbell-master\companionApp\src\main\AndroidManifest.xml
............此处省略42个文件信息

评论

共有 条评论