Page 1 of 2 12 LastLast
Results 1 to 20 of 25
  1. Ikyo's Avatar
    Posts
    290 Posts
    Global Posts
    292 Global Posts
       #1  
    I looked at some of the GPS apps that are out and about right now. I must say that I love this device because it was easy to work with even on my first night. I created an app that looks at text messages that you receive then replies with information about your phone to it based on: <secret word> <email address>. I also created a web page that will show you where your phone is and other information. Would people be interested in that?
  2. #2  
    Sure, very interested.

    So you basically put the stuff from Patch webOS GPS Tracking - WebOS Internals into a homebrew app?

    Sounds great.
  3. Ikyo's Avatar
    Posts
    290 Posts
    Global Posts
    292 Global Posts
       #3  
    I took that script and modified it to allow for more input. I also changed it to run under Apache & PHP on the phone so it can generate real time data.
  4. #4  
    Consider me "interested", definitely.
  5. Ikyo's Avatar
    Posts
    290 Posts
    Global Posts
    292 Global Posts
       #5  
    Do you already have apache running on your phone along with cron? Let me know what you have and I can send you over what you will need and how to add it in.
  6. #6  
    Another member, jsabo, was also going to work on something like this.

    http://forums.precentral.net/web-os-...date-wiki.html

    I would love to see what up come up with.
    Systems Analyst by trade, Drummer by desire and Music Lover by birth. A self proclaimed Geek and gadget nut. ii

    Did you know: The Pittsburgh Steelers have more championships than 21 other NFL teams combined!
    Pittsburgh Steelers-6 Time Super Bowl Champions!

    Pittsburgh Penguins-3 Time Stanley Cup Champions!
  7. Ikyo's Avatar
    Posts
    290 Posts
    Global Posts
    292 Global Posts
       #7  
    I will post up the files here in a little bit after I get a few more posts. I need 10 total to post it.
  8. Ikyo's Avatar
    Posts
    290 Posts
    Global Posts
    292 Global Posts
       #8  
    For those of you wanting to run my web scripts, make sure you have Apache and PHP installed on your phone. I would also suggest setting dyndns so you can easily access your phone. It is pretty straight forward to set them up. You only have to edit one line in the apache config to include the php config file.
  9. #9  
    Instead of feeding the information local to the phone, requiring a local web server running on it, would it not be easier to simply FTP the info onto a web server someplace online?

    You could still then view it on the Pre's browser.
    Systems Analyst by trade, Drummer by desire and Music Lover by birth. A self proclaimed Geek and gadget nut. ii

    Did you know: The Pittsburgh Steelers have more championships than 21 other NFL teams combined!
    Pittsburgh Steelers-6 Time Super Bowl Champions!

    Pittsburgh Penguins-3 Time Stanley Cup Champions!
  10. Ikyo's Avatar
    Posts
    290 Posts
    Global Posts
    292 Global Posts
       #10  
    It could be done, but I don't want to open up to any of my machines at the moment and have the code out. It would honestly be 6 of one and half a dozen of the other. The only real way to do that would be almost create a signup for people and it would create a special file for the software with username and such. It could be done if we wanted to create something really close to Family Locator. I guess we need to see if people would rather have a web server running on the phone or FTP the information to a website with a cron daemon or something similar.
  11. Ikyo's Avatar
    Posts
    290 Posts
    Global Posts
    292 Global Posts
       #11  
    Here is the CRON task for Text Messages:

    Code:
    SECRET=r00tm3
    
    track()
    {
       pos=$(luna-send -n 3 palm://com.palm.location/startTracking '{"appId": "ILovePalm", "subscribe": true}' 2>&1 | tail -1)
       pos=$(echo $pos | sed -r 's/[^-\.0-9,]//g')
       
       lat=$(echo $pos | cut -d, -f4)
       lon=$(echo $pos | cut -d, -f5)
       hed=$(echo $pos | cut -d, -f7)
       spd=$(echo $pos | cut -d, -f8)
       alt=$(echo $pos | cut -d, -f9)
       bat=$(grep BATTERY: /var/log/messages | tail -1 | awk '{print $8}' | sed 's/%,//')
       now=$(date)
       
       DEST=$(echo $output | grep -o "[[:graph:]]*@[[:graph:]]*")
          if [ $DEST = null ]; then
             DEST=jodypalmpre@gmail.com
          fi
    
      #msg2=$(echo $now Speed:$spd  Battery Level:$bat  URL http://maps.google.com/maps?q=$lat%2C$lon)
      msg=$(echo "http://maps.google.com/?ie=UTF8&q=$lat,$lon+(Heading:%20$hed%0DSpeed:%20$spd%20mph%0DAltitude:%20$alt)")
      #echo $msg                                                													
      luna-send -n 1 palm://com.palm.messaging/sendMessageFromCompose '{"recipientJSONArray": [{"value": "'${DEST}'", "contactDisplay": "'${DEST}'", "prefix": "to$A", "identifier": "palm_anon_element_8"}], "messageText": "'"$msg"'"}' 2>&1
    }
                                                    														
    checkmsg()
    {
       echo ".timeout 30000" > /tmp/trackersql
       cmd='SELECT messageText FROM com_palm_pim_FolderEntry WHERE timeStamp > (strftime("%s000", "now")-600000);'
       output=$(echo $cmd|sqlite3 -init /tmp/trackersql /var/luna/data/dbdata/PalmDatabase.db3)
       echo $output|grep $SECRET 2> /dev/null > /dev/null
       status=$?
                                                    														                                        
       if [ $status = 0 ]; then
          track
       fi
    }
    
    checkmsg
    Here are the files that are called by the PHP script:

    Code:
    #!/bin/sh
    pos=$(/home/scripts/luna-send -n 2 palm://com.palm.location/startTracking '{"appId": "ILovePalm", "subscribe": true}' 2>&1 | tail -1 | cut -d, -f4,5,8 | sed -r 's/[^-\.0-9,]//g')
    
    lat=$(echo $pos | cut -d, -f1)
    lon=$(echo $pos | cut -d, -f2)
    spd=$(echo $pos | cut -d, -f3)
    bat=$(grep BATTERY: /var/log/messages | tail -1 | awk '{print $8}' | sed 's/%,//')
    now=$(date)
    msg=$(echo "http://maps.google.com/?ie=UTF8&q=$lat,$lon+(Heading:%20$hed%0DSpeed:%20$spd%20mph%0DAltitude:%20$alt)")
    #Build message content to be sent
    echo 'Speed:' $spd '  Battery Level:'$bat'  URL: '$msg
    exit
    Code:
    #!/bin/sh
    pos=$(/home/scripts/luna-send -n 2 palm://com.palm.location/startTracking '{"appId": "ILovePalm", "subscribe": true}' 2>&1 | tail -1 | cut -d, -f4,5,8 | sed -r 's/[^-\.0-9,]//g')
    
    lat=$(echo $pos | cut -d, -f1)
    lon=$(echo $pos | cut -d, -f2)
    spd=$(echo $pos | cut -d, -f3)
    bat=$(grep BATTERY: /var/log/messages | tail -1 | awk '{print $8}' | sed 's/%,//')
    now=$(date)
    
    #Build message content to be sent
    msg=$(echo "http://maps.google.com/?ie=UTF8&q=$lat,$lon+(Heading:%20$hed%0DSpeed:%20$spd%20mph%0DAltitude:%20$alt)")
    echo $msg
    #echo 'http://maps.google.com/maps?q='$lat'%2C'$lon
    exit
  12. #12  
    Quote Originally Posted by Ikyo View Post
    It could be done, but I don't want to open up to any of my machines at the moment and have the code out. It would honestly be 6 of one and half a dozen of the other. The only real way to do that would be almost create a signup for people and it would create a special file for the software with username and such. It could be done if we wanted to create something really close to Family Locator. I guess we need to see if people would rather have a web server running on the phone or FTP the information to a website with a cron daemon or something similar.
    No I am saying let us FTP it to a web server WE own. We can install and run it ourselves or just have a hosted one. This way we can access the application from the Pre or any web server which is good if we lost the Pre in the first place. I mean if we want to track the Pre what good is having it only have local web pages?

    Installing Apache on the Pre seems a bit overkill man. That has to be a lot of bog down for basically not much return you know... ii
    Systems Analyst by trade, Drummer by desire and Music Lover by birth. A self proclaimed Geek and gadget nut. ii

    Did you know: The Pittsburgh Steelers have more championships than 21 other NFL teams combined!
    Pittsburgh Steelers-6 Time Super Bowl Champions!

    Pittsburgh Penguins-3 Time Stanley Cup Champions!
  13. Ikyo's Avatar
    Posts
    290 Posts
    Global Posts
    292 Global Posts
       #13  
    I will see what I can do with that. Do you just want it to do it at x intervals?
  14. #14  
    Maybe have it start Uploading data on a special text message. A way to send one text message to start it tracking and one to turn it off. Maybe even tell it how often to update in the text message. Have the text message scrabbled somehow so the person who has the Pre would have no clue what it was.

    Then you could have it do all kinds of cool map tracking etc.. from the web page as you keep improving the code etc...

    Ideally at some point in the future we could have an easy way to have a server that Pre users can log into and just track it once the text message is sent etc... That way users that do not want to deal with running their own server could still use it but this is down the road.
    Systems Analyst by trade, Drummer by desire and Music Lover by birth. A self proclaimed Geek and gadget nut. ii

    Did you know: The Pittsburgh Steelers have more championships than 21 other NFL teams combined!
    Pittsburgh Steelers-6 Time Super Bowl Champions!

    Pittsburgh Penguins-3 Time Stanley Cup Champions!
  15. Ikyo's Avatar
    Posts
    290 Posts
    Global Posts
    292 Global Posts
       #15  
    I will see how we can handle it. It shouldn't be too difficult. I will just have to work on the script a little bit. It will also need cron running.
  16. #16  
    Sweet. This is what I have been waiting for. I like Paladins ideas on "programming" the script remotely.
  17. Ikyo's Avatar
    Posts
    290 Posts
    Global Posts
    292 Global Posts
       #17  
    I am thinking it might be a little easier to do a MySQL update from the phone to a server. That way you could just build a page that will pull the information based on that. If you do something with FTP, it will require more work on the server side to move/translate it around.
  18. #18  
    Quote Originally Posted by Ikyo View Post
    I am thinking it might be a little easier to do a MySQL update from the phone to a server. That way you could just build a page that will pull the information based on that. If you do something with FTP, it will require more work on the server side to move/translate it around.
    That might work. How would the MySQL information get to the server if not FTP?
    Systems Analyst by trade, Drummer by desire and Music Lover by birth. A self proclaimed Geek and gadget nut. ii

    Did you know: The Pittsburgh Steelers have more championships than 21 other NFL teams combined!
    Pittsburgh Steelers-6 Time Super Bowl Champions!

    Pittsburgh Penguins-3 Time Stanley Cup Champions!
  19. Ikyo's Avatar
    Posts
    290 Posts
    Global Posts
    292 Global Posts
       #19  
    You would just allow remote connections into the server. It isn't that hard at all. You would just specify a host instead of doing it on the Pre. I don't have a dedicated linux box any more. I think I setup MySQL on one of my macs. I will do some checking today.
  20. #20  
    Quote Originally Posted by Ikyo View Post
    You would just allow remote connections into the server. It isn't that hard at all. You would just specify a host instead of doing it on the Pre. I don't have a dedicated linux box any more. I think I setup MySQL on one of my macs. I will do some checking today.
    Oh that makes sense, what was I thinking... ii
    Posted too early maybe heheh ii

    Anyway thanks for working on this with me, idea wise anyway.. Wish I could help more.
    Systems Analyst by trade, Drummer by desire and Music Lover by birth. A self proclaimed Geek and gadget nut. ii

    Did you know: The Pittsburgh Steelers have more championships than 21 other NFL teams combined!
    Pittsburgh Steelers-6 Time Super Bowl Champions!

    Pittsburgh Penguins-3 Time Stanley Cup Champions!
Page 1 of 2 12 LastLast

Posting Permissions