how to send location of one phone to another in app inventor

117 views
Skip to first unread message

nike

unread,
Aug 7, 2018, 10:42:40 AM8/7/18
to MIT App Inventor Forum
i want to build an app that can trace bus location by using drivers mobile location 
can it be possible to get location of driver by other person if yes then how????? 

SteveJG

unread,
Aug 7, 2018, 11:02:02 AM8/7/18
to MIT App Inventor Forum
Yes, this is possible.

It can be done by:

1) Drivers use their device to determine his/her location and post that information either to a Fusion Table  or  a Google Spreadsheet that others can access.
2) Drivers post their device location to a CloudDB or a FirebaseDB server and all users can share that information in real time.
3) Driver can continually post current location to be sent as an eMail or as an sms message (text)

There are other ways; the information can be posted to a FusionTable and displayed as a Fusion Table Map.

What have you tried so far nike?    Have you done any of the many LocationSensor tutorials?

To do what you want you need to learn to 
                1)  use the LocationSensor to determine the driver's location.
                2) collect the data in a Web accessible database (CloudDB using a Redis server, FirebaseDB using a Firebase server, a Fusion Table, a Google Spreadsheet.
                3)  allow others to share the Fusion Table and/or Google Spreadsheet so they can either view the locations on the spread sheet or post them on a map possibly using the Google Static Map API and a                                 WebViewer  or using the MIT Map component.

Specific advice requires knowing which potential solution you want to develop.

Regards,
Steve

nike

unread,
Aug 7, 2018, 12:06:49 PM8/7/18
to MIT App Inventor Forum
Thanks Steve
which would be best google spreadsheet or firebaseDB and how the information can be seen by others

SteveJG

unread,
Aug 7, 2018, 12:29:53 PM8/7/18
to mitappinv...@googlegroups.com
You have to determine that for yourself.

If a google spreadsheet is Shared, everyone having the link can see the information in a WebViewer or using a Browser to link to the sheet's GoogleDrive url.  Here you can have latitude/longitude coordinates, a street address .
There are several articles about using a GoogleSpreadsheet like a data base.  https://puravidaapps.com/spreadsheet.php   and  https://groups.google.com/forum/#!searchin/mitappinventortest/tim$20spreadsheet%7Csort:date/mitappinventortest/V_ppvsQkWNU/842Y_TDzBQAJ   will get you started.  Neither of these examples show how to use the location data; you have to adapt them.



All users of FirebaseDB share the latitude/longitude or street address in real time provide the same, identical apk is installed on all devices.

You should read about Firebase       Brief introduction to cloud data and the Firebase component   and http://kio4.com/firebase/1chat.htm    You would essentially build a Chat App that  shares the location information that you get from the LocationSensor.   Also  http://kio4.com/appinventor/8CChatfirebaseDB.htm

 

Juan Antonio

unread,
Aug 7, 2018, 12:40:59 PM8/7/18
to MIT App Inventor Forum

nike

unread,
Aug 7, 2018, 12:45:11 PM8/7/18
to MIT App Inventor Forum
thnxx it'll help me 

TimAI2

unread,
Aug 7, 2018, 1:05:34 PM8/7/18
to MIT App Inventor Forum
You might also consider this update to "Android Where's My Car", which uses cloudDB to store phone locations.


Just a bit of modification in order to share and store the data/locations correctly.... 
Reply all
Reply to author
Forward
0 new messages