Intent facilitates the exchange of data between components. Intent is a message that is passed between components such as activity. which you can use aim.putExtra (key, value) and intent.putExtra (Bundle)
Intent intent = new Intent(); intent.setClass(this, Other_Activity.class); // intent.putExtra(key,value) intent.putExtra("EXTRA_ID", "SOME DATAS"); startActivity(intent);
Using the bundle:
Bundle bundle=new Bundle(); bundle.put(key,value); intent.putExtra(bundle); startActivity(intent);
Call a bunch in another action:
Bundle extras=getIntent().getExtras(); extras.getString(key);
Praveen Kumar Verma
source share