I am trying to open up Gmail Compose screen when a button is clicked in my Android App. Do I need some API key for this from Google? or what do I need to do in my button onC
You can use Simple Intent.ACTION_SEND intent
set Intent.EXTRA_EMAIL for array of emails
set Intent.EXTRA_SUBJECT for subject line in email composer
Explore more EXTRA options available here -> https://developer.android.com/guide/components/intents-common#Email
Here's a quick code snippet
Intent intent = new Intent(Intent.ACTION_SEND);
intent.setType("*/*");
intent.putExtra(Intent.EXTRA_EMAIL, new String[]{"test@gmail.com"});
intent.putExtra(Intent.EXTRA_SUBJECT, "Feedback");
if (intent.resolveActivity(ctx.getPackageManager()) != null) {
startActivity(intent);
}