Return to Video

Implementing onStop - Solution

  • 0:00 - 0:04
    When the activity stops, you'll
    want to disconnect your API Client.
  • 0:04 - 0:07
    Of course, you should only do this
    if you are already connected.
  • 0:07 - 0:10
    So you should check if
    Google API Client is connected.
  • 0:10 - 0:13
    And you do that very
    simply with this method.
  • 0:13 - 0:14
    This returns a boolean for you.
  • 0:14 - 0:19
    So if mGoogleApiClient.isConnected
    returns true,
  • 0:19 - 0:21
    then you want to be able
    to disconnect your client.
  • 0:21 - 0:25
    And then you can do that very simply
    by calling the disconnect method,
  • 0:25 - 0:26
    as you can see here.
Title:
Implementing onStop - Solution
Description:

03-18 Implementing onStop - Solution

more » « less
Video Language:
English
Team:
Udacity
Project:
UD876-1 - Google Play Services - Location & Contex
Duration:
0:27

English subtitles

Revisions Compare revisions