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

Java GizWifiDevice类代码示例

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

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



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

示例1: discoveredrCb

import com.gizwits.gizwifisdk.api.GizWifiDevice; //导入依赖的package包/类
@Override
public void discoveredrCb(GizWifiErrorCode result,
		java.util.List<GizWifiDevice> deviceList) {
	Logger.d(TAG,
			"discoveredrCb -> deviceList size:" + deviceList.size()
					+ "  result:" + result);
	switch (result) {
	case GIZ_SDK_SUCCESS:
		Logger.e(TAG, "load device  sucess");
		update(deviceList);
		break;
	default:
		break;

	}

}
 
开发者ID:yaokantv,项目名称:YKCenterDemo-Android,代码行数:18,代码来源:DeviceListActivity.java


示例2: update

import com.gizwits.gizwifisdk.api.GizWifiDevice; //导入依赖的package包/类
void update(List<GizWifiDevice> gizWifiDevices) {
	if (gizWifiDevices == null) {
		deviceNames.clear();
	} else if (gizWifiDevices != null && gizWifiDevices.size() >= 1) {
		wifiDevices.clear();
		wifiDevices.addAll(gizWifiDevices);
		deviceNames.clear();
		for (int i = 0; i < wifiDevices.size(); i++) {
			deviceNames.add(wifiDevices.get(i).getProductName() + "("
					+ wifiDevices.get(i).getMacAddress() + ") "
					+ getBindInfo(wifiDevices.get(i).isBind()) + "\n"
					+ getLANInfo(wifiDevices.get(i).isLAN())+"  "+getOnlineInfo(wifiDevices.get(i).getNetStatus()));

		}
	}

	adapter.notifyDataSetChanged();
}
 
开发者ID:yaokantv,项目名称:YKCenterDemo-Android,代码行数:19,代码来源:DeviceListActivity.java


示例3: discoveredrCb

import com.gizwits.gizwifisdk.api.GizWifiDevice; //导入依赖的package包/类
@Override
public void discoveredrCb(GizWifiErrorCode result,
                          List<GizWifiDevice> deviceList) {
    Logger.d(TAG,
            "discoveredrCb -> deviceList size:" + deviceList.size()
                    + "  result:" + result);
    switch (result) {
        case GIZ_SDK_SUCCESS:
            Logger.e(TAG, "load device  sucess");
            update(deviceList);
            break;
        default:
            break;

    }

}
 
开发者ID:yaokantv,项目名称:YKCenterSDKExample_for_AS,代码行数:18,代码来源:DeviceListActivity.java


示例4: update

import com.gizwits.gizwifisdk.api.GizWifiDevice; //导入依赖的package包/类
void update(List<GizWifiDevice> gizWifiDevices) {
    if (gizWifiDevices != null) {
        Log.e("DeviceListActivity", gizWifiDevices.size() + "");
    }
    if (gizWifiDevices == null) {
        deviceNames.clear();
    } else if (gizWifiDevices != null && gizWifiDevices.size() >= 1) {
        wifiDevices.clear();
        wifiDevices.addAll(gizWifiDevices);
        deviceNames.clear();
        for (int i = 0; i < wifiDevices.size(); i++) {
            deviceNames.add(wifiDevices.get(i).getProductName() + "("
                    + wifiDevices.get(i).getMacAddress() + ") "
                    + getBindInfo(wifiDevices.get(i).isBind()) + "\n"
                    + getLANInfo(wifiDevices.get(i).isLAN()) + "  " + getOnlineInfo(wifiDevices.get(i).getNetStatus()));

        }
    }

    adapter.notifyDataSetChanged();
}
 
开发者ID:yaokantv,项目名称:YKCenterSDKExample_for_AS,代码行数:22,代码来源:DeviceListActivity.java


示例5: onCreate

import com.gizwits.gizwifisdk.api.GizWifiDevice; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.act_codeapi);
    // 遥控云数据接口分装对象对象
    ykanInterface = new YkanIRInterfaceImpl(getApplicationContext());
    // 遥控云数据接口分装对象对象
    ykanInterface = new YkanIRInterfaceImpl(getApplicationContext());
    initView();
    initDevice();
    List<GizWifiDevice> gizWifiDevices = DeviceManager
            .instanceDeviceManager(getApplicationContext()).getCanUseGizWifiDevice();
    if (gizWifiDevices != null) {
        Log.e("YKCodeAPIActivity", gizWifiDevices.size() + "");
    }
}
 
