ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 1 - Associate Android Developer discussion

Report
Export

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

A.
val sendIntent = Intent(this, UploadService::class.java).apply { putExtra(Intent.EXTRA_TEXT, textMessage) ...
Answers
A.
val sendIntent = Intent(this, UploadService::class.java).apply { putExtra(Intent.EXTRA_TEXT, textMessage) ...
B.
val sendIntent = Intent().apply { type = Intent.ACTION_SEND; ...
Answers
B.
val sendIntent = Intent().apply { type = Intent.ACTION_SEND; ...
C.
val sendIntent = Intent(this, UploadService::class.java).apply { data = Uri.parse(fileUrl) ...
Answers
C.
val sendIntent = Intent(this, UploadService::class.java).apply { data = Uri.parse(fileUrl) ...
D.
val sendIntent = Intent().apply { action = Intent.ACTION_SEND ...
Answers
D.
val sendIntent = Intent().apply { action = Intent.ACTION_SEND ...
Suggested answer: D

Explanation:

Create the text message with a string

val sendIntent = Intent().apply { action = Intent.ACTION_SEND putExtra(Intent.EXTRA_TEXT, textMessage) type = "text/plain" }

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

asked 18/09/2024
Phillip Roos
49 questions
NextNext
User
Your answer:
0 comments
Sorted by

Leave a comment first