2014년 12월 2일 화요일

receive location info from other android phone

My goal is to receive the current location info from another andriod phone and plot this in a (google)map-app on my computer. I'm a beginner, not knowing where to start.
Already thanks for helping.



Start here Ries:

Tutorials:


AI2 free online eBook   http://appinventor.mit.edu/explore/ai2/tutorials.html   ... the links are at the bottom of the Web page.

The tutorials will teach you how to program.  Thefree book is a course in how to program with Ai2.

The Where is my car tutorial will show you one way to get a map.  The LocationSensor tutorial shows how to use the AI2 LocationSensor control.

To get a location to another phone?    You can take  LocationSensor.CurrentLocation    and send that value from your phone using an email or by sending an sms message (a text message) to the other phone.     Plotting, see where is my car for ideas or search this forum for  static map 

When you actually code some blocks and if you need advice, please return here, post a screen capture image of your blocks and someone will give advice.



Thank you for helpfull answer. One last question, is there a possibility to keep track of the location of the other phone continuesly instead of once via sms or mail?



Not possible via email without user intervention at the present with AI.  By sending text messages, you  might have the other device send a text message once every minute or so to your phone using a Clock timer, however if the phone goes to sleep, the app would stop sending.

This is a good project for you to experiment with.   You can test by starting a simple project called  SendSMSEveryMinute   using a clock component to send a text message "Hello there, are I not annoying?" to your phone.  Does it work?    And if it does, when does the texting stop? Are you familiar with Walt Disney's Sorcerer's Apprentice?   Think what happens when you deal with majic and you do not want to create malware?

Let us know what you discover?



Not possible via email without user intervention at the present with AI
for the simple email solutions using the Sharing component or the Activity Starter this is correct, but you also can send emails programmatically using a php server solution or the App Inventor - Gmail interface, see also here 

Different eMail solutions for App Inventor


Alternatively the other phone could store its location regularly in a fusiontable
then your phone could read the location from the fusiontable and display it in Google Maps
however as SteveJG said,  if the phone goes to sleep, the app would stop sending.



Thanks Taifun, do you know where I can learn about fusiontables?




Advice: Before posting, it's a good idea to search in this forum. Many others have likely run into problems similar to yours. How to search see screenshot.


댓글 없음:

댓글 쓰기