Skip to content

Commit

Permalink
forget info for achartengine in 0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
tikismoke committed Nov 1, 2014
1 parent 3a7f2d2 commit a3d181d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
7 changes: 3 additions & 4 deletions src/rinor/Events_manager.java
Expand Up @@ -211,13 +211,12 @@ protected Void doInBackground(Void... params) {

while (true) {
String result = subscriber.recvStr(0);
Log.d(mytag, "result= "+result);
Log.d(mytag, "MQ information receive: "+result);
if (result.contains("stored_value")) {
Log.d(mytag, "result= "+result);
try {
JSONObject json_stats_04=new JSONObject(result);
Tracer.d(mytag, "Parsing result to jsonobject");
Tracer.d(mytag, json_stats_04.toString());
Tracer.d(mytag, "MQ Parsing result to jsonobject");
//Tracer.d(mytag, json_stats_04.toString());
String ticket="1";
String device_id=json_stats_04.get("sensor_id").toString();
String New_Value=json_stats_04.get("stored_value").toString();
Expand Down
6 changes: 5 additions & 1 deletion src/widgets/Graphical_Info_with_achartengine.java
Expand Up @@ -330,7 +330,11 @@ else if(state_key.equalsIgnoreCase("condition-code") == true)
*/
WidgetUpdate cache_engine = WidgetUpdate.getInstance();
if(cache_engine != null) {
session = new Entity_client(dev_id, state_key, mytag, handler, session_type);
if (api_version<=0.6f){
session = new Entity_client(dev_id, state_key, mytag, handler, session_type);
}else if (api_version==0.7f){
session = new Entity_client(id, "", mytag, handler, session_type);
}
if(Tracer.get_engine().subscribe(session)) {
realtime = true; //we're connected to engine
//each time our value change, the engine will call handler
Expand Down

0 comments on commit a3d181d

Please sign in to comment.