Answer the question
In order to leave comments, you need to log in
What is the reason for getting default value on Intent?
I'm trying to pass an int value from one class to another, but the value is not passed, and the default value is assigned.
The class from which we send the int value
Intent myIntent = new Intent(this, B.class);
myIntent.putExtra("level", level);
int level = getActivity().getIntent().getIntExtra("level", 0)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question