Question

In: Computer Science

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

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.

Impress me lots lots lots with this application.

Your are free to add whatever to need or wish.

Enjoy!

i need code for application

Solutions

Expert Solution

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 androidx.appcompat.app.AppCompatActivity;
import com.google.android.material.snackbar.Snackbar;
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;


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        mainContent = findViewById(R.id.main_content);
        emailTo = findViewById(R.id.email_to);
        emailCc = findViewById(R.id.email_cc);
        emailBcc = findViewById(R.id.email_bcc);
        emailSubject = findViewById(R.id.email_subject);
        emailBody = findViewById(R.id.email_body);

        findViewById(R.id.button_send_email).setOnClickListener(v -> sendEmail());
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.activity_main, menu);
        return true;
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        if (item.getItemId() == R.id.menu_feedback) {
            sendFeedback();
        }
        return true;
    }

    private void sendFeedback() {
        boolean success = EmailIntentBuilder.from(this)
                .to("[email protected]")
                .subject(getString(R.string.feedback_subject))
                .body(getString(R.string.feedback_body))
                .start();

        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)) {
                builder.to(to);
            }
            if (!TextUtils.isEmpty(cc)) {
                builder.cc(cc);
            }
            if (!TextUtils.isEmpty(bcc)) {
                builder.bcc(bcc);
            }
            if (!TextUtils.isEmpty(subject)) {
                builder.subject(subject);
            }
            if (!TextUtils.isEmpty(body)) {
                builder.body(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();
        }
    }
}

Note: This is just a part of code, I'm not able to send the entire code,I don't know the exact reason why, mayne due to limited number of words, or maybe due to server down.

You can let me know how to send it, I'm having files too which are required for execution of an application.

____________THE END_______________


Related Solutions

the code base you will be working with involves an Android application. (Android Studio) application name...
the code base you will be working with involves an Android application. (Android Studio) application name " SharingApp" In the application’s current state: A user of the app is able to create and edit a profile with a unique username and an email address. A user of the app is able to login and logout. An owner is able to record the items they own and wish to share. A bidder is able to place bids on items they wish...
Using Python write an application that will calculate a loan payment. To complete this, you are...
Using Python write an application that will calculate a loan payment. To complete this, you are required to write 2 functions, LoanPayment and InterestOnlyLoanPayment, as well as a test application that calls each of the functions to get the payment amount based on parameters supplied to the functions. The test application should output both the loan payment and the interest-only loan payment based on input values from the user. The LoanPayment function is defined as follows: Payment = Loan amount...
Create a mobile application using Android studio, for cinema tickets reservation. The application will be used...
Create a mobile application using Android studio, for cinema tickets reservation. The application will be used by the customers to book cinema tickets. Only users of 15 years old and above are allowed to book cinema tickets for a particular film. The user can book more than one ticket where ticket prices vary between 20 and 50 AED. Your app contains tree Activities. The first activity is a launching activity containing a logo and a button start. When the user...
Write a code in order to make an android application of LZ77 compression algorithm for text...
Write a code in order to make an android application of LZ77 compression algorithm for text compression.
How to Connect an Android Application to Firebase Realtime Database and write a simple database in...
How to Connect an Android Application to Firebase Realtime Database and write a simple database in Java. Please attach screenshots of the activity performed.
Exercise 8-2 (work with menus) Exercise 8-3 (work with preferences) android studio
Exercise 8-2 (work with menus) Exercise 8-3 (work with preferences) android studio
Extend the Hello Goodbye application from the class to include the following using android studio: 1....
Extend the Hello Goodbye application from the class to include the following using android studio: 1. Add a Text Color button underneath the existing Exclamation button, using the same text color and background image. When this button is clicked, toggle the display color for the Hello or Goodbye text between the original color and the color Red. 2. Add a Reset button underneath the new text color button, using the same text color and background image. When this button is...
I want to create an Android mobile application, an application that provides courses for students ......
I want to create an Android mobile application, an application that provides courses for students ... I want advice for safety and security, what are its requirements ... and what are the yooze case for this application and the Functional requirements of your opinion
Using the following menus for a healthy adult indicate the adjustments you would make to provide...
Using the following menus for a healthy adult indicate the adjustments you would make to provide a therapeutically appropriate menu for each patient described. Case study- 1 ( 12.5 points) A 69-year-old disabled gentleman who is recovering from a stroke. A swallow evaluation by his speech therapist determines he can tolerate thin liquids but has mild dysphagia requiring soft, cohesive textures. Regular MenuType of diet/adjustments needed for Level 2 dysphagia: Breakfast                                                                                                                   Whole-grain bagel with ham and cream cheese     Fresh orange...
what is the real life application of implicit and explicit cost for airline industry
what is the real life application of implicit and explicit cost for airline industry
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT