• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java IChimpDevice类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.android.chimpchat.core.IChimpDevice的典型用法代码示例。如果您正苦于以下问题:Java IChimpDevice类的具体用法?Java IChimpDevice怎么用?Java IChimpDevice使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



IChimpDevice类属于com.android.chimpchat.core包,在下文中一共展示了IChimpDevice类的18个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: waitForConnection

import com.android.chimpchat.core.IChimpDevice; //导入依赖的package包/类
@Override
public IChimpDevice waitForConnection(long timeoutMs, String deviceIdRegex) {
    do {
        IDevice device = findAttachedDevice(deviceIdRegex);
        // Only return the device when it is online
        if (device != null && device.getState() == IDevice.DeviceState.ONLINE) {
            IChimpDevice chimpDevice = new AdbChimpDevice(device);
            devices.add(chimpDevice);
            return chimpDevice;
        }

        try {
            Thread.sleep(CONNECTION_ITERATION_TIMEOUT_MS);
        } catch (InterruptedException e) {
            LOG.log(Level.SEVERE, "Error sleeping", e);
        }
        timeoutMs -= CONNECTION_ITERATION_TIMEOUT_MS;
    } while (timeoutMs > 0);

    // Timeout.  Give up.
    return null;
}
 
开发者ID:utds3lab,项目名称:SMVHunter,代码行数:23,代码来源:AdbBackend.java


示例2: shutdown

import com.android.chimpchat.core.IChimpDevice; //导入依赖的package包/类
@Override
public void shutdown() {
    for (IChimpDevice device : devices) {
        device.dispose();
    }
    AndroidDebugBridge.terminate();
}
 
开发者ID:utds3lab,项目名称:SMVHunter,代码行数:8,代码来源:AdbBackend.java


示例3: main

import com.android.chimpchat.core.IChimpDevice; //导入依赖的package包/类
public static void main(String[] args) throws IOException {
    IChimpBackend backend = new AdbBackend();
    IChimpDevice device = backend.waitForConnection();
    IChimpImage snapshot = (IChimpImage) device.takeSnapshot();

    // write out to a file
    snapshot.writeToFile("output.png", "png");
    writeOutImage(((AdbChimpImage)snapshot).getRawImage(), "output.raw");
    System.exit(0);
}
 
开发者ID:utds3lab,项目名称:SMVHunter,代码行数:11,代码来源:CaptureRawAndConvertedImage.java


示例4: WookieeAPI

import com.android.chimpchat.core.IChimpDevice; //导入依赖的package包/类
public WookieeAPI(IChimpDevice impl) {
    this.impl = impl;
    this.matcher = new PyramidTemplateMatcher();
    /*
     * Math.min( Integer.parseInt(getProperty("display.width")),
     * Integer.parseInt(getProperty("display.height")) );
     */
}
 
开发者ID:liuyq,项目名称:aster,代码行数:9,代码来源:WookieeAPI.java


示例5: init

import com.android.chimpchat.core.IChimpDevice; //导入依赖的package包/类
/**
 * Initialize the main DeviceManager instance. #init() can only be called
 * once, otherwise an IllegalStateException is thrown.
 * 
 * @param eventBus
 */
public static void init(EventBus eventBus) {
	if (_isInit) {
		throw new IllegalStateException("DeviceManager already inited!");
	}
	INSTANCE = new DeviceManager(eventBus);

	LOG.debug("DeviceManager INIT");
	INSTANCE._deviceThreadPool = new DeviceThreadPool();
	INSTANCE._devices = new ConcurrentHashMap<String, DeviceState>();
	INSTANCE._chimpDevices = new ConcurrentHashMap<String, IChimpDevice>();
	INSTANCE._focusedDevice = null;

	// This mess makes a single threaded executor capable of executing
	// INSTANCE._workerExecutor =
	// MoreExecutors.listeningDecorator(Executors
	// .newSingleThreadExecutor(new ThreadFactoryBuilder()
	// .setNameFormat("DeviceManager-Worker-%d").build()));

	INSTANCE._workerExecutor = Executors
			.newSingleThreadExecutor(new ThreadFactoryBuilder()
					.setNameFormat("DeviceManager").build());
	// INSTANCE._workerExecutor = Executors
	// .newCachedThreadPool(new ThreadFactoryBuilder()
	// .setNameFormat("DeviceManager-worker-%d").build());
	INSTANCE._state = DeviceManagerState.STOPPED;
	_isInit = true;
}
 
开发者ID:oliver32767,项目名称:MonkeyBoard,代码行数:34,代码来源:DeviceManager.java


示例6: getDevices

import com.android.chimpchat.core.IChimpDevice; //导入依赖的package包/类
public List<IChimpDevice> getDevices(){
	return devices;
}
 
开发者ID:utds3lab,项目名称:SMVHunter,代码行数:4,代码来源:AdbBackend.java


