Of course it can be achieved, obviously you would have to add another data in the notification, for example "deepUrl" that could contain the name of the section, a url:
http://www.marcos.com/nacional
or a custom scheme:
seccion://nacional
Based on that, when you receive your notification in onHandleIntent()
, open your section.
@Override
protected void onHandleIntent(Intent intent){
GoogleCloudMessaging gcm = GoogleCloudMessaging.getInstance(this);
String messageType = gcm.getMessageType(intent);
Bundle extras = intent.getExtras();
if (!extras.isEmpty()){
if (GoogleCloudMessaging.MESSAGE_TYPE_MESSAGE.equals(messageType)){
String titulo = extras.getString("titulo");
String descripcion = extras.getString("descripcion");
String imagen = extras.getString("img");
String deepUrl = extras.getString("deepUrl");
abreSeccion(deepUrl);
}else{
Log.w(TAG, "Tipo de notificación desconocido.");
}
}
GCMBroadcastReceiver.completeWakefulIntent(intent);
}