| Línea 32... |
Línea 32... |
| 32 |
import android.view.View;
|
32 |
import android.view.View;
|
| 33 |
import android.widget.ImageView;
|
33 |
import android.widget.ImageView;
|
| 34 |
import android.widget.PopupMenu;
|
34 |
import android.widget.PopupMenu;
|
| 35 |
import android.widget.ProgressBar;
|
35 |
import android.widget.ProgressBar;
|
| 36 |
import android.widget.TextView;
|
36 |
import android.widget.TextView;
|
| - |
|
37 |
import android.widget.Toast;
|
| Línea 37... |
Línea 38... |
| 37 |
|
38 |
|
| 38 |
|
39 |
|
| 39 |
import com.bumptech.glide.Glide;
|
40 |
import com.bumptech.glide.Glide;
|
| Línea 84... |
Línea 85... |
| 84 |
import com.cesams.twogetskills.entity.UserLog;
|
85 |
import com.cesams.twogetskills.entity.UserLog;
|
| 85 |
import com.cesams.twogetskills.preference.Preference;
|
86 |
import com.cesams.twogetskills.preference.Preference;
|
| 86 |
import com.cesams.twogetskills.receiver.ConnectivityReceiver;
|
87 |
import com.cesams.twogetskills.receiver.ConnectivityReceiver;
|
| 87 |
import com.cesams.twogetskills.receiver.InternalReceiver;
|
88 |
import com.cesams.twogetskills.receiver.InternalReceiver;
|
| 88 |
import com.cesams.twogetskills.room.ResultCount;
|
89 |
import com.cesams.twogetskills.room.ResultCount;
|
| - |
|
90 |
import com.google.android.gms.tasks.OnCompleteListener;
|
| - |
|
91 |
import com.google.android.gms.tasks.Task;
|
| 89 |
import com.google.android.material.bottomnavigation.BottomNavigationView;
|
92 |
import com.google.android.material.bottomnavigation.BottomNavigationView;
|
| 90 |
import com.google.android.material.navigation.NavigationBarView;
|
93 |
import com.google.android.material.navigation.NavigationBarView;
|
| 91 |
import com.google.android.material.snackbar.Snackbar;
|
94 |
import com.google.android.material.snackbar.Snackbar;
|
| Línea 92... |
Línea 95... |
| 92 |
|
95 |
|
| Línea 97... |
Línea 100... |
| 97 |
import com.cesams.twogetskills.R;
|
100 |
import com.cesams.twogetskills.R;
|
| Línea 98... |
Línea 101... |
| 98 |
|
101 |
|
| 99 |
import com.cesams.twogetskills.fragment.IntroFragment;
|
102 |
import com.cesams.twogetskills.fragment.IntroFragment;
|
| 100 |
import com.cesams.twogetskills.fragment.SigninFragment;
|
103 |
import com.cesams.twogetskills.fragment.SigninFragment;
|
| - |
|
104 |
import com.cesams.twogetskills.skeleton.ITwoGetSkills;
|
| Línea 101... |
Línea 105... |
| 101 |
import com.cesams.twogetskills.skeleton.ITwoGetSkills;
|
105 |
import com.google.firebase.messaging.FirebaseMessaging;
|
| 102 |
|
106 |
|
| 103 |
import org.json.JSONArray;
|
107 |
import org.json.JSONArray;
|
| Línea 428... |
Línea 432... |
| 428 |
mConnectivityReceiver = new ConnectivityReceiver();
|
432 |
mConnectivityReceiver = new ConnectivityReceiver();
|
| 429 |
registerReceiver(mConnectivityReceiver, new IntentFilter(ConnectivityManager.CONNECTIVITY_ACTION));
|
433 |
registerReceiver(mConnectivityReceiver, new IntentFilter(ConnectivityManager.CONNECTIVITY_ACTION));
|
| Línea 430... |
Línea 434... |
| 430 |
|
434 |
|
| 431 |
IntentFilter intentFilterInternal = new IntentFilter();
|
435 |
IntentFilter intentFilterInternal = new IntentFilter();
|
| 432 |
intentFilterInternal.addAction(Constants.BROADCAST_TYPE_NOTIFICATION);
|
436 |
intentFilterInternal.addAction(Constants.BROADCAST_TYPE_NOTIFICATION);
|
| 433 |
// intentFilterInternal.addAction(Constants.BROADCAST_TYPE_TOKEN);
|
437 |
intentFilterInternal.addAction(Constants.BROADCAST_TYPE_TOKEN);
|
| 434 |
intentFilterInternal.addAction(Constants.BROADCAST_TYPE_COMMAND);
|
438 |
intentFilterInternal.addAction(Constants.BROADCAST_TYPE_COMMAND);
|
| Línea 435... |
Línea 439... |
| 435 |
intentFilterInternal.addAction(Constants.BROADCAST_TYPE_SYNC_TO_SERVER_OR_CHECK_CHANGES);
|
439 |
intentFilterInternal.addAction(Constants.BROADCAST_TYPE_SYNC_TO_SERVER_OR_CHECK_CHANGES);
|
| 436 |
|
440 |
|
| 437 |
mInternalReceiver = new InternalReceiver();
|
441 |
mInternalReceiver = new InternalReceiver();
|
| Línea -... |
Línea 442... |
| - |
|
442 |
//registerReceiver(mInternalReceiver, intentFilterInternal);
|
| - |
|
443 |
this.registerReceiver(mInternalReceiver, intentFilterInternal);
|
| - |
|
444 |
|
| - |
|
445 |
FirebaseMessaging.getInstance().getToken()
|
| - |
|
446 |
.addOnCompleteListener(new OnCompleteListener<String>() {
|
| - |
|
447 |
@Override
|
| - |
|
448 |
public void onComplete(@NonNull Task<String> task) {
|
| - |
|
449 |
if (!task.isSuccessful()) {
|
| - |
|
450 |
Log.w(TAG, "Fetching FCM registration token failed", task.getException());
|
| - |
|
451 |
return;
|
| - |
|
452 |
}
|
| - |
|
453 |
|
| - |
|
454 |
// Get new FCM registration token
|
| - |
|
455 |
String token = task.getResult();
|
| - |
|
456 |
|
| - |
|
457 |
|
| - |
|
458 |
Log.e("BUG Token", "Token 1 : " + token);
|
| - |
|
459 |
|
| - |
|
460 |
createSyncRecordNewToken(token);
|
| - |
|
461 |
}
|
| 438 |
//registerReceiver(mInternalReceiver, intentFilterInternal);
|
462 |
});
|
| Línea 439... |
Línea 463... |
| 439 |
this.registerReceiver(mInternalReceiver, intentFilterInternal);
|
463 |
|