Skip to content

Commit 5330a32

Browse files
committed
android calls the success callback no matter what, if using the default INTENT instead of passing NO_RESULT.
1 parent f73344b commit 5330a32

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/android/Sms.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ public boolean execute(String action, JSONArray args, final CallbackContext call
4343

4444
if (method.equalsIgnoreCase("INTENT")) {
4545
invokeSMSIntent(phoneNumber, message);
46-
// the result is always false, so better pass no result for clarity
47-
callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.NO_RESULT));
46+
// always passes success back to the app
47+
callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK));
4848
} else {
4949
// by creating this broadcast receiver we can check whether or not the SMS was sent
5050
if (receiver == null) {

0 commit comments

Comments
 (0)