I am starting Android development and have come to the end of Building my first application . Before continuing, I would like to confirm and confirm my understanding of the use of several actions and the transfer of information from one activity to another .
public void sendMessage(View view) {
Intent intent = new Intent(this, DisplayMessageActivity.class);
EditText editText = (EditText) findViewById(R.id.edit_message);
String message = editText.getText().toString();
intent.putExtra(EXTRA_MESSAGE, message);
startActivity(intent);
}
1) As far as I understand, the second parameter in the constructor for Intent ( Intent intent = new Intent(this, DisplayMessageActivity.class)) serves as a reference for startActivity(...), and reflection is used to call the method onCreate()in the class DisplayMessageActivity, since the class DisplayMessageActivitywas set as an object of the class?
2) What is the use of the first parameter (contextual in the constructor)? (Basically, how does Android use the first parameter, a brief description, please, to get started)?
3) As you can see from the tutorial, the last part of creating your first application, he advises me to declare a variable as such: ( public final static String EXTRA_MESSAGE = "me.marshac.myfirstapp.MESSAGE";). I know the purpose of this declaration and initialization, but why should I not specify the full name of the package ( me.marshac.myfirstapp. (...) .MESSAGE) and where does the MESSAGE variable come from? The only two variables similar to them are both local variables in sendMessage () and other onCreate () actions, but are they different and local?
I apologize for the deepest requests, I want to establish a clear understanding of the concepts of beginners before moving on to intermediate / advanced.