Portals Android Update

The command processors are working as expected.  The Android sends a command request to the server at thomasofneedham.com/android/portals and the server answers back

Sample interaction:

First command is “init”

http://thomasofneedham.com/android/portals/portals_engine.php?android=newgame,init,,,,,,,,,

Response is to put Android in Roaming mode

httpResponse roamer,AVMW8Y,1,42.28067,-071.23669

Test Resume interrupted game:

ResumeGame android=resume,AVMW8Y,stuff,

httpResponse OC_Next,R8WTYJ,2,East,,,,,,grade7math.png,D
The Android then picks up where the game left off.

Currently working on MySQL database to store last command response.

2011-08-17 My surprise.  I had some perfectly good MySQL routines that I wanted to use on Portals.  I thought I only needed to change a few variables that had changed in the database.  No So!  This release of MySQL uses back-quote” `  ” to separate database column names whereas before single quotes worked fine.  It still uses single quotes on the data passed.  Previous flavors of MySQL allowed single quotes.  I don’t know what remote server would like.  After changing single quotes to back-quotes here and there the routines began to work as expected.

2011-08-22 Monday Debugging continued.  Had a strange MySQL error (valid gameid returning empty set)  This was a case for NuSphere debugger.  After a certain amount of setup fooling around,  debug_break() stopped at the right place in the code when the command was entered into the browser “http://localhost/thomasofneedham/android/portals/portals_engine.php?android=resume,R8WTYJJ,South”  It turns out I had the MySQL modules looking for the wrong variable.  NuSphere changes error tracking from a series of print statements to set a breakpoint where you think the offending logic begins and then single stepping through the program.

This entry was posted in androidpapers, basic4android, geocaching and tagged . Bookmark the permalink.