开发者ID:yaokantv,项目名称:YKCenterSDKExample_for_AS,代码行数:17,代码来源:YKCodeAPIActivity.java


示例6: didSetSubscribe

import com.gizwits.gizwifisdk.api.GizWifiDevice; //导入依赖的package包/类
@Override
protected void didSetSubscribe(GizWifiErrorCode result, GizWifiDevice device, boolean isSubscribed) {
	// TODO 控制页面跳转
	progressDialog.cancel();
	Message msg = new Message();
	if (GizWifiErrorCode.GIZ_SDK_SUCCESS == result) {
		msg.what = TOCONTROL;
		msg.obj = device;
	} else {
		if (device.isBind()) {
			msg.what = TOAST;
			// String setSubscribeFail = (String)
			// getText(R.string.setsubscribe_failed);
			msg.obj = toastError(result);// setSubscribeFail + "\n" + arg0;
		}
	}
	handler.sendMessage(msg);
}
 
开发者ID:gizwits,项目名称:GOpenSource_AppKit_Android_AS,代码行数:19,代码来源:GosDeviceListActivity.java


示例7: initDevice

import com.gizwits.gizwifisdk.api.GizWifiDevice; //导入依赖的package包/类
private void initDevice() {
	Intent intent = getIntent();
	device = (GizWifiDevice) intent.getParcelableExtra("GizWifiDevice");
	driverControl = new DeviceController(getApplicationContext(),device,this);
	//获取设备硬件相关信息
	driverControl.getDevice().getHardwareInfo();
	//修改设备显示名称
	driverControl.getDevice().setCustomInfo("alias", "遥控中心产品"); 
	RemoteControl remoteControl = jsonParser.parseObjecta(intent.getStringExtra("remoteControl"), RemoteControl.class);
	if (!Utility.isEmpty(remoteControl)) {
		airVerSion =remoteControl.getVersion();
		codeDatas=remoteControl.getRcCommand();
		airEvent=getAirEvent(codeDatas);
	}	
}
 
开发者ID:yaokantv,项目名称:YKCenterDemo-Android,代码行数:16,代码来源:AirControlActivity.java


示例8: didGetHardwareInfo

import com.gizwits.gizwifisdk.api.GizWifiDevice; //导入依赖的package包/类
@Override
public void didGetHardwareInfo(GizWifiErrorCode result,GizWifiDevice device, ConcurrentHashMap<String, String> hardwareInfo) {
	Logger.d(TAG, "获取设备信息 :");
	if (GizWifiErrorCode.GIZ_SDK_SUCCESS == result) {
		Logger.d(TAG, "获取设备信息 : hardwareInfo :" + hardwareInfo);
	} else {
	}
}
 
开发者ID:yaokantv,项目名称:YKCenterDemo-Android,代码行数:9,代码来源:AirControlActivity.java


示例9: didSetCustomInfo

import com.gizwits.gizwifisdk.api.GizWifiDevice; //导入依赖的package包/类
@Override
public void didSetCustomInfo(GizWifiErrorCode result, GizWifiDevice device) {
	Logger.d(TAG, "自定义设备信息回调");
	if (GizWifiErrorCode.GIZ_SDK_SUCCESS == result) {
		Logger.d(TAG, "自定义设备信息成功");
	}
}
 
开发者ID:yaokantv,项目名称:YKCenterDemo-Android,代码行数:8,代码来源:AirControlActivity.java


示例10: didUpdateNetStatus

import com.gizwits.gizwifisdk.api.GizWifiDevice; //导入依赖的package包/类
@Override
public void didUpdateNetStatus(GizWifiDevice device,GizWifiDeviceNetStatus netStatus) {
	switch (device.getNetStatus()) {
	case GizDeviceOffline:
		Logger.d(TAG, "设备下线");
		break;
	case GizDeviceOnline:
		Logger.d(TAG, "设备上线");
		break;
	default:
		break;
	}
}
 
开发者ID:yaokantv,项目名称:YKCenterDemo-Android,代码行数:14,代码来源:AirControlActivity.java


示例11: getView

