how to send message between activities in android -


my app works follow: user hits compose button , types message sends main activity date , time in recycler view swipe refresh facebook or other type of social media. problem i'm having i'm new android development , haven't seen on google site.

you have 2 options:

  • send data in intent:

use "put" file...

intent = new intent(firstscreen.this, secondscreen.class);    string keyidentifer  = null; i.putextra("string_i_need", strname); 

then, retrieve value try like:

string newstring; if (savedinstancestate == null) {     bundle extras = getintent().getextras();     if(extras == null) {         newstring= null;     } else {         newstring= extras.getstring("string_i_need");     } } else {     newstring= (string) savedinstancestate.getserializable("string_i_need"); } 

Comments

Popular posts from this blog

gcc - MinGW's ld cannot perform PE operations on non PE output file -

timeout - Handshake_timeout on RabbitMQ using python and pika from remote vm -

c# - Search and Add Comment with OpenXML for Word -