ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 63 - Associate Android Developer discussion

Report
Export

What is a correct part of an Implicit Intent for sharing data implementation?

A.
Intent sendIntent = new Intent(this, UploadService.class) sendIntent.putExtra(Intent.EXTRA_TEXT, textMessage);
Answers
A.
Intent sendIntent = new Intent(this, UploadService.class) sendIntent.putExtra(Intent.EXTRA_TEXT, textMessage);
B.
Intent sendIntent = new Intent(); sendIntent.setType(Intent.ACTION_SEND);
Answers
B.
Intent sendIntent = new Intent(); sendIntent.setType(Intent.ACTION_SEND);
C.
Intent sendIntent = new Intent(this, UploadService.class) sendIntent.setData(Uri.parse(fileUrl));
Answers
C.
Intent sendIntent = new Intent(this, UploadService.class) sendIntent.setData(Uri.parse(fileUrl));
D.
Intent sendIntent = new Intent(); sendIntent.setAction(Intent.ACTION_SEND);
Answers
D.
Intent sendIntent = new Intent(); sendIntent.setAction(Intent.ACTION_SEND);
Suggested answer: D

Explanation:

Create the text message with a string

Intent sendIntent = new Intent(); sendIntent.setAction(Intent.ACTION_SEND); sendIntent.putExtra(Intent.EXTRA_TEXT, textMessage); sendIntent.setType("text/plain");

Reference: https://developer.android.com/guide/components/fundamentals

asked 18/09/2024
Luca Arcuri
28 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first