Question

I Try to send SMS in Phonegap 3.4 in background i use some plugin from Github https://github.com/aharris88/phonegap-sms-plugin

i got success for sending SMS but the problem is application call native messenger for sending SMS when i click Send button in my application then i get warning message in eclipse log :

VFY: unable to resolve static method 139: Landroid/provider/Telephony$Sms;.getDefaultSmsPackage (Landroid/content/Context;)Ljava/lang/String;

then

THREAD WARNING: exec() call to Sms.send blocked the main thread for 55ms. Plugin should use CordovaInterface.getThreadPool().

after that application Pause. and call native messenger for sending message.

thanks in advance.

Était-ce utile?

La solution

If you are on a Cordova Android Project

Following the example from de readme just change this: var intent = "INTENT"; //leave empty for sending sms using default intent.

To this: var intent = ""; //leave empty for sending sms using default intent

And you'll send a sms without using the native messenger.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top