import com.gizwits.gizwifisdk.api.GizWifiDevice; //导入依赖的package包/类
@Override
public View getView(int position, View convertView, ViewGroup parent) {
	ViewHolder holder;
	if (convertView == null) {
		convertView = LayoutInflater.from(getApplicationContext())
				.inflate(R.layout.lv_item, parent, false);
		holder = new ViewHolder();
		holder.name = (TextView) convertView.findViewById(R.id.tv_item);
		holder.btn = (Button) convertView.findViewById(R.id.btn_item);
		convertView.setTag(holder);
	} else {
		holder = (ViewHolder) convertView.getTag();
	}

	holder.name.setText(deviceNames.get(position));

	final int pos = position;
	holder.btn.setOnClickListener(new OnClickListener() {

		@Override
		public void onClick(View v) {

			GizWifiDevice mGizWifiDevice = wifiDevices.get(pos);
			// 已经绑定的设备才去解绑
			if (mGizWifiDevice.isBind()) {
				// 解绑该设备
				mDeviceManager.unbindDevice(mGizWifiDevice.getDid());
				update(mDeviceManager.getCanUseGizWifiDevice());
			} else {
				toast("该设备未绑定");
			}

		}
	});
	return convertView;
}
 
开发者ID:yaokantv,项目名称:YKCenterDemo-Android,代码行数:37,代码来源:DeviceListActivity.java


示例12: initDevice

import com.gizwits.gizwifisdk.api.GizWifiDevice; //导入依赖的package包/类
private void initDevice() {
	Intent intent = getIntent();
	device = (GizWifiDevice) intent.getParcelableExtra("GizWifiDevice");
	rcCommand = intent.getStringExtra("rcCommand");
}
 
开发者ID:yaokantv,项目名称:YKCenterDemo-Android,代码行数:6,代码来源:YKWifiDeviceControlActivity.java


示例13: initDevice

import com.gizwits.gizwifisdk.api.GizWifiDevice; //导入依赖的package包/类
private void initDevice() {
    currGizWifiDevice = (GizWifiDevice) getIntent().getParcelableExtra(
            "GizWifiDevice");
    if (currGizWifiDevice != null) {
        deviceId = currGizWifiDevice.getDid();
        tvDevice.setText(currGizWifiDevice.getProductName() + "("
                + currGizWifiDevice.getMacAddress() + ") ");
        // 在下载数据之前需要设置设备ID,用哪个设备去下载
        YkanSDKManager.getInstance().setDeviceId(deviceId);
        if (currGizWifiDevice.isSubscribed() == false) {
            currGizWifiDevice.setSubscribe(true);
        }
    }
}
 
开发者ID:yaokantv,项目名称:YKCenterDemo-Android,代码行数:15,代码来源:YKCodeAPIActivity.java


示例14: onCreate

import com.gizwits.gizwifisdk.api.GizWifiDevice; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_scheduler_list);
    listView = (ListView) findViewById(R.id.list_view);
    schedulerAdapter = new SchedulerAdapter();
    listView.setAdapter(schedulerAdapter);
    currGizWifiDevice = (GizWifiDevice) getIntent().getParcelableExtra(
            "GizWifiDevice");
    // 设置定时任务监听
    GizDeviceSchedulerCenter.setListener(mListener);
    // 同步更新设备的定时任务列表,mDevice为在设备列表中得到的设备对象
    GizDeviceSchedulerCenter.updateSchedulers(Constant.UID, Constant.TOKEN, currGizWifiDevice);
}
 
开发者ID:yaokantv,项目名称:YKCenterSDKExample_for_AS,代码行数:15,代码来源:SchedulerListActivity.java


示例15: didUpdateSchedulers

import com.gizwits.gizwifisdk.api.GizWifiDevice; //导入依赖的package包/类
@Override
public void didUpdateSchedulers(GizWifiErrorCode result, GizWifiDevice schedulerOwner, List<GizDeviceScheduler> schedulerList) {
    if (result == GizWifiErrorCode.GIZ_SDK_SUCCESS) {
        if (schedulerList != null) {
            list.clear();
            list.addAll(schedulerList);
            schedulerAdapter.notifyDataSetChanged();
            Log.e(TAG, schedulerList.toString());
        }
    } else {
    }
}
 
开发者ID:yaokantv,项目名称:YKCenterSDKExample_for_AS,代码行数:13,代码来源:SchedulerListActivity.java


示例16: initDevice

