I want to send the MMS to some "anyemail@gmail.com", I tried my device mms service (using device sms app) and it worked. So now I'am tring to do the same using myapp. So, I landed up to cordova-MMS-Plugin.
But it gave some error MmsConfig.loadMmsSettings mms_config.xml missing uaProfUrl setting. So I looked in res/xml there was no mms_config.xml. So I downloaded it from git repo here, and put it in res/xml folder. But still the same error.
Here is My Code, this code contains only javascript I used to call send() for sending MMS with some arguments.
sendSMS = function (phoneNo, data) {
var that = this;
window.module.exports.send(phoneNo,data,undefined,undefined,function () {
that.smsSent();
},function (e) {
that.failed(e);
});
}
Here is MMS-PLUGIN js File sms.js
var sms = {
send: function(phone, message, imageFile, method, success, failure) {
phone = sms.convertPhoneToArray(phone);
cordova.exec(
success,
failure,
'Sms',
'send',
[phone, message, imageFile, method]
);
},
convertPhoneToArray: function(phone) {
if(typeof phone === 'string' && phone.indexOf(',') !== -1) {
phone = phone.split(',');
}
if(Object.prototype.toString.call(phone) !== '[object Array]') {
phone = [phone];
}
return phone;
}
};
sms.install = function () {
window.module.exports = sms;
}
cordova.addConstructor(sms.install);
Any body have any idea what I'm missing here. One more thing it works when I send to a mobileNo instead of email.
Aucun commentaire:
Enregistrer un commentaire