当前位置: 首页>>代码示例>>Java>>正文


Java UserDriverManager.getManager方法代码示例

本文整理汇总了Java中com.google.android.things.userdriver.UserDriverManager.getManager方法的典型用法代码示例。如果您正苦于以下问题:Java UserDriverManager.getManager方法的具体用法?Java UserDriverManager.getManager怎么用?Java UserDriverManager.getManager使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.google.android.things.userdriver.UserDriverManager的用法示例。


在下文中一共展示了UserDriverManager.getManager方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: register

import com.google.android.things.userdriver.UserDriverManager; //导入方法依赖的package包/类
/**
 * Register this driver with the Android input framework.
 */
public void register() {
    if (inputDriver == null) {
        UserDriverManager manager = UserDriverManager.getManager();
        inputDriver = new InputDriver.Builder(InputDevice.SOURCE_CLASS_BUTTON)
                .setName(DRIVER_NAME)
                .setVersion(DRIVER_VERSION)
                .setKeys(keycodes)
                .build();
        manager.registerInputDriver(inputDriver);
    }
}
 
开发者ID:Nilhcem,项目名称:mpr121-androidthings,代码行数:15,代码来源:Mpr121InputDriver.java

示例2: unregister

import com.google.android.things.userdriver.UserDriverManager; //导入方法依赖的package包/类
/**
 * Unregister this driver with the Android input framework.
 */
public void unregister() {
    if (inputDriver != null) {
        UserDriverManager manager = UserDriverManager.getManager();
        manager.unregisterInputDriver(inputDriver);
        inputDriver = null;
    }
}
 
开发者ID:Nilhcem,项目名称:mpr121-androidthings,代码行数:11,代码来源:Mpr121InputDriver.java

示例3: register

import com.google.android.things.userdriver.UserDriverManager; //导入方法依赖的package包/类
/**
 * Register this driver with the Android input framework.
 */
public void register() {
    if (mInputDriver == null) {
        UserDriverManager manager = UserDriverManager.getManager();
        mInputDriver = buildInputDriver();
        manager.registerInputDriver(mInputDriver);
    }
}
 
开发者ID:androidthings,项目名称:contrib-drivers,代码行数:11,代码来源:Cap12xxInputDriver.java

示例4: unregister

import com.google.android.things.userdriver.UserDriverManager; //导入方法依赖的package包/类
/**
 * Unregister this driver with the Android input framework.
 */
public void unregister() {
    if (mInputDriver != null) {
        UserDriverManager manager = UserDriverManager.getManager();
        manager.unregisterInputDriver(mInputDriver);
        mInputDriver = null;
    }
}
 
开发者ID:androidthings,项目名称:contrib-drivers,代码行数:11,代码来源:Cap12xxInputDriver.java

示例5: register

import com.google.android.things.userdriver.UserDriverManager; //导入方法依赖的package包/类
/**
 * Register this driver with the Android location framework.
 */
public void register() {
    if (mDriver == null) {
        UserDriverManager manager = UserDriverManager.getManager();
        mDriver = new GpsDriver();
        manager.registerGpsDriver(mDriver);
    }
}
 
开发者ID:androidthings,项目名称:contrib-drivers,代码行数:11,代码来源:NmeaGpsDriver.java

示例6: unregister

import com.google.android.things.userdriver.UserDriverManager; //导入方法依赖的package包/类
/**
 * Unregister this driver with the Android location framework.
 */
public void unregister() {
    if (mDriver != null) {
        UserDriverManager manager = UserDriverManager.getManager();
        manager.unregisterGpsDriver();
        mDriver = null;
    }
}
 
开发者ID:androidthings,项目名称:contrib-drivers,代码行数:11,代码来源:NmeaGpsDriver.java

示例7: register

import com.google.android.things.userdriver.UserDriverManager; //导入方法依赖的package包/类
/**
 * Register this driver with the Android lowpan framework.
 */
@SuppressWarnings("unused")
public void register() {
    final UserDriverManager manager = UserDriverManager.getManager();
    manager.registerLowpanDriver(this);
}
 
开发者ID:androidthings,项目名称:contrib-drivers,代码行数:9,代码来源:UartLowpanDriver.java

示例8: unregister

import com.google.android.things.userdriver.UserDriverManager; //导入方法依赖的package包/类
/**
 * Unregister this driver with the Android lowpan framework.
 */
public void unregister() {
    final UserDriverManager manager = UserDriverManager.getManager();
    manager.unregisterLowpanDriver(this);
}
 
开发者ID:androidthings,项目名称:contrib-drivers,代码行数:8,代码来源:UartLowpanDriver.java


注:本文中的com.google.android.things.userdriver.UserDriverManager.getManager方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。