using intent in android studio code example
Example 1: intent android open activity
Intent intent = new Intent(this, DisplayMessageActivity.class);
intent.putExtra(key:,value:);
startActivity(intent);
Example 2: intent android
Intent intent = new Intent(MainActivity.this,Activity.class);