public class SocialNetworkManager
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
SocialNetworkManager.OnInitializationCompleteListener
Listener for initialized social networks from SocialNetworkManager
|
| Modifier and Type | Method and Description |
|---|---|
void |
addSocialNetwork(SocialNetwork socialNetwork)
Add social networks to manager
|
java.util.List<SocialNetwork> |
getInitializedSocialNetworks()
Get list of initialized social networks
|
SocialNetwork |
getSocialNetwork(int id)
Get social network by id
|
void |
onActivityResult(int requestCode,
int resultCode,
Intent data)
Called when an activity you launched exits, giving you the requestCode you started it with, the resultCode it returned, and any additional data from it.
|
void |
onCreate(Bundle savedInstanceState)
Called when the Social Network activity is starting.
|
void |
onDestroy()
Perform any final cleanup: cancel all request before activity destroyed.
|
void |
onPause()
Called as part of the activity lifecycle when an activity is going into the background, but has not (yet) been killed.
|
void |
onResume()
Called after onRestoreInstanceState(Bundle), onRestart(), or onPause(), for your activity to start interacting with the user.
|
void |
onSaveInstanceState(Bundle outState)
Called to retrieve per-instance state from an activity before being killed so that the state can be restored in onCreate(Bundle) or onRestoreInstanceState(Bundle) (the Bundle populated by this method will be passed to both).
|
void |
onStart()
Called after onCreate(Bundle) — or after onRestart() when the activity had been stopped, but is now again being displayed to the user.
|
void |
onStop()
Called when you are no longer visible to the user.
|
void |
setOnInitializationCompleteListener(SocialNetworkManager.OnInitializationCompleteListener onInitializationCompleteListener)
Register a callback to be invoked when social networks from SocialNetworkManager initialized.
|
public void onCreate(Bundle savedInstanceState)
savedInstanceState - If the activity is being re-initialized after previously being shut down then this Bundle contains the data it most recently supplied in onSaveInstanceState(Bundle). Note: Otherwise it is null.public void onStart()
public void onResume()
public void onPause()
public void onStop()
public void onDestroy()
public void onSaveInstanceState(Bundle outState)
outState - Bundle in which to place your saved state.public void onActivityResult(int requestCode,
int resultCode,
Intent data)
requestCode - The integer request code originally supplied to startActivityForResult(), allowing you to identify who this result came from.resultCode - The integer result code returned by the child activity through its setResult().data - An Intent, which can return result data to the caller (various data can be attached to Intent "extras").public SocialNetwork getSocialNetwork(int id) throws SocialNetworkException
id - social network id( 1 - Twitter, 2 - LinkedIn, 3 - Google Plus, 4 - Facebook, 5 - Vkontakte, 6 - Odnoklassniki, 7 - Instagram)SocialNetwork class(FacebookSocialNetwork, TwitterSocialNetwork, LinkedInSocialNetwork, GooglePlusSocialNetwork, InstagramSocialNetwork, VkSocialNetwork, OkSocialNetwork)SocialNetworkExceptionpublic void addSocialNetwork(SocialNetwork socialNetwork)
socialNetwork - chosen and setuped social networkpublic java.util.List<SocialNetwork> getInitializedSocialNetworks()
public void setOnInitializationCompleteListener(SocialNetworkManager.OnInitializationCompleteListener onInitializationCompleteListener)
onInitializationCompleteListener - the callback that will run