Android SessionState - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Android SessionState class.

This code example shows how to use the following methods:toString
        FragmentManager fragmentManager = getSupportFragmentManager();
        userSettingsFragment = (UserSettingsFragment) fragmentManager.findFragmentById(R.id.login_fragment);
        userSettingsFragment.setSessionStatusCallback(new Session.StatusCallback() {
            @Override 
            public void call(Session session, SessionState state, Exception exception) {
                Log.d("LoginUsingLoginFragmentActivity", String.format("New session state: %s", state.toString()));
            } 
        }); 
    } 
 
    @Override 
    public void onActivityResult(int requestCode, int resultCode, Intent data) {
        userSettingsFragment.onActivityResult(requestCode, resultCode, data);
        super.onActivityResult(requestCode, resultCode, data);
    } 
 
} 
4
CodeRank
This code example shows how to use the following methods:isOpened
                break; 
        } 
    } 
 
    private void onSessionStateChanged(Session session, SessionState state, Exception exception) {
        if (pickPlaceForLocationWhenSessionOpened != null && state.isOpened()) {
            Location location = pickPlaceForLocationWhenSessionOpened;
            pickPlaceForLocationWhenSessionOpened = null;
            startPickPlaceActivity(location);
        } 
    } 
 
    private void displaySelectedPlace(int resultCode) {
        String results = "";
        PlacePickerApplication application = (PlacePickerApplication) getApplication();
 
        GraphPlace selection = application.getSelectedPlace();
        if (selection != null) {
            GraphLocation location = selection.getLocation();
 
4
CodeRank
This code example shows how to use the following methods:equals
This code example shows how to use the following methods:isOpened
        } 
        return true; 
    } 
 
    private void onSessionStateChanged(Session session, SessionState state, Exception exception) {
        if (pickFriendsWhenSessionOpened && state.isOpened()) {
            pickFriendsWhenSessionOpened = false;
 
            startPickFriendsActivity(); 
        } 
    } 
 
    private void displaySelectedFriends(int resultCode) {
        String results = "";
        FriendPickerApplication application = (FriendPickerApplication) getApplication();
 
        Collection<GraphUser> selection = application.getSelectedUsers();
        if (selection != null && selection.size() > 0) {
            ArrayList<String> names = new ArrayList<String>();
            for (GraphUser user : selection) {
3
CodeRank
This code example shows how to use the following methods:isOpened
        if (pickPlaceForLocationWhenSessionOpened != null && state.isOpened()) {
            Location location = pickPlaceForLocationWhenSessionOpened;
            pickPlaceForLocationWhenSessionOpened = null;
            startPickPlaceActivity(location);
        } 
    } 
 
    private void displaySelectedPlace(int resultCode) {
        String results = "";
        PlacePickerApplication application = (PlacePickerApplication) getApplication();
 
        GraphPlace selection = application.getSelectedPlace();
        if (selection != null) {
            GraphLocation location = selection.getLocation();
 
            results = String.format("Name: %s\nCategory: %s\nLocation: (%f,%f)\nStreet: %s, %s, %s, %s, %s",
                    selection.getName(), selection.getCategory(),
                    location.getLatitude(), location.getLongitude(),
                    location.getStreet(), location.getCity(), location.getState(), location.getZip(),
                    location.getCountry());
3
CodeRank
This code example shows how to use the following methods:isOpened
		return true; 
	} 
 
	private void onSessionStateChanged(Session session, SessionState state,
			Exception exception) {
		if (pickFriendsWhenSessionOpened && state.isOpened()) {
			pickFriendsWhenSessionOpened = false;
 
			startPickFriendsActivity(); 
		} 
	} 
 
	private void displaySelectedFriends(int resultCode) {
		String results = "";
		FriendPickerApplication application = (FriendPickerApplication) getApplication();
 
		Collection<GraphUser> selection = application.getSelectedUsers();
		if (selection != null && selection.size() > 0) {
			ArrayList<String> names = new ArrayList<String>();
			for (GraphUser user : selection) {
3
CodeRank
This code example shows how to use the following methods:equals

Related Android SessionState Questions & Answers:

See Code Examples for Android SessionState Methods: