java intent extras

Solutions on MaxInterview for java intent extras by the best coders in the world

showing results for - "java intent extras"
Nate
06 Apr 2018
1This is what i have been using, hopfully it helps someone.. simple and affective.
2
3send data
4
5    intent = new Intent(getActivity(), CheckinActivity.class);
6    intent.putExtra("mealID", meal.Meald);
7    startActivity(intent);
8get data
9
10    int mealId;
11
12    Intent intent = getIntent();
13    Bundle bundle = intent.getExtras();
14
15    if(bundle != null){
16        mealId = bundle.getInt("mealID");
17    }
18cheers!
similar questions
queries leading to this page
java intent extras