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

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -