Android Programming The Big Nerd Ranch Guide, 3rd Edition
Asking for Permission at Runtime 637 Asking for Permission at Runtime Handling permissions at runtime requires you to do three t ...
Chapter 33 Locations and Play Services 638 Checking for permissions Your first step will be to pull your permissions informatio ...
Checking for permissions 639 Write a method to check whether you have access to the first permission in your LOCATION_PERMISSION ...
Chapter 33 Locations and Play Services 640 Now to write what should happen when you do not have location permission. In that ca ...
Checking for permissions 641 To respond to the system dialog, you write a corresponding implementation of onRequestPermissionsRe ...
Chapter 33 Locations and Play Services 642 Run Locatr and press on the menu item again. This time, you will see the system perm ...
Checking for permissions 643 This shows you the latitude and longitude, accuracy, and the estimated time of the location fix. If ...
Chapter 33 Locations and Play Services 644 Find and Display an Image Now that you have a location fix, it is time to use it. Wr ...
Find and Display an Image 645 Listing 33.23 Downloading and displaying image (LocatrFragment.java) private class SearchTask ext ...
Chapter 33 Locations and Play Services 646 Challenge: Permissions Rationale As mentioned above, the system permission dialog is ...
647 34. Maps In this chapter, you will go one step further with LocatrFragment. In addition to searching for a nearby image, you ...
Chapter 34 Maps 648 Getting a Maps API Key Using the Maps API also requires you to configure an API key in your manifest. To do ...
Getting a Maps API Key 649 As of this writing, the template will also automatically add the com.google.android.gms:play- service ...
Chapter 34 Maps 650 Setting Up Your Map Now that you have the Maps API set up, you need to create a map. Maps are displayed, ap ...
Setting Up Your Map 651 SupportMapFragment has its own override of onCreateView(...), so you should be all set. Run Locatr to se ...
Chapter 34 Maps 652 Getting More Location Data To actually plot your image on this map, you need to know where it is. Add an ad ...
Getting More Location Data 653 And then pull that data out of your Flickr JSON response. Listing 34.6 Pulling data from Flickr ...
Chapter 34 Maps 654 Listing 34.8 Saving out query results (LocatrFragment.java) private class SearchTask extends AsyncTask< ...
Working with Your Map 655 SupportMapFragment.getMapAsync(...) does what it says on the tin: It gets a map object asynchronously. ...
Chapter 34 Maps 656 More often, it is easier to provide a list of points that you would like this rectangle to encompass. LatLn ...
«
27
28
29
30
31
32
33
34
35
36
»
Free download pdf