This is an old revision of the document!
1. Download the SDK
2. In a strings file in /res, add your SDSMS_ID:
<string name=“SDSMS_ID”>UNREGISTERED_APP</string>
If you have a registration ID, enter it here. Otherwise, this can be anything you want it to be (or leave it alone). Setting it to a unique value is recommended.
3. Determine the appropriate interface type for your app based on these values:
Antispam apps should not request “SMS_DELIVERED” - if you do, you will be denied this permission level and it will default to “unregistered” and your app will not work. This will also help with backward compatibility. Also, SDSMS will send duplicate messages to your app to confirm if the broadcast should be aborted based your user settings. You will not have SMS/MMS write access to the SMS provider.
Plugin apps should not request “SMS_DELIVERED” - if you do, you will be denied this permission level and it will default to “unregistered” and your app will not work. This will also help with backward compatibility. Also, SDSMS will send duplicate messages to your app to confirm if the broadcast should be aborted or modified by your app. You will not have SMS/MMS write access to the SMS provider, so modifications must be made to the broadcast intent.
Autoresponder apps should not request “SMS_DELIVERED” - if you do, you will be denied this permission level and it will default to “unregistered” and your app will not work. This will also help with backward compatibility. Do not write the received message to the SMS provider.
Provide enhanced processing and services before standard messaging apps. Please contact us for details.
By requesting this type of access your app will be responsible for writing to the SMS database. Therefore, all features should work in your app. As with pre-KitKat messaging, your app should abort the broadcast if there is reason to (for example, you have an anti-spam feature). The first “messaging” app to either abort or write the message will be the last in this group to receive it.
It is important to follow Android's recommendation to disable all features when you are not the "default sms app". However, SDSMS allows you to do the same "checks" to determine if you are the SDSMS "default sms app."
4. Replace SmsManager wtih SDSmsManager anywhere you use it in your project. If you set it globally in an Application class, that will work too. For example:
SDSmsManager mSdmmsManager = SDSmsManager.getDefault(context, context.getString(R.string.SDSMS_ID),
SDSmsManager.ACCESS_TYPE_MESSAGING);