资源简介

IBM的MQTT给了一个PHP的服务端代码,在网上找了一个JAVA实现服务端代码的例子,调通了。如果想做这个例子需要自己用电脑建一个wifi,手机连上这个wifi,代码中要改几个个地方 1 android服务里有几个MQTT_HOST是ip地址改成自己wifi的ip; 2 服务端的publish方法是用来发送的,第一个参数是客户端id clientId,要改成自己在手机客户端设定的名字,前面还有个域,比如mqttClient.publish("tokudu/"+clientId, message.getBytes(), 0, false); 我的clientId是sly。其他的大家就自己研究吧

资源截图

代码片段和文件信息

/** Automatically generated file. DO NOT MODIFY */
package com.tokudu.demo;

public final class BuildConfig {
    public final static boolean DEBUG = true;
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件        554  2014-04-04 14:22  商品手机推送\AndroidPushNotificationsDemo\.classpath

     文件         12  2013-02-21 11:47  商品手机推送\AndroidPushNotificationsDemo\.gitignore

     文件        831  2013-02-21 11:47  商品手机推送\AndroidPushNotificationsDemo\.project

     文件        177  2013-02-21 11:47  商品手机推送\AndroidPushNotificationsDemo\.settings\org.eclipse.jdt.core.prefs

     文件        722  2012-08-22 13:57  商品手机推送\AndroidPushNotificationsDemo\16x16_loading.gif

     文件       1329  2013-02-26 15:03  商品手机推送\AndroidPushNotificationsDemo\AndroidManifest.xml

     文件       1329  2014-04-01 14:28  商品手机推送\AndroidPushNotificationsDemo\bin\AndroidManifest.xml

     文件        339  2014-04-18 09:53  商品手机推送\AndroidPushNotificationsDemo\bin\classes\com\tokudu\demo\BuildConfig.class

     文件       2424  2014-04-18 09:53  商品手机推送\AndroidPushNotificationsDemo\bin\classes\com\tokudu\demo\ConnectionLog.class

     文件       1724  2014-04-18 09:53  商品手机推送\AndroidPushNotificationsDemo\bin\classes\com\tokudu\demo\ConnectServerTask$1.class

     文件        285  2014-04-18 09:53  商品手机推送\AndroidPushNotificationsDemo\bin\classes\com\tokudu\demo\ConnectServerTask$ConnectionCallBack.class

     文件       5809  2014-04-18 09:53  商品手机推送\AndroidPushNotificationsDemo\bin\classes\com\tokudu\demo\ConnectServerTask$MQTTConnection.class

     文件      10377  2014-04-18 09:53  商品手机推送\AndroidPushNotificationsDemo\bin\classes\com\tokudu\demo\ConnectServerTask.class

     文件       1782  2014-04-18 09:53  商品手机推送\AndroidPushNotificationsDemo\bin\classes\com\tokudu\demo\PushActivity$1.class

     文件       1153  2014-04-18 09:53  商品手机推送\AndroidPushNotificationsDemo\bin\classes\com\tokudu\demo\PushActivity$2.class

     文件       3024  2014-04-18 09:53  商品手机推送\AndroidPushNotificationsDemo\bin\classes\com\tokudu\demo\PushActivity.class

     文件       1786  2014-04-18 09:53  商品手机推送\AndroidPushNotificationsDemo\bin\classes\com\tokudu\demo\PushService$1.class

     文件       5826  2014-04-18 09:53  商品手机推送\AndroidPushNotificationsDemo\bin\classes\com\tokudu\demo\PushService$MQTTConnection.class

     文件      13197  2014-04-18 09:53  商品手机推送\AndroidPushNotificationsDemo\bin\classes\com\tokudu\demo\PushService.class

     文件       1798  2014-04-18 09:53  商品手机推送\AndroidPushNotificationsDemo\bin\classes\com\tokudu\demo\PushService2$1.class

     文件       1255  2014-04-18 09:53  商品手机推送\AndroidPushNotificationsDemo\bin\classes\com\tokudu\demo\PushService2$ConnectionTask.class

     文件       4933  2014-04-18 09:53  商品手机推送\AndroidPushNotificationsDemo\bin\classes\com\tokudu\demo\PushService2$MQTTConnection.class

     文件      12376  2014-04-18 09:53  商品手机推送\AndroidPushNotificationsDemo\bin\classes\com\tokudu\demo\PushService2.class

     文件        331  2014-04-18 09:53  商品手机推送\AndroidPushNotificationsDemo\bin\classes\com\tokudu\demo\R$attr.class

     文件        457  2014-04-18 09:53  商品手机推送\AndroidPushNotificationsDemo\bin\classes\com\tokudu\demo\R$color.class

     文件        718  2014-04-18 09:53  商品手机推送\AndroidPushNotificationsDemo\bin\classes\com\tokudu\demo\R$drawable.class

     文件       1351  2014-04-18 09:53  商品手机推送\AndroidPushNotificationsDemo\bin\classes\com\tokudu\demo\R$id.class

     文件        445  2014-04-18 09:53  商品手机推送\AndroidPushNotificationsDemo\bin\classes\com\tokudu\demo\R$layout.class

     文件       1420  2014-04-18 09:53  商品手机推送\AndroidPushNotificationsDemo\bin\classes\com\tokudu\demo\R$string.class

     文件        555  2014-04-18 09:53  商品手机推送\AndroidPushNotificationsDemo\bin\classes\com\tokudu\demo\R.class

............此处省略279个文件信息

评论

共有 条评论