本文整理汇总了Java中io.evercam.network.query.EvercamQuery.fillDefaults方法的典型用法代码示例。如果您正苦于以下问题:Java EvercamQuery.fillDefaults方法的具体用法?Java EvercamQuery.fillDefaults怎么用?Java EvercamQuery.fillDefaults使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类io.evercam.network.query.EvercamQuery
的用法示例。
在下文中一共展示了EvercamQuery.fillDefaults方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: doInBackground
import io.evercam.network.query.EvercamQuery; //导入方法依赖的package包/类
@Override
protected Drawable doInBackground(Void... params) {
discoveredCamera = EvercamQuery.fillDefaults(discoveredCamera);
String thumbnailUrl = discoveredCamera.getModelThumbnail();
Drawable drawable = null;
if (!thumbnailUrl.isEmpty()) {
try {
InputStream stream = Unirest.get(thumbnailUrl).asBinary().getRawBody();
drawable = Drawable.createFromStream(stream, "src");
} catch (UnirestException e) {
Log.e(TAG, e.getStackTrace()[0].toString());
}
}
return drawable;
}
示例2: run
import io.evercam.network.query.EvercamQuery; //导入方法依赖的package包/类
@Override
public void run() {
if (withDefaults) {
EvercamDiscover.printLogMessage("Retrieving defaults for camera "
+ discoveredCamera.getIP());
discoveredCamera = EvercamQuery.fillDefaults(discoveredCamera);
}
onFinished();
}
示例3: testFillCameraDefaults
import io.evercam.network.query.EvercamQuery; //导入方法依赖的package包/类
@Test
public void testFillCameraDefaults() {
DiscoveredCamera testCamera = new DiscoveredCamera("192.168.0.88");
testCamera.setVendor("dlink");
testCamera.setModel("DCS-2121");
EvercamQuery.fillDefaults(testCamera);
assertEquals("play1.sdp", testCamera.getH264());
assertEquals(
"http://evercam-public-assets.s3.amazonaws.com/dlink/dcs-2121/thumbnail.jpg",
testCamera.getModelThumbnail());
assertEquals(
"http://evercam-public-assets.s3.amazonaws.com/dlink/logo.jpg",
testCamera.getVendorThumbnail());
}