Page 313 -
P. 313

mobile app development



                        Test Drive




                       Recall that (for now)  your Android Python scripts run within the emulator, not within IDLE. So use the
                       tools/adb program to copy your program to the emulator. Call your program coachapp.py. When
                       the code is copied over, start SL4A on your emulator, and then tap your script’s name.

         T ap your app’s
         name, and
         then tap the
         “run wheel."





















                           And there they are…Coach
                           Kelly’s athletes.







           This is looking really good! Your app has communicated with your web server,
           requested and received the list of athlete names, and displayed the list on your
           emulator.





                              If you app doesn’t run, don’t panic. Check your code for typos.
                             Run your app again in the Python terminal by tapping on the little terminal icon to the
                             left of the “run wheel” within SL4A. If your code raises an error, you’ll see any messages
                             on the emulator’s screen, which should give you a good idea of what went wrong.




                                                                                      you are here 4    277
   308   309   310   311   312   313   314   315   316   317   318