Skip to content
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

can't send multiparts message with intent = '' #7

Closed
dbaq opened this issue Feb 5, 2015 · 8 comments
Closed

can't send multiparts message with intent = '' #7

dbaq opened this issue Feb 5, 2015 · 8 comments

Comments

@dbaq
Copy link
Member

dbaq commented Feb 5, 2015

A pull request has been merge a few months ago agarrharr/phonegap-sms-plugin#40

it does not work if the intent value is empty.

@dbaq dbaq changed the title sms length only 160 characters can't send multiparts message with intent = '' Feb 12, 2015
@dbaq dbaq self-assigned this Feb 12, 2015
@dbaq dbaq added bug and removed bug labels Feb 12, 2015
@radiegtya
Copy link

Can You give the working code and add it to the documentation? And why should I use intent? I want direct send message :)

@dbaq
Copy link
Member Author

dbaq commented Feb 12, 2015

If you want to send a message without opening the default intent, you have to set the intent value to empty (intent='').

So if you're sending multiparts message (more than 160 characters), we need to add the following permissions in the AndroidManifest.xml:
<uses-permission android:name="android.permission.READ_PHONE_STATE" />

I need to understand now why the callback method is called multiple times now (1 time per part of the message)

@dbaq
Copy link
Member Author

dbaq commented Feb 12, 2015

hey @radiegtya, I pushed a fixed on a branch https://github.com/cordova-sms/cordova-sms-plugin/tree/wip_android_refactoring, it is fixing the issue with multiparts message in the default intent. And just one callback is fired when all the parts have been sent.

Since I refactored a big part of the android code, please test and let me know if it is working properly.

Install the new version by doing that:

cordova plugin rm org.apache.cordova.plugin.sms
cordova plugin add https://github.com/cordova-sms/cordova-sms-plugin.git#wip_android_refactoring

let me know.

cheers

@dbaq
Copy link
Member Author

dbaq commented Feb 16, 2015

@radiegtya, thanks for answering the following questions:

  • how are you testing?
  • which device?
  • which android version?
  • can you share your code?
  • what is the error?
  • how can I reproduce it?

@radiegtya
Copy link

Hi @dbaq, I'll answer Your questions:

  • how are you testing?
    I am using meteor Js and cordova, so I just add the plugin and run it, when I am clicking sending button , it's not working
  • which device?
    lg optimus l9
  • which android version?
    honeycomb 3
  • can you share your code?
    The code just exactly like what I was commented above
  • what is the error?
    as I said, I can't see the error message, because I am directly install it on my phone rather using emulator. My Emulator cannot sending sms. lOl
  • how can I reproduce it?
    Thats the part that I don't know. :D

@agarrharr
Copy link
Member

Here's how you can get the javascript console when running Cordova on your device so that you can see the error: http://www.adamwadeharris.com/remote-debugging-in-phonegap-with-chrome-devtools/

@dbaq
Copy link
Member Author

dbaq commented Feb 24, 2015

@radiegtya did you make it work?

@dbaq
Copy link
Member Author

dbaq commented Mar 3, 2015

Closing this one. Feel free to reopen if the problem persists.

@dbaq dbaq closed this as completed Mar 3, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants