Home » Google » Associate Android Developer » What is a correct part of an Implicit Intent for sharing data implementation?
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);
B. Intent sendIntent = new Intent(); sendIntent.setType(Intent.ACTION_SEND);
C. Intent sendIntent = new Intent(this, UploadService.class) sendIntent.setData(Uri.parse(fileUrl));
D. Intent sendIntent = new Intent(); sendIntent.setAction(Intent.ACTION_SEND);
Correct Answer: D
Explanation/Reference:
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
Download Printable PDF. VALID exam to help you PASS.
|
|