Package org.robolectric.shadows
Class ShadowSmsManager
java.lang.Object
org.robolectric.shadows.ShadowSmsManager
@Implements(value=android.telephony.SmsManager.class, minSdk=18) public class ShadowSmsManager extends Object
- 
Nested Class Summary
- 
Field SummaryFields Modifier and Type Field Description protected ShadowSmsManager.DataMessageParamslastDataParamsprotected ShadowSmsManager.DownloadMultimediaMessageParamslastDownloadedMultimediaMessageParamsprotected ShadowSmsManager.SendMultimediaMessageParamslastSentMultimediaMessageParamsprotected ShadowSmsManager.TextMultipartParamslastTextMultipartParamsprotected ShadowSmsManager.TextSmsParamslastTextSmsParams
- 
Constructor SummaryConstructors Constructor Description ShadowSmsManager()
- 
Method Summary
- 
Field Details
- 
Constructor Details- 
ShadowSmsManagerpublic ShadowSmsManager()
 
- 
- 
Method Details- 
reset
- 
sendDataMessage@Implementation protected void sendDataMessage(String destinationAddress, String scAddress, short destinationPort, byte[] data, PendingIntent sentIntent, PendingIntent deliveryIntent)
- 
sendTextMessage@Implementation protected void sendTextMessage(String destinationAddress, String scAddress, String text, PendingIntent sentIntent, PendingIntent deliveryIntent)
- 
sendTextMessage@Implementation(minSdk=30) protected void sendTextMessage(String destinationAddress, String scAddress, String text, PendingIntent sentIntent, PendingIntent deliveryIntent, long messageId)
- 
sendMultipartTextMessage@Implementation protected void sendMultipartTextMessage(String destinationAddress, String scAddress, ArrayList<String> parts, ArrayList<PendingIntent> sentIntents, ArrayList<PendingIntent> deliveryIntents)
- 
getLastSentDataMessageParams- Returns:
- Parameters for last call to sendDataMessage(java.lang.String, java.lang.String, short, byte[], android.app.PendingIntent, android.app.PendingIntent).
 
- 
clearLastSentDataMessageParamspublic void clearLastSentDataMessageParams()Clear last recorded parameters forsendDataMessage(java.lang.String, java.lang.String, short, byte[], android.app.PendingIntent, android.app.PendingIntent).
- 
getLastSentTextMessageParams- Returns:
- Parameters for last call to sendTextMessage(java.lang.String, java.lang.String, java.lang.String, android.app.PendingIntent, android.app.PendingIntent).
 
- 
clearLastSentTextMessageParamspublic void clearLastSentTextMessageParams()Clear last recorded parameters forsendTextMessage(java.lang.String, java.lang.String, java.lang.String, android.app.PendingIntent, android.app.PendingIntent).
- 
getLastSentMultipartTextMessageParams
- 
clearLastSentMultipartTextMessageParamspublic void clearLastSentMultipartTextMessageParams()
- 
sendMultimediaMessage@Implementation(minSdk=21) protected void sendMultimediaMessage(Context context, Uri contentUri, @Nullable String locationUrl, @Nullable Bundle configOverrides, @Nullable PendingIntent sentIntent)
- 
sendMultimediaMessage@Implementation(minSdk=31) protected void sendMultimediaMessage(Context context, Uri contentUri, @Nullable String locationUrl, @Nullable Bundle configOverrides, @Nullable PendingIntent sentIntent, long messageId)
- 
downloadMultimediaMessage@Implementation(minSdk=21) protected void downloadMultimediaMessage(Context context, String locationUrl, Uri contentUri, @Nullable Bundle configOverrides, @Nullable PendingIntent sentIntent)
- 
downloadMultimediaMessage@Implementation(minSdk=31) protected void downloadMultimediaMessage(Context context, String locationUrl, Uri contentUri, @Nullable Bundle configOverrides, @Nullable PendingIntent sentIntent, long messageId)
- 
getLastSentMultimediaMessageParams- Returns:
- Parameters for last call to sendMultimediaMessage(android.content.Context, android.net.Uri, java.lang.String, android.os.Bundle, android.app.PendingIntent).
 
- 
clearLastSentMultimediaMessageParamspublic void clearLastSentMultimediaMessageParams()Clear last recorded parameters forsendMultimediaMessage(android.content.Context, android.net.Uri, java.lang.String, android.os.Bundle, android.app.PendingIntent).
- 
getLastDownloadedMultimediaMessageParams- Returns:
- Parameters for last call to downloadMultimediaMessage(android.content.Context, java.lang.String, android.net.Uri, android.os.Bundle, android.app.PendingIntent).
 
- 
clearLastDownloadedMultimediaMessageParamspublic void clearLastDownloadedMultimediaMessageParams()Clear last recorded parameters fordownloadMultimediaMessage(android.content.Context, java.lang.String, android.net.Uri, android.os.Bundle, android.app.PendingIntent).
- 
sendMultipartTextMessage@Implementation(minSdk=30) protected void sendMultipartTextMessage(String destinationAddress, String scAddress, List<String> parts, List<PendingIntent> sentIntents, List<PendingIntent> deliveryIntents, long messageId)
- 
setSmscAddressPermissionpublic void setSmscAddressPermission(boolean smscAddressPermission)Sets a boolean value to simulate whether or not the required permissions to callgetSmscAddress()have been granted.
- 
getSmscAddressReturnsnullby default or the value specified viasetSmscAddress(String). Required permission is set bysetSmscAddressPermission(boolean).
- 
setDefaultSmsSubscriptionIdpublic static void setDefaultSmsSubscriptionId(int id)Sets the value to be returned bygetDefaultSmsSubscriptionId().
- 
getDefaultSmsSubscriptionIdReturns-1by default or the value specified insetDefaultSmsSubscriptionId(int).
- 
setSmscAddressSets the value returned bySmsManager.getSmscAddress().
 
-