Skip to first unread message

Eldad Yekutiel

unread,
Jul 2, 2014, 1:22:33 PM7/2/14
to mitappinv...@googlegroups.com
Please need help !
I try to send or receive text messages but everything I do fails.
I'm using ready procedures and it also does not work.
I tried the prepared sample "notext"
I Also tried notext apk and it didn't work

Asks for help

Mr. Eldad Yekutiel
          Tel-Aviv

Taifun

unread,
Jul 2, 2014, 2:55:21 PM7/2/14
to mitappinv...@googlegroups.com
what exactly does not work?
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.         


Eldad Yekutiel

unread,
Jul 4, 2014, 2:18:13 AM7/4/14
to mitappinv...@googlegroups.com


First thanks for your reply

As I mentioned in my prior notice i tried the example i found in your guidance

Here is a screenshot  with the blocks 

Again i thank you for your help and hope to resolve the problem



SteveJG

unread,
Jul 4, 2014, 9:29:34 AM7/4/14
to mitappinv...@googlegroups.com
It is difficult to read your blocks Eldad.. the image is a bit fuzzy.

Have you tried this AI2 tutorial?   http://www.appinventor.org/NoTexting2  :   it may help.

I can not read your blocks, so I am guessing what the issue might be: it appears you are using texttospeech.   Did you notice to use texttospeech, phones 
need:

For this app to work, you need a text-to-speech module, Text-To-Speech Extended, on your phone. This module is included in Android version 2 or higher, but if you are running an Android 1.x operating system, you'll need to download it from the Android Market. On your phone:

  1. Open the Market app.
  2. Search for TTS.
  3. Select the app Text-To-Speech Extended to install.

Simple texting is not very difficult to set up, you do not need the speech module.

Texting

A component that will, when the SendMessage method is called, send the text message specified in the Message property to the phone number specified in thePhoneNumber property.

If the ReceivingEnabled property is set to 1 messages will not be received. If ReceivingEnabled is set to 2 messages will be received only when the application is running. Finally if ReceivingEnabled is set to 3, messages will be received when the application is running and when the application is not running they will be queued and a notification displayed to the user.

When a message arrives, the MessageReceived event is raised and provides the sending number and message.

An app that includes this component will receive messages even when it is in the background (i.e. when it's not visible on the screen) and, moreso, even if the app is not running, so long as it's installed on the phone. If the phone receives a text message when the app is not in the foreground, the phone will show a notification in the notification bar. Selecting the notification will bring up the app. As an app developer, you'll probably want to give your users the ability to control ReceivingEnabled so that they can make the phone ignore text messages.

If the GoogleVoiceEnabled property is true, messages can be sent over Wifi using Google Voice. This option requires that the user have a Google Voice account and that the mobile Voice app is installed on the phone. The Google Voice option works only on phones that support Android 2.0 (Eclair) or higher.

To specify the phone number (e.g., 650-555-1212), set the PhoneNumber property to a Text string with the specified digits (e.g., 6505551212). Dashes, dots, and parentheses may be included (e.g., (650)-555-1212) but will be ignored; spaces may not be included.

Another way for an app to specify a phone number would be to include a PhoneNumberPicker component, which lets the users select a phone numbers from the ones stored in the the phone's contacts.

Properties

GoogleVoiceEnabled
If true, then SendMessage will attempt to send messages over Wifi using Google Voice. This requires that the Google Voice app must be installed and set up on the phone or tablet, with a Google Voice account. If GoogleVoiceEnabled is false, the device must have phone and texting service in order to send or receive messages with this component.
Message
The message that will be sent when the SendMessage method is called.
PhoneNumber
The number that the message will be sent to when the SendMessage method is called. The number is a text string with the specified digits (e.g., 6505551212). Dashes, dots, and parentheses may be included (e.g., (650)-555-1212) but will be ignored; spaces should not be included.
ReceivingEnabled
If set to 1 (OFF) no messages will be received. If set to 2 (FOREGROUND) or3 (ALWAYS) the component will respond to messages if it is running. If theapp is not running then the message will be discarded if set to 2(FOREGROUND). If set to 3 (ALWAYS) and the app is not running the phone willshow a notification. Selecting the notification will bring up the appand signal the MessageReceived event. Messages received when the appis dormant will be queued, and so several MessageReceived events mightappear when the app awakens. As an app developer, it would be a good idea to give your users control over this property, so they can maketheir phones ignore text messages when your app is installed.

Events

MessageReceived(text number, text messageText)
Event that's raised when a text message is received by the phone.

Methods

SendMessage()
Send a text message


Here is a VERY simple (it is in AI Classic) example you could try:   http://coxydave.blogspot.com/2011/02/android-app-inventor-simple-sms.html     It should be possible to convert this to AI2 with out a lot of effort.

Regards,
Steve



Taifun

unread,
Jul 4, 2014, 10:08:21 AM7/4/14
to mitappinv...@googlegroups.com
you are currently mixing 2 different things:

to send a message, use a button.click event with the folowing blocks
set texting.phonenumber = <number you want to send the SMS to>
set texting.message = <the message text>
call texting.sendMessage

to receive a message, use the texting.messageReceived block and display the number and message in a label
Taifun

Eldad Yekutiel

unread,
Jul 6, 2014, 2:40:58 AM7/6/14
to mitappinv...@googlegroups.com
Hello and thank you for your reply
I tried to do everything you said but I could not send a message or receive a text message
I have a Galaxy 4S And I can do all the examples from your site apart from sending or receiving a text message
Attached here is the example I am trying to run
I also tried the basic examples and nothing works
I do not understand what is wrong
Thanks again for your help and patience
Hope you find a solution to my problem
Mr. Eldad Yekutiel
Tel Aviv
Israel
notextNOTworking.aia

Eldad Yekutiel

unread,
Jul 6, 2014, 6:54:11 AM7/6/14
to mitappinv...@googlegroups.com
Hello
Finally I found the problem why I didn't succeed to send and receive text messages
In fact the codes were OK And the cause of the problem in sending messages is the need to install the app on the phone
That during installation the application gets approval for sending and receiving messages
Enclose here two screenshots that show the installation process
I want to know is it possible to bypass the need to install To test the application?
Thanks in advance
Screenshot_apk install 1.png
Screenshot_apk install 2.png
Reply all
Reply to author
Forward
0 new messages