Texting.MessageReceived not triggering

582 views
Skip to first unread message
Assigned to andrew.f...@gmail.com by taifu...@gmail.com

rhga...@gmail.com

unread,
Dec 13, 2013, 2:30:39 PM12/13/13
to mitappinv...@googlegroups.com
If you are asking for technical help, you must provide the following information:
- Are you using MIT App Inventor Classic, MIT App Inventor 2, or something else (what?)
- What OS are you using? (e.g, MacOS 1.8, Windows 8, ...)
- What browser are you using (e.g, Chrome version 30, Firefox 24, IE 8, ...)
Also provide as much information as you can, such as screenshots and instructions that will let others duplicate the issue.

I'm using:
- AI2
- Windows 7, 64 bit
- Chrome 31.0.1650.63 m
- Samsung Galaxy S3 using the MIT AI2 Companion version 2.09ai2zx1

Program Components:
- Label (Label1) Text:Message Received
- TextBox (MessageReceivedTextbox) Text:(blank) Hint:No message received Multiline: true
- Texting (Texting1)

Blocks:
There is only one block: "when Texting1.MessageReceived do set MessageReceivedTextbox.Text to get messageText"

I send a text message from a different phone to the phone running the AI2 Companion. Google Hangouts gets the text message but the textbox in the application doesn't change.

I have done a reboot of the computer and phone and reconnected and get the same result.

Conjectures and attempted solutions:
Perhaps I'm misusing the textbox and should have used a label instead?
(OK, I'll test this... my block now says: when Texting1.MessageReceived do set Label1.Text to get messageText. Still not working.)
Perhaps the .MessageReceived is triggered but the message Text isn't working?
(OK, I'll test this too... my block now says: when Texting1.MessageReceived do set MessageReceivedTextbox.BackgroundColor to yellow, set Label1.text to get messageText. Nope, the textbox doesn't change color.)
Perhaps Google Hangouts is intercepting the text and not passing it on to the app?
Perhaps I'm missing an initialization block that sets up the connection between the hardware and the program (like we had to do in the old days)?

OK... I'm stuck. Does anyone have any suggestions?

Jos Flores

unread,
Dec 13, 2013, 3:20:48 PM12/13/13
to rhga...@gmail.com, mitappinventortest
Do you have receiving messages enabled (always?) in the properties of
the component?

cheers,
José
> --
> You received this message because you are subscribed to the Google Groups "MIT App Inventor Forum" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to mitappinventort...@googlegroups.com.
> To post to this group, send email to mitappinv...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/mitappinventortest/feae36bb-daf0-496b-b17e-0c57f7b3cd3f%40googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

Richard Gaskell

unread,
Dec 14, 2013, 5:08:09 PM12/14/13
to
Thanks for the reply José. 

This is still not working. Even when it is set on "Always" the block does not trigger.

It was on Forground and I just changed it to always. I sent a text message to the target phone and it still didn't trigger the block. 

Perhaps it is the AI2 Companion environment that is the problem? I'm trying to translate the "I'm driving" app developed for AI Classic to the AI 2 environment and, since I'm a noobie to this development tool, making lots of mistakes... er.... opportunities for learning... as a result!  :-)

Again, thanks for responding...

Richard

Richard Gaskell

unread,
Dec 14, 2013, 5:03:21 PM12/14/13
to mitappinv...@googlegroups.com
This issue has been marked "Answered" in error.

The texting block DOES NOT trigger when receiving a text even when the attributes of the text block is set to always.

Is this a problem with the AI2 interface? People using AI1 do not seem to have the same problem.

R

Hal Abelson

unread,
Dec 14, 2013, 8:08:57 PM12/14/13
to mitappinv...@googlegroups.com
Richard,

I've attached simple test program that it works on my phone  When it receives a text, it displays the text in a label.
If this does not work for you, perhaps your phone is not receiving texts,
texting.aia

Richard Gaskell

unread,
Dec 14, 2013, 10:37:24 PM12/14/13
to mitappinv...@googlegroups.com
Thank you for this!

At first it didn't work. Then I disabled Google Hangouts from displaying SMS messages and it started working right away.

Can anyone confirm the same thing happens on their phone (or is my phone an odd-ball)?

 In Google Hangouts / Settings/ SMS / "Turn on SMS" If unchecked lets this program work but if checked it stops working. I did do a restart of the phone after changing this setting - not sure if a restart is necessary.

Again, thanks for taking the time to make and send the program, Hal.

Richard

Hal Abelson

unread,
Dec 14, 2013, 10:55:46 PM12/14/13
to mitappinv...@googlegroups.com
Thanks for letting me know it worked.

I guess Google  Hangouts for the phone is implemented to just swallow the incoming texts, so that other texting apps don't see them.   If true, that's rather rude of it.   But now at least we know, if other App Inv users see this issue.  I'll add it to troubleshooting.

Yacopalko Koch

unread,
Jul 30, 2014, 12:20:27 AM7/30/14
to mitappinv...@googlegroups.com
I'm using:
- AI2
- Windows 7, 64 bit
- Firefox 30.0 en/ru
- Motorola Atrix4G android 2.3.6

Program Components:
- Label (Label1) Text:Message Received
- TextBox (MessageReceivedTextbox) Text:(blank) Hint:No message received Multiline: true
- Texting (Texting1)

Hello!

I`m using ai2 and ai1 with application, who must receiving message and show it on screen, but it not worked.

Uninstall not default sms applications is not help me. G.Hangouts settings not contain "turn on SMS", and logout of this program not help me too.

Messages not recieved by application. In android system all working well. I`m confused.

Pavel.

Taifun

unread,
Jul 30, 2014, 9:37:59 AM7/30/14
to mitappinv...@googlegroups.com
@Yacopalko: does it work for you to receive a text message, if your app is running?
Taifun

Taifun

unread,
Jul 30, 2014, 9:38:39 AM7/30/14
to mitappinv...@googlegroups.com
It would really help if you provided a screenshot of your relevant blocks, so we can see what you are trying to do, and where the problem may be.

Taifun

Trying to push the limits of App Inventor! Snippets and Tutorials from Pura Vida Apps by Taifun.         

Yacopalko Koch

unread,
Jul 31, 2014, 2:28:55 AM7/31/14
to mitappinv...@googlegroups.com
It doesn`t work with active running app and with background working app.
I`m test by app from Hal Abelson "texting", it contain only one block =when MessageReceived=.
Reply all
Reply to author
Forward
0 new messages