Commit f57164fc5668f6ebf63fdca62461260979c521fa

Authored by JLo'w
1 parent 49bd44b3

Alerte expiration ne pop plus quand on se déco

PremiereActivite/app/src/main/java/com/example/app_10p5/MainActivite.java
... ... @@ -41,7 +41,7 @@ public class MainActivite extends Activity implements ASyncResponse, main_tab_fr
41 41 public static final int STATE_ANNULER= 6;
42 42 public static final int STATE_REFAIRE = 7;
43 43  
44   - public static final long EXPIRATION = 1000*10*1;
  44 + public static final long EXPIRATION = 1000*60*10;
45 45  
46 46 private int mState;
47 47 private String mToken;
... ... @@ -72,11 +72,13 @@ public class MainActivite extends Activity implements ASyncResponse, main_tab_fr
72 72 mTimerRunnable = new Runnable() {
73 73 @Override
74 74 public void run() {
75   - if(System.currentTimeMillis() - mTimeToken >= EXPIRATION){
76   - afficherPopup();
77   - }
78   - else{
79   - mTimerHandler.postDelayed(this, 5000);
  75 + if(TextUtils.getTrimmedLength(mToken) == 30){
  76 + if(System.currentTimeMillis() - mTimeToken >= EXPIRATION){
  77 + afficherPopup();
  78 + }
  79 + else{
  80 + mTimerHandler.postDelayed(this, 5000);
  81 + }
80 82 }
81 83 }
82 84 };
... ...