Proyectos de Subversion Android Microlearning - Nuevo Interface

Rev

Rev 31 | Rev 43 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 31 Rev 39
Línea 72... Línea 72...
72
        if (remoteMessage.getNotification() != null) {
72
        if (remoteMessage.getNotification() != null) {
73
            String title = remoteMessage.getNotification().getTitle();
73
            String title = remoteMessage.getNotification().getTitle();
74
            String body = remoteMessage.getNotification().getBody();
74
            String body = remoteMessage.getNotification().getBody();
Línea 75... Línea 75...
75
 
75
 
76
 
76
 
77
            String command = "";
77
            String command = "", url="";
78
            int new_capsules = 0;
78
            int new_capsules = 0;
Línea 79... Línea 79...
79
            if (remoteMessage.getData().size() > 0) {
79
            if (remoteMessage.getData().size() > 0) {
Línea 84... Línea 84...
84
                }
84
                }
Línea 85... Línea 85...
85
 
85
 
86
                if(remoteMessage.getData().containsKey("new_capsules")) {
86
                if(remoteMessage.getData().containsKey("new_capsules")) {
87
                   new_capsules = Functions.Numero2Int(remoteMessage.getData().get("new_capsules"));
87
                   new_capsules = Functions.Numero2Int(remoteMessage.getData().get("new_capsules"));
-
 
88
                }
-
 
89
 
-
 
90
                if(remoteMessage.getData().containsKey("url")) {
-
 
91
                    url = remoteMessage.getData().get("url");
88
                }
92
                }
Línea 89... Línea 93...
89
            }
93
            }
90
 
94
 
91
            Log.d(TAG, "title = " + title);
95
            Log.d(TAG, "title = " + title);
Línea 96... Línea 100...
96
            Intent intent = new Intent(Constants.BROADCAST_TYPE_NOTIFICATION);
100
            Intent intent = new Intent(Constants.BROADCAST_TYPE_NOTIFICATION);
97
            intent.putExtra("title", title);
101
            intent.putExtra("title", title);
98
            intent.putExtra("body", body);
102
            intent.putExtra("body", body);
99
            intent.putExtra("command", command);
103
            intent.putExtra("command", command);
100
            intent.putExtra("new_capsules", new_capsules);
104
            intent.putExtra("new_capsules", new_capsules);
-
 
105
            intent.putExtra("url",url);
Línea 101... Línea 106...
101
 
106
 
102
 
107