public final class SmsApplication extends Object
Modifier and Type | Class and Description |
---|---|
static class |
SmsApplication.SmsApplicationData |
Constructor and Description |
---|
SmsApplication() |
Modifier and Type | Method and Description |
---|---|
static Collection<SmsApplication.SmsApplicationData> |
getApplicationCollection(Context context)
Returns the list of available SMS apps defined as apps that are registered for both the
SMS_RECEIVED_ACTION (SMS) and WAP_PUSH_RECEIVED_ACTION (MMS) broadcasts (and their broadcast
receivers are enabled)
Requirements to be an SMS application:
Implement SMS_DELIVER_ACTION broadcast receiver.
|
static ComponentName |
getDefaultExternalTelephonyProviderChangedApplication(Context context,
boolean updateIfNeeded)
Gets the default application that handles external changes to the SmsProvider and
MmsProvider.
|
static ComponentName |
getDefaultMmsApplication(Context context,
boolean updateIfNeeded)
Gets the default MMS application
|
static ComponentName |
getDefaultRespondViaMessageApplication(Context context,
boolean updateIfNeeded)
Gets the default Respond Via Message application
|
static ComponentName |
getDefaultSendToApplication(Context context,
boolean updateIfNeeded)
Gets the default Send To (smsto) application.
|
static ComponentName |
getDefaultSmsApplication(Context context,
boolean updateIfNeeded)
Gets the default SMS application
|
static SmsApplication.SmsApplicationData |
getSmsApplicationData(String packageName,
Context context)
Returns SmsApplicationData for this package if this package is capable of being set as the
default SMS application.
|
static void |
initSmsPackageMonitor(Context context) |
static boolean |
isDefaultSmsApplication(Context context,
String packageName)
Check if a package is default sms app (or equivalent, like bluetooth)
|
static void |
setDefaultApplication(String packageName,
Context context)
Sets the specified package as the default SMS/MMS application.
|
static boolean |
shouldWriteMessageForPackage(String packageName,
Context context)
Returns whether need to write the SMS message to SMS database for this package.
|
public static Collection<SmsApplication.SmsApplicationData> getApplicationCollection(Context context)
public static void setDefaultApplication(String packageName, Context context)
public static void initSmsPackageMonitor(Context context)
public static SmsApplication.SmsApplicationData getSmsApplicationData(String packageName, Context context)
public static ComponentName getDefaultSmsApplication(Context context, boolean updateIfNeeded)
context
- context from the calling appupdateIfNeeded
- update the default app if there is no valid default app configured.public static ComponentName getDefaultMmsApplication(Context context, boolean updateIfNeeded)
context
- context from the calling appupdateIfNeeded
- update the default app if there is no valid default app configured.public static ComponentName getDefaultRespondViaMessageApplication(Context context, boolean updateIfNeeded)
context
- context from the calling appupdateIfNeeded
- update the default app if there is no valid default app configured.public static ComponentName getDefaultSendToApplication(Context context, boolean updateIfNeeded)
Caller must pass in the correct user context if calling from a singleton service.
context
- context from the calling appupdateIfNeeded
- update the default app if there is no valid default app configured.public static ComponentName getDefaultExternalTelephonyProviderChangedApplication(Context context, boolean updateIfNeeded)
context
- context from the calling appupdateIfNeeded
- update the default app if there is no valid default app configured.public static boolean shouldWriteMessageForPackage(String packageName, Context context)
Caller must pass in the correct user context if calling from a singleton service.
public static boolean isDefaultSmsApplication(Context context, String packageName)
context
- context from the calling apppackageName
- the name of the package to be checked