ICSP - AppInventor Lecture 3 - B

Protocol specifications
  • Requesting to store a player's move, SetValue
    ● Use the player name as the key
    ● Use the choice name as the value
  •  Requesting a list of opponents, GetValue
    ● Use the key “GET_OPPONENTS”
    ● Query returns a string value of opponent names joined by “&”
    ● E.g. Request “GET_OPPONENTS” returns “Rick&Piper”, i.e. Rick and Piper are possible opponents
    ● Usefull blocks for handling data transfer is – “split”, splits a string at a specific delimiter
  •  Requesting a player move, GetValue
    ● Use the player name as the key
    ● E.g. Request “Rick” returns the value of Rick's move
Initialize
  • Define variables                             
  • Assign values to variables
  • Create the initial screen   
Create Register Functionality
  • Register button click
  • Database communication when getting a value
  • Notification
Store a Move
  • Button choice behaviour
  • Storing move in data base
Chose Opponents 



  • Methods after picking
  • Calculating the result


























Improvements of Rock, Papers or Scissors

  • Disallow duplicate names
  • Improve security e.g. Database injection
  • Handle invalid values
  • Return player to start when a move is stored
  • Remove moves which has been in a game
AppInventor Notes

AppInventor Links

Sample Apps
    ● General user base: https://sites.google.com/site/theairepository/source-code
    ● University of San Francisco: http://sites.google.com/site/usfandroidmarket/
    ●Debugging in AppEngine use
      ● “do it”
      ● “watch”
   ●AppEngine API not completly updated
   ●Do not use “,” when returning values with TinyWebDB
   ●Developing on a local server the address is “http://10.0.2.2”

Share this

Related Posts

Previous
Next Post »