示例7: execute

import com.android.chimpchat.core.IChimpDevice; //导入依赖的package包/类
@Override
public void execute(IChimpDevice device) {
	device.press(key, TouchPressType.fromIdentifier(downUpFlag));
}
 
开发者ID:Gogolook-Inc,项目名称:GogoMonkeyRun,代码行数:5,代码来源:AdvancePressAction.java


示例8: execute

import com.android.chimpchat.core.IChimpDevice; //导入依赖的package包/类
@Override
public void execute(IChimpDevice arg0) throws Exception {
}
 
开发者ID:Gogolook-Inc,项目名称:GogoMonkeyRun,代码行数:4,代码来源:SnapshotAction.java


示例9: MonkeyRecorderFrameExt

import com.android.chimpchat.core.IChimpDevice; //导入依赖的package包/类
/**
 * This is the default constructor
 */
public MonkeyRecorderFrameExt(IChimpDevice device, String defaultExportDir) {
	this.device = device;
	this.defaultExportDir = defaultExportDir;
	initialize();
}
 
开发者ID:Gogolook-Inc,项目名称:GogoMonkeyRun,代码行数:9,代码来源:MonkeyRecorderFrameExt.java


示例10: WookieeDevice

import com.android.chimpchat.core.IChimpDevice; //导入依赖的package包/类
public WookieeDevice(IChimpDevice impl) {
    this.impl = impl;
    this.matcher = new PyramidTemplateMatcher();
    this.wookiee = new WookieeAPI(impl);
}
 
开发者ID:liuyq,项目名称:aster,代码行数:6,代码来源:WookieeDevice.java


示例11: getImpl

import com.android.chimpchat.core.IChimpDevice; //导入依赖的package包/类
public IChimpDevice getImpl() {
    return impl;
}
 
开发者ID:liuyq,项目名称:aster,代码行数:4,代码来源:WookieeDevice.java


示例12: getLastChimpDevice

import com.android.chimpchat.core.IChimpDevice; //导入依赖的package包/类
static public IChimpDevice getLastChimpDevice() {
    return device;
}
 
开发者ID:liuyq,项目名称:aster,代码行数:4,代码来源:WookieeRunner.java


示例13: MonkeyDeviceWrapper

import com.android.chimpchat.core.IChimpDevice; //导入依赖的package包/类
public MonkeyDeviceWrapper(IChimpDevice impl) {
    this.impl = impl;
    this.wookiee = new WookieeAPI(impl);
}
 
开发者ID:liuyq,项目名称:aster,代码行数:5,代码来源:MonkeyDeviceWrapper.java


示例14: DeviceController

import com.android.chimpchat.core.IChimpDevice; //导入依赖的package包/类
protected DeviceController(IDevice device, IChimpDevice chimpDevice) {
	_device = device;
	_chimpDevice = chimpDevice;
}
 
开发者ID:oliver32767,项目名称:MonkeyBoard,代码行数:5,代码来源:DeviceController.java


示例15: waitForConnection

import com.android.chimpchat.core.IChimpDevice; //导入依赖的package包/类
/**
 * Retrieves an instance of the device from the backend
 * @param timeoutMs length of time to wait before timing out
 * @param deviceId the id of the device you want to connect to
 * @return an instance of the device
 */
public IChimpDevice waitForConnection(long timeoutMs, String deviceId){
    return mBackend.waitForConnection(timeoutMs, deviceId);
}
 
开发者ID:utds3lab,项目名称:SMVHunter,代码行数:10,代码来源:ChimpChat.java


示例16: getChimpDevice

import com.android.chimpchat.core.IChimpDevice; //导入依赖的package包/类
/**
 * If you want to talk to monkey directly, use this one.
 * @return
 */
public IChimpDevice getChimpDevice();
 
开发者ID:lrscp,项目名称:ControlAndroidDeviceFromPC,代码行数:6,代码来源:IDevice.java


示例17: waitForConnection

import com.android.chimpchat.core.IChimpDevice; //导入依赖的package包/类
/**
 * Wait for a default device to connect to the backend.
 *
 * @return the connected device (or null if timeout);
 */
IChimpDevice waitForConnection();
 
开发者ID:liuyq,项目名称:aster,代码行数:7,代码来源:IChimpBackend.java


示例18: getIChimpDevice

import com.android.chimpchat.core.IChimpDevice; //导入依赖的package包/类
/**
 * Return the managed IChimpDevice instance.
 * @return IDevice instance.
 */
public IChimpDevice getIChimpDevice() {
	return chimpDevice;
}
 
开发者ID:eBay,项目名称:mtdtool,代码行数:8,代码来源:TestDevice.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java Maven类代码示例发布时间:2022-05-23
下一篇:
Java OopTreeNodeAdapter类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap