User Tools

Site Tools


install

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
install [2014/03/27 14:31]
superdupersms
install [2015/01/05 02:37]
superdupersms
Line 101: Line 101:
  
 In this example, the intent is processed and will be passed back to SDMM unless the callback returns a value of "​true"​ - indicating that your app aborted the SMS broadcast. In this example, the intent is processed and will be passed back to SDMM unless the callback returns a value of "​true"​ - indicating that your app aborted the SMS broadcast.
 +
 +9. **(New with SDK 0.95) - BETA Feature: SDMM is NOT the Default SMS App**
 +
 +To try to use your app **without** SDMM as the default messaging app, you must do the following:
 +
 +Remove your "​abort"​ call if SDMM is installed. Only perform the SDMM "​abort"​ if SDMM is not installed except on the SDMM Duplicate message. ​
 +
 +SDMM will send a duplicate SMS_RECEIVED message to your app. To properly abort a message, you should **not** abort the original message. In Android KitKat+, an app is **not** supposed to be able to abort the SMS_RECEIVED intent, but on some (or all) platforms it can. If it does, then SDMM will not receive any notice of the SMS_RECEIVED (but the Default SMS App **will** get the SMS_DELIVERED intent). This is not how the documentation says it should perform, so it may not do this on your test device.
 +
 +To allow for appropriate processing, your app should **not** abort the SMS_RECEIVED intent. Then, SDMM will query your app with a duplicate SMS_RECEIVED intent and that intent should return the ABORT flag to SDMM as demonstrated here:
 +
 +<java code>​ String sdsmsDup = "";​
 +
 + // look for this string for the duplicate SMS_RECEIVED broadcast
 + if (intent.hasExtra(SDSmsConsts.SDSMS_DUPLICATE)) sdsmsDup = SDSmsConsts.SDSMS_DUPLICATE;​
 +
 + // then check if the SMS_RECEIVED intent is an SDMM duplicate
 + // then indicate the abort accordingly
 + if (SDSmsConsts.SDSMS_DUPLICATE.equals(sdsmsDup)) {
 + // this code will abort the message in SDMM
 + //
 + Log.i(TAG,​ "​aborting intent for SDSMS"​);​
 + setResultCode(0);​
 + setResultData(SDSmsConsts.SDSMS_ABORT);​
 + intent.putExtra(abort,​ true);
 + Log.i(TAG,​ "​SDSmsManager found, duplicate intent signal for abort"​);​
 +
 + } else if (!SDSmsManager.isSdsmsIntstalled()) {
 +
 + // insert your code to abort intent for non-KitKat+ devices
 + //
 + Log.i(TAG,​ "​SDSmsManager not found, aborting message"​);​
 + }
 +</​code>​
 +
 +This will appropriately signal SDMM to abort the SMS_RECEIVED intent. When SDMM is not the default, you should not abort the broadcast in order for SDMM to process the intent appropriately.
 +
 +This is currently a **BETA** feature. Please test this since we do not have all devices available. Also, be aware that SDMM will attempt to dismiss any notifications related to the SMS. It my "​roll"​ and the ticker message may be visible, but it should dismiss before being available in the notification drawer. However, we are working on improving the response time so that it will dismiss prior to even being displayed. It may be advisable to warn your users. (We are working on standard messaging for this.)
 +
install.txt ยท Last modified: 2015/01/05 02:37 by superdupersms