problem with session ping solved

parent 30176d00
......@@ -13,13 +13,11 @@ import com.yottacode.pictogram.net.websockets.Room;
*/
public class SubscribeAction extends Action {
//Picto Action types
public static final String SUBSCRIBE="subscribe";
public static final String ACTION="/stu/subscribe";
@Override
public boolean is_local_action() {
return false;
......@@ -29,6 +27,5 @@ public class SubscribeAction extends Action {
super(SUBSCRIBE);
}
public String get_action() {return ACTION;}
}
......@@ -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
long now = new Date().getTime();
if (PCBcontext.is_user_logged()) {
if (restfullSynchroTimming > 0 && (now>= nextRestfullSynchro)) {
if (restfullSynchroTimming > 0 && (now >= nextRestfullSynchro)) {
Log.i(LOG_TAG, "Vocabulary request.");
if(!PCBcontext.getRoom().inRoom()){
PCBcontext.getRoom().connect();
}
PCBcontext.getVocabulary().synchronize();
synchronizeStudentAttributes();
nextSynchro(now+restfullSynchroTimming);
......
......@@ -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-lite-9.2.1" level="project" />
<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>
</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