Skip to first unread message

PATRICK OKELLO

unread,
Mar 13, 2018, 7:16:45 AM3/13/18
to MIT App Inventor Forum
Please Help, i want to make an app that can send gps coordinates of the its current location to another phone through sms. i have read tutorial on both sms and location but can't get it working

SteveJG

unread,
Mar 13, 2018, 8:44:48 AM3/13/18
to MIT App Inventor Forum
What have you tried Patrick?  What part is giving you problems?  Getting the GPS coordinates?  Composing the sms Message? Sending the Text message?

A developer has got to be careful doing this as the total message you send as an sms must be < 160 characters total (including spaces).  You can't get it working?   Where do you think the problem lies?

Here is some additional help:


1) Use the LocationSensor to get either the geocoordinates or the CurrentAddress.
Exploring with Location Sensor in AI2

The location sensor object is used to communicate with the global positioning satellite receiver (GPS) in your phone/tablet. When the LocationSensor communicates with the built-in GPS receiver, the GPS can determine the location of your device.  The sensor can also work with network/wifi location services.  Finding a location using the network uses very different techniques to determine a location. Location means, the device's present latitude and longitude or it can mean your street address.

There are two examples in this tutorial ...read the text, do a tututorial and you will know all you need to know about how the GPS receiver works.


2) Use the Texting component to send the sms message which will include the CurrentAddress or latitude and longitude .  Be aware, a Text message needs to be less than 160 total characters (including spaces) so don't get wordy.  




There are several SOS app examples in the MIT Gallery that do this.   Search the Gallery for  SOS   or   GPS Texting   or   GPS sms    There are many examples of apps of this type, some better than others that send a text message based on GPS coordinates.

An additional item to consider is your Phone sleeping.   If it goes to sleep, your messages will not be send, so you need to keep your device screen active while doing this; either keep a finger on your screen, use a Stay Awake routine to keep the screen on at the cost of excessive battery drain and heat your use an extension.

Sending the location is certainly possible.  Post an image of your blocks here in the Forum and someone will provide specific advice.

Regards,
Steve

PATRICK OKELLO

unread,
Mar 13, 2018, 9:24:00 AM3/13/18
to MIT App Inventor Forum
thank you steveJG, you have help me
Reply all
Reply to author
Forward
0 new messages