problem with session ping solved

parent 30176d00
...@@ -13,22 +13,19 @@ import com.yottacode.pictogram.net.websockets.Room; ...@@ -13,22 +13,19 @@ import com.yottacode.pictogram.net.websockets.Room;
*/ */
public class SubscribeAction extends Action { public class SubscribeAction extends Action {
//Picto Action types //Picto Action types
public static final String SUBSCRIBE="subscribe"; public static final String SUBSCRIBE="subscribe";
public static final String ACTION="/stu/subscribe"; public static final String ACTION="/stu/subscribe";
@Override
@Override public boolean is_local_action() {
public boolean is_local_action() {
return false; return false;
} }
public SubscribeAction( ){ public SubscribeAction( ){
super(SUBSCRIBE); super(SUBSCRIBE);
} }
public String get_action() {return ACTION;} public String get_action() {return ACTION;}
} }
...@@ -184,9 +184,11 @@ public class NetService implements Runnable, RestapiWrapper.iSilentLogin { ...@@ -184,9 +184,11 @@ public class NetService implements Runnable, RestapiWrapper.iSilentLogin {
//cada restfullSynchroTimming aprox. se fuerza sincronización de vocabulario y configuración de usuario //cada restfullSynchroTimming aprox. se fuerza sincronización de vocabulario y configuración de usuario
long now = new Date().getTime(); long now = new Date().getTime();
if (PCBcontext.is_user_logged()) { if (PCBcontext.is_user_logged()) {
if (restfullSynchroTimming > 0 && (now>= nextRestfullSynchro)) { if (restfullSynchroTimming > 0 && (now >= nextRestfullSynchro)) {
Log.i(LOG_TAG, "Vocabulary request."); Log.i(LOG_TAG, "Vocabulary request.");
PCBcontext.getRoom().connect(); if(!PCBcontext.getRoom().inRoom()){
PCBcontext.getRoom().connect();
}
PCBcontext.getVocabulary().synchronize(); PCBcontext.getVocabulary().synchronize();
synchronizeStudentAttributes(); synchronizeStudentAttributes();
nextSynchro(now+restfullSynchroTimming); nextSynchro(now+restfullSynchroTimming);
......
...@@ -121,16 +121,5 @@ ...@@ -121,16 +121,5 @@
<orderEntry type="library" exported="" name="play-services-ads-9.2.1" level="project" /> <orderEntry type="library" exported="" name="play-services-ads-9.2.1" level="project" />
<orderEntry type="library" exported="" name="play-services-ads-lite-9.2.1" level="project" /> <orderEntry type="library" exported="" name="play-services-ads-lite-9.2.1" level="project" />
<orderEntry type="module" module-name="commonlibrary" exported="" /> <orderEntry type="module" module-name="commonlibrary" exported="" />
<orderEntry type="library" exported="" name="okhttp-ws-2.3.0" level="project" />
<orderEntry type="library" exported="" name="socket.io-client-0.5.0" level="project" />
<orderEntry type="library" exported="" name="okhttp-2.3.0" level="project" />
<orderEntry type="library" exported="" name="support-annotations-23.0.0" level="project" />
<orderEntry type="library" exported="" name="okio-1.3.0" level="project" />
<orderEntry type="library" exported="" name="gson-2.3" level="project" />
<orderEntry type="library" exported="" name="engine.io-client-0.5.0" level="project" />
<orderEntry type="library" exported="" name="appcompat-v7-21.0.3" level="project" />
<orderEntry type="library" exported="" scope="TEST" name="hamcrest-core-1.3" level="project" />
<orderEntry type="library" exported="" scope="TEST" name="junit-4.12" level="project" />
<orderEntry type="library" exported="" scope="TEST" name="json-20090211" level="project" />
</component> </component>
</module> </module>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment