Android Programming Tutorials

(Romina) #1
Posts On Location

will be appended to the end of the status update when you choose the


Insert Location option menu item:


Figure 38. The results from the Insert Location menu item in Patchy

Extra Credit...............................................................................................


Here are some things you can try beyond those step-by-step instructions:



  • Allow the user to choose the LocationProvider via a set of
    preferences that specify the attributes of a Criteria object, then


using that Criteria object to get the best-matching
LocationProvider.


  • Use onKeyDown() to add "hot-key" support, such that some key (e.g.,


<Alt>-<X>) will inject the location, instead of having to use the
option menu.

232
Free download pdf