Android SDK Version
  • java.lang.Object
    • com.facebook.AccessTokenTracker

public abstract class AccessTokenTracker
extends java.lang.Object
This class can be extended to receive notifications of access token changes. The stopTracking() method should be called in the onDestroy() method of the receiving Activity or Fragment.
Constructor Summary
Constructor and Description
AccessTokenTracker()
The constructor.
Method Summary
Modifier and TypeMethod and Description
booleanisTracking()
Gets whether the tracker is tracking the current access token.
protected abstract voidonCurrentAccessTokenChanged(AccessToken oldAccessToken, AccessToken currentAccessToken)
The method that will be called with the access token changes.
voidstartTracking()
Starts tracking the current access token
voidstopTracking()
Stops tracking the current access token.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail

AccessTokenTracker

public AccessTokenTracker()
The constructor.
Method Detail

onCurrentAccessTokenChanged

protected abstract void onCurrentAccessTokenChanged(AccessToken oldAccessToken,
                                                    AccessToken currentAccessToken)
The method that will be called with the access token changes.
Parameters:
oldAccessToken - The access token before the change.
currentAccessToken - The new access token.

startTracking

public void startTracking()
Starts tracking the current access token

stopTracking

public void stopTracking()
Stops tracking the current access token.

isTracking

public boolean isTracking()
Gets whether the tracker is tracking the current access token.
Returns:
true if the tracker is tracking the current access token, false if not