-
Notifications
You must be signed in to change notification settings - Fork 165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding Support for MMS #14
Comments
Hey @christyrajupaul, thank you for opening this issue. I will look into it. |
+1 ! |
+1 |
2 similar comments
+1 |
+1 |
Quick question: what type of documents you guys want to attach? images? videos? audios? |
I just want to be able to send multiple recipients. I believe that MMS is required for that, correct? |
yes for android (if you want to start a group message) |
I want to attach an image. Thx @dbaq |
Alright guys, I would like some feedbacks on the new JS API for this plugin. Here is what I want to do: Two functions to improve readability and avoid confusion:
Another question: would you guys be interested if I expose some functions to test the availability of the features (i.e. canSendSMS() and canSendMMS()) ? Feedbacks highly appreciated. Thanks. |
I think what you outlined works well. I worry about backwards compatibility if you change the api to sendSMS. Can you keep send and forward it to sendSMS? |
Yep already thought about that. Look at this commit: |
I am sorry to say that I do not really like this idea. The telecom industry has made efforts towards unified messaging, see: http://en.wikipedia.org/wiki/Unified_messaging; iOS was a nice example 8 years ago. Better to add to the |
@dbaq I agree with @brodybits Can't we keep the old function "sms.send()" and count on |
Alright alright, that seems a good argument as well + no need to update your current implementations. I will do a first iteration on a branch for iOS over the weekend. So does everybody agree on:
If there are some attachments or if recipients is an array, a MMS will be sent. Otherwise, it will be a regular SMS. |
Sounds perfect :) |
Thanks 👍 |
Beautiful |
I would actually suggest some form of an override option, in case someone wants to send MMS to a single recipient with no attachments, for example. (Existence of an attachment would definitely eliminate the SMS option.) |
Another reason you might also want an override option is because you might want to send single sms messages to multiple recipients. |
@brodybits what would be the use case? Why would you want to send a MMS without attachment to a single number? @Aharris88, I really don't like this idea of sending a single SMS to multiple recipients. It complexifies the code of the plugin (especially for android without starting the composer), what do you return if there is an error for the nth recipient? should you stop at the first error? should you move on to the next one? which callback do you call? Instead the developer can simply iterate over an array and call the method with a single phonenumber. |
On May 29, 2015 7:29 PM, "Didier Baquier" [email protected] wrote:
IMHO we should be very careful. We never know what people will need for a My vote would be to have the simplest API, always with a manual override if My $0.02 worth. |
Definitely, I want to provide the simplest and the less confusing API possible. This parameter can always be added later if needed by somebody. I am going to stick with #14 (comment) for the first iteration. |
I think that's a good call and the easiest to implement. I don't think the 2 edge cases we mentioned are worth supporting. |
You guys can follow the development on the https://github.com/cordova-sms/cordova-sms-plugin/commits/WIP_MMS_support branch. I will come back to you when I got something stable on iOS. |
Can somebody pleeease make this happen for Android? I wish I could help but I don't know any java. I believe you need MMS support if you want to send to an e-mail, right? Also, attachments feature would be nice to have... |
@dbaq while I know true MMS support is long off, above you mentioned adding image for android. Is it possible to send an image via android with no intent ? I would love to add that feature to my app, let me know thanks. |
hi guys ... tryed today to send to multiple recipients so I used an array like ['number1','number2] and managed to receive the message only at number1 recipient. If I changed ['number2','number1] i recieved the message only at number2. So clearly it sends only to first element of array. Do you have in mind a solution for the multiple recipients ? |
soooo... no mms support? |
I need to verify the phone no.after success I need to track the sender phone no |
@amirul1000 Please open a new issue. 😄 This issue is about mms support. |
Whats the status of the current effort?
I am not a java guy, but for attachments to native Android and iOS composers, could elements from the cordova-plugin-email code be reused for attaching images for native MMS apps? I am using that plugin and attaching images to native email composers works just fine...I was skimming through that plugin to see the attachment code - but I have no idea if that could be reused here for MMS purposes. I reached out to the owner of cordova-plugin-email to see if he might be able to help or contribute. |
@rolinger I believe that there is currently no one working on this, but contributions are welcome. 😸 |
Yep, there is a branch with some dev on it. iOS is pretty much straightforward (multiple recipients + attachments) because we are simply using their APIs. On the other hand, Android is a pain to manage. A lot of different composers + intent vs no intent use case. PRs are welcome if you would like to help. |
Hi - I'm not a github/plugin expert but I managed to merge this plugin with plugin https://github.com/christyrajupaul/Phonegap-MMS-Plugin. With this merge, I can send MMS from Android, no problem. These files do not work with iOS. I start with this great plugin, change two files, and I'm done. I recently verified it works in Android 7 and 8 but of course, with Android permission changes, I have to include https://github.com/NeoLSN/cordova-plugin-android-permissions and have the user allow The first file attached is ../platforms/android/platform_www/plugins/cordova-sms-plugin/www/sms.js and the second file is ../platforms/android/src/com/cordova/plugins/sms/Sms.java. I hope I'm not forgetting anything! Good luck. - Jon |
@jondspa - for permissions, I use cordova-plugin-diagnostic - it has everything you need for both iOS and Android Can you please post the link to the new merged plugin? Maybe some one who knows Xcode can analyze what you have done for Android and create the iOS version. This is closer than anyone else has gotten thus far. |
Thanks, I'll look into cordova-plugin-diagnostic. For iOS, I just use this version of the plugin, which works great! https://github.com/cordova-sms/cordova-sms-plugin.git#WIP_MMS_support For Android, I left off the new calling scheme. Here's a snippet from my code:
|
Thanks to the both of you. Before someone opens a PR, we should agree on the API. It should be consistent between iOS and android. I made some propositions in the past (see #14 (comment)). |
I have installed the plugin recently, but it still only accept 3 arguments. |
@AramVave - this plugin still is sms only. @jondspa - your above link simply points back to this same If we can get it working for iOS too then we can fork a whole new Thanks. |
@rolinger I believe the MMS feature should not be a fork, it should be included in this repo. It is a fairly popular request. |
@dbaq - roger that. |
@dbaq Are you working on the changes necessary for MMS to be included in this repo? Three years later is slightly demotivating. I think some changes would be better than no changes and that if anyone has problems with the design of the API they can submit a PR in the future or open an issue. |
hello @AugusDogus, As I mentioned before, I have no time to work on new features (I only fix blocking issues). If you want to contribute, feel free to open a PR. To be consistent, the PR should contain a working solution for both iOS and android. Thank you. |
hello @dbaq |
hey @Eugenizer, thanks for pointing this branch out. It looks like the android code is not ready yet: String saveFilePath = Environment.getExternalStorageDirectory() + "/HealthAngel";
File dir = new File(saveFilePath);
if (!dir.exists()) {
dir.mkdirs();
}
File file = new File(dir, "logo.png"); |
hello @dbaq |
@dbaq are you able to merge in @Agent00krosh fixes? I am having the same issue. I may also have an additional improvement. The dispatch_async(dispatch_get_main_queue() takes a few seconds the first time it is called, by moving MFMessageComposeViewController into the main_queue the delay is gone |
Please open a PR when the code is ready to be reviewed. We can then decide whether or not we want to include this feature in this repo. |
how about this pr? #224 |
Adding support for MMS. Send MMS via this plugin.
The text was updated successfully, but these errors were encountered: