cordova-sms / cordova-sms-plugin

Cross-platform plugin for Cordova / PhoneGap to send SMS. Available for Android, iOS, and Windows Phone 8.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Android immediately passes success back to app?

jnorris441 opened this issue · comments

commented

The iOS composer waits to see if the message was sent or cancelled and fires the right callback. The Android version immediately fires success whether they end up sending or not.

There is not a way to make Android behave like iOS correct?

(this is using INTENT)

Hi @jnorris441,

Unfortunately, this is a limitation of Android right now, we can't get the result after starting the new activity.

We are using ACTION_SEND or ACTION_VIEW and these intents won't return results.

see
https://developer.android.com/reference/android/content/Intent.html#ACTION_VIEW (output: nothing)
https://developer.android.com/reference/android/content/Intent.html#ACTION_SEND (output: nothing)

It's been more than a year, has this got any fix yet? I'm facing this issue and my app cannot work properly without this callback triggering correctly on iOS.

This issue is about Android. Android did not change it is way of handling callback. If you are having an iOS issue, feel free to open a new one.

So is this issue considered working as intended/not going to fix/only Android OS can fix? Running into the same issue with immediate success callback on the Android platform.

hello @pixelpuffpastry,

Yes, unfortunately nothing has changed over the years. Please refer to #26 (comment).

Ah - thanks for the quick reply!

@dbaq is this a possible solution?

That's interesting, definitely seems complex but would deserve some digging.

@dbaq Any update on callback for android?

@umairrafiq1133 nothing on the android front.

Hi @dbaq any update on the android callback?

hey @dshark95, as far as I know, it remains the same on Android.