import com.gizwits.gizwifisdk.api.GizWifiDevice; //导入依赖的package包/类
private void initDevice() {
    Intent intent = getIntent();
    device = (GizWifiDevice) intent.getParcelableExtra("GizWifiDevice");
    driverControl = new DeviceController(getApplicationContext(), device, this);
    //获取设备硬件相关信息
    driverControl.getDevice().getHardwareInfo();
    //修改设备显示名称
    driverControl.getDevice().setCustomInfo("alias", "遥控中心产品");
    remoteControl = jsonParser.parseObjecta(intent.getStringExtra("remoteControl"), RemoteControl.class);
    if (!Utility.isEmpty(remoteControl)) {
        airVerSion = remoteControl.getVersion();
        codeDatas = remoteControl.getRcCommand();
        airEvent = getAirEvent(codeDatas);
    }
}
 
开发者ID:yaokantv,项目名称:YKCenterSDKExample_for_AS,代码行数:16,代码来源:AirControlActivity.java


示例17: didGetHardwareInfo

import com.gizwits.gizwifisdk.api.GizWifiDevice; //导入依赖的package包/类
@Override
public void didGetHardwareInfo(GizWifiErrorCode result, GizWifiDevice device, ConcurrentHashMap<String, String> hardwareInfo) {
    Logger.d(TAG, "获取设备信息 :");
    if (GizWifiErrorCode.GIZ_SDK_SUCCESS == result) {
        Logger.d(TAG, "获取设备信息 : hardwareInfo :" + hardwareInfo);
    } else {
    }
}
 
开发者ID:yaokantv,项目名称:YKCenterSDKExample_for_AS,代码行数:9,代码来源:AirControlActivity.java


示例18: didSetCustomInfo

import com.gizwits.gizwifisdk.api.GizWifiDevice; //导入依赖的package包/类
@Override
public void didSetCustomInfo(GizWifiErrorCode result, GizWifiDevice device) {
    Logger.d(TAG, "自定义设备信息回调");
    if (GizWifiErrorCode.GIZ_SDK_SUCCESS == result) {
        Logger.d(TAG, "自定义设备信息成功");
    }
}
 
开发者ID:yaokantv,项目名称:YKCenterSDKExample_for_AS,代码行数:8,代码来源:AirControlActivity.java


示例19: didUpdateNetStatus

import com.gizwits.gizwifisdk.api.GizWifiDevice; //导入依赖的package包/类
@Override
public void didUpdateNetStatus(GizWifiDevice device, GizWifiDeviceNetStatus netStatus) {
    switch (device.getNetStatus()) {
        case GizDeviceOffline:
            Logger.d(TAG, "设备下线");
            break;
        case GizDeviceOnline:
            Logger.d(TAG, "设备上线");
            break;
        default:
            break;
    }
}
 
开发者ID:yaokantv,项目名称:YKCenterSDKExample_for_AS,代码行数:14,代码来源:AirControlActivity.java


示例20: getView

import com.gizwits.gizwifisdk.api.GizWifiDevice; //导入依赖的package包/类
@Override
public View getView(int position, View convertView, ViewGroup parent) {
    ViewHolder holder;
    if (convertView == null) {
        convertView = LayoutInflater.from(getApplicationContext())
                .inflate(R.layout.lv_item, parent, false);
        holder = new ViewHolder();
        holder.name = (TextView) convertView.findViewById(R.id.tv_item);
        holder.btn = (Button) convertView.findViewById(R.id.btn_item);
        convertView.setTag(holder);
    } else {
        holder = (ViewHolder) convertView.getTag();
    }

    holder.name.setText(deviceNames.get(position));

    final int pos = position;
    holder.btn.setOnClickListener(new OnClickListener() {

        @Override
        public void onClick(View v) {

            GizWifiDevice mGizWifiDevice = wifiDevices.get(pos);
            // 已经绑定的设备才去解绑
            if (mGizWifiDevice.isBind()) {
                // 解绑该设备
                mDeviceManager.unbindDevice(mGizWifiDevice.getDid());
                update(mDeviceManager.getCanUseGizWifiDevice());
            } else {
                toast("该设备未绑定");
            }

        }
    });
    return convertView;
}
 
开发者ID:yaokantv,项目名称:YKCenterSDKExample_for_AS,代码行数:37,代码来源:DeviceListActivity.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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