how can I show only the content of a notification

1
if(getIntent().getExtras() !=null){

    for (String Key:getIntent().getExtras().keySet()){

    String value = getIntent().getExtras().getString(Key);

    tvMostrarInfo.append("\n" + Key+":"+value);

    //...
}

This is the code and if it shows the content but with the id from the name of the package and I just want the message to be shown

    
asked by natalia 07.03.2017 в 04:06
source

1 answer

0

Just check the key of the message and add it directly, for example assuming that the key is "message":

 if(Key.equals("mensaje")){
   String value = getIntent().getExtras().getString(Key);
   tvMostrarInfo.append("\n" + Key+":"+value);
 }
    
answered by 07.03.2017 в 04:20