Java 类com.parse.ParseAnonymousUtils 实例源码

项目:Cloud_Base-To-Do-App    文件:HomeActivity.java   
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    ViewPager vpPager = (ViewPager) findViewById(R.id.vpPager);
    adapterViewPager = new MyPagerAdapter(getSupportFragmentManager(),getApplicationContext());
    vpPager.setAdapter(adapterViewPager);
    ParseUser currentUser = ParseUser.getCurrentUser();
    if (ParseAnonymousUtils.isLinked(currentUser) || currentUser==null) {
        // If user is anonymous, send the user to LoginSignupActivity.class
        Intent intent = new Intent(HomeActivity.this,
                LoginSignupActivity.class);
        startActivity(intent);
        finish();

    }
}
项目:interloco    文件:MainActivity.java   
/** Swaps fragments in the main content view */
private void selectItem(int position) {
    mDrawerList.setItemChecked(position, true);
    mDrawerLayout.closeDrawers();
    setTitle(mDrawerItems[position]);
    switch (position) {
    case 0:
        show(new BrowseFragment());
        break;
    case 1:
        if (ParseAnonymousUtils.isLinked(ParseUser.getCurrentUser())) {
            show(new SignUpFragment());
        } else {
            show(new ShareFragment());
        }
        break;
    }
}
项目:RxParse    文件:ParseObservable.java   
@NonNull
@CheckReturnValue
public static Single<ParseUser> anonymousLogIn() {
    return RxTask.single(() -> ParseAnonymousUtils.logInInBackground());
}