MCQs / Computer Science / Messaging: SMS and Email

Messaging: SMS and Email MCQs — Computer Science (page 2)

31 multiple-choice questions on Messaging: SMS and Email from Computer Science, each with the correct answer and, where available, a teacher's explanation. Read through them to revise the chapter, then practise the same questions one by one to test yourself.

26. Intent.EXTRAEMAIL must contain:

  1. A single String
  2. An array of Strings (recipients)
  3. A Uri
  4. An Int

Answer: B) An array of Strings (recipients)

Explanation: Email clients expect an array of addresses.

Discuss this question

27. Sending SMS with SmsManager requires which permission?

  1. INTERNET
  2. READPHONESTATE
  3. SENDSMS
  4. RECEIVESMS

Answer: C) SENDSMS

Explanation: SENDSMS is a dangerous permission requested at run time.

Discuss this question

28. Which feedback component allows an "UNDO" action?

  1. Snackbar
  2. TextView
  3. ProgressBar
  4. Toast

Answer: A) Snackbar

Explanation: Snackbars can have an action button.

Discuss this question

29. In the SENT receiver, resultCode == Activity.RESULTOK means:

  1. The SMS was delivered
  2. Permission was denied
  3. The radio is off
  4. The SMS was sent successfully

Answer: D) The SMS was sent successfully

Explanation: RESULTOK in the sent receiver indicates success.

Discuss this question

30. Google Play allows READSMS/RECEIVESMS mainly for:

  1. Every app that wants OTP
  2. Calculator apps
  3. Games
  4. Default SMS handler apps or approved use cases

Answer: D) Default SMS handler apps or approved use cases

Explanation: Play restricts SMS and Call Log permissions.

Discuss this question

31. Which class sends SMS directly from code?

  1. TelephonyManager
  2. NotificationManager
  3. SmsManager
  4. MessageManager

Answer: C) SmsManager

Explanation: SmsManager provides sendTextMessage and related methods.

Discuss this question

Previous Page 2 of 2

Practise Messaging: SMS and Email MCQs

More Computer Science chapters