Using implicit Intents, you are to write a complete Android application, using menus or BottomNavigationView to

37 0

Get full Expert solution in seconds

$2.99 ONLY

Unlock Answer

Using implicit Intents, you are to write a complete Android application, using menus or BottomNavigationView to

1. Allow the user to send SMS messages to multiple users at the same time.
2. Allow the user to send E-mail to multiple users including CC and BCC
3. Allow the user to Locate any specific place on Google Map by either

specifying a detailed information about a location or by specifying Latitude and longitude coordinates

4. Take a picture.


Answer : Given data

package de.cketti.mailto.sample;

import android.os.Bundle;
import android.text.TextUtils;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.EditText;

import de.cketti.mailto.EmailIntentBuilder;

public class MainActivity extends AppCompatActivity {
    private View mainContent;
    private EditText emailTo;
    private EditText emailCc;
    private EditText emailBcc;
    private EditText emailSubject;
    private EditText emailBody;

    protected void onCreate(Bundle savedInstanceState) {

        mainContent = findViewById(;
        emailTo = findViewById(;
        emailCc = findViewById(;
        emailBcc = findViewById(;
        emailSubject = findViewById(;
        emailBody = findViewById(;

        findViewById( -> sendEmail());

    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(, menu);
        return true;

    public boolean onOptionsItemSelected(MenuItem item) {
        if (item.getItemId() == {
        return true;

    private void sendFeedback() {
        boolean success = EmailIntentBuilder.from(this)

        if (!success) {
            Snackbar.make(mainContent, R.string.error_no_email_app, Snackbar.LENGTH_LONG).show();

    void sendEmail() {
        String to = emailTo.getText().toString();
        String cc = emailCc.getText().toString();
        String bcc = emailBcc.getText().toString();
        String subject = emailSubject.getText().toString();
        String body = emailBody.getText().toString();

        EmailIntentBuilder builder = EmailIntentBuilder.from(this);

        try {
            if (!TextUtils.isEmpty(to)) {
            if (!TextUtils.isEmpty(cc)) {
            if (!TextUtils.isEmpty(bcc)) {
            if (!TextUtils.isEmpty(subject)) {
            if (!TextUtils.isEmpty(body)) {

            boolean success = builder.start();
            if (!success) {
                Snackbar.make(mainContent, R.string.error_no_email_app, Snackbar.LENGTH_LONG).show();
        } catch (IllegalArgumentException e) {
            String errorMessage = getString(R.string.argument_error, e.getMessage());
            Snackbar.make(mainContent, errorMessage, Snackbar.LENGTH_LONG).show();