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

'onSMSArrive' working only for different message arrival but not for same #65

Open
BJSingh opened this issue Mar 20, 2017 · 5 comments
Open

Comments

@BJSingh
Copy link

BJSingh commented Mar 20, 2017

My Device : Redmi Prime 3s (android 6.0.1)

when I send SMS with different value in message the onSMSArrive event triggered properly. But when I send new SMS with same value in repetition then onSMSArrive triggered only once and not for other successive messages.
After this if I send SMS with different value then again it triggers.

@ThorvaldAagaard
Copy link

It seems that is by intent as

onSMSArrive(JSONObject json)

contains

        if (from.equals(this.lastFrom) && content.equals(this.lastContent)) {
            return;
        }

@dilankamr
Copy link

dilankamr commented Oct 29, 2017

Hi All,

Did anyone find a solution for this issue?

@ThorvaldAagaard
Copy link

I think it is ok. I just added current timestamp as part of the message for my communication. Otherwise you can remove the above code in the JS-file

@dilankamr
Copy link

dilankamr commented Oct 31, 2017

My app receives consecutive duplicate messages and I need to detect it. So I cant do your first suggestion. But removing code segment is pretty good. Thank you for your suggestions. But I can't find any code like that you mentioned. Could you please mention the file name that I have to do changes.
Thanks

@ThorvaldAagaard
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants