Signup/Sign In

Android SMS and Telephony Concepts

This Test will cover concepts of Android Telephony and SMS Service.
Q. Which Permission you need to declare in your AndroidManifest.xml file for sending SMS.
<uses-permission android:name="android.permission.SEND_SMS"/>
<uses-permission android:name="android.permission.SMS_SEND"/>
<uses-permission android:name="android.permission.SEND_READ_SMS"/>
Q. Which class is used to send SMS programmatically in Android?
Q. What code will you write to send an SMS to another AVD? Suppose that the AVD no is 5556.
SmsManager sms = new SmsManager();
sms.sendTextMessage("5556", null, "StudyTonight", null, null);
SmsManager sms=new SmsManager();
sendSMS("5556", null, "Study Tonight", null, null);
SmsManager sms=SmsManager.getDefault();
sms.sendTextMessage("5556", null, "Study Tonight", null, null);

Q. How to get feedback on a message sent via Android app?
Q. Which Permission you need to declare in your AndroidManifest.xml file for initiating a call using the system in-call Activity?
Q. To initiate a call using an Intent, which code you will write?
Intent intent = new Intent(Intent.ACTION_CALL);
startActivity(intent);
Intent intent = new Intent(Intent.ACTION_CALL, Uri.parse("tel:987654321"));
startActivity(intent);
Intent intent = new Intent(Uri.parse("tel:987654321"));
startActivity(intent);
Q. For accessing the Subscriber Identity Module(SIM) detail which class you will use?

Q. For sending SMS using an Intent which code is correct?
Intent intent = new Intent();
intent.putExtra("sms_body", "Welcome at Studytonight.com");
startActivity(intent);
Intent intent = new Intent();
startActivity(intent);
Intent intent = new Intent(Intent.ACTION_SENDTO, Uri.parse("sms:9923-----"));
intent.putExtra("sms_body", "Welcome at Studytonight.com");
startActivity(intent);
Q. On which thread does services work in Android?
Q. What are the main components in android?
1: Activity
2: Services
3: Broadcast Receiver
4: Content provider

Related Tests: