• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java RemoteSSO类的典型用法和代码示例

java 1次浏览

本文整理汇总了Java中com.sina.sso.RemoteSSO的典型用法代码示例。如果您正苦于以下问题:Java RemoteSSO类的具体用法?Java RemoteSSO怎么用?Java RemoteSSO使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

RemoteSSO类属于com.sina.sso包,在下文中一共展示了RemoteSSO类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: SsoHandler

点赞 3

import com.sina.sso.RemoteSSO; //导入依赖的package包/类
public SsoHandler(Activity activity) {
    mAuthActivity = activity;
    conn = new ServiceConnection() {
        @Override
        public void onServiceDisconnected(ComponentName name) {

        }

        @Override
        public void onServiceConnected(ComponentName name, IBinder service) {
            RemoteSSO remoteSSOservice = RemoteSSO.Stub
                    .asInterface(service);
            try {
                ssoPackageName = remoteSSOservice.getPackageName();
                ssoActivityName = remoteSSOservice.getActivityName();
                boolean singleSignOnStarted = startSingleSignOn(
                        mAuthActivity, authPermissions,
                        mAuthActivityCode);

            } catch (RemoteException e) {
                e.printStackTrace();
            }

        }
    };
}
 

开发者ID:shawnlinboy,
项目名称:siciyuan,
代码行数:27,
代码来源:SsoHandler.java

示例2: SsoHandler

点赞 2

import com.sina.sso.RemoteSSO; //导入依赖的package包/类
public SsoHandler(Activity activity, Handler handler) {
      mAuthActivity = activity;
      if(handler != null){
      	this.handler = handler;
      }
      
mWeibo = Weibo.getInstance();
mWeibo.setupConsumerConfig(Constants.SINA_APPID, Constants.SINA_APPKEY);		
mWeibo.setRedirectUrl(Constants.SINA_CALLBACK);
      
      //Weibo.isWifi=Utility.isWifi(activity);
      conn = new ServiceConnection() {
          @Override
          public void onServiceDisconnected(ComponentName name) {
          	/**
          	 * 为啥在Disconnected的时候启动登陆窗口?
          	 */
              //mWeibo.startAuthDialog(mAuthActivity, mAuthDialogListener);
          }

          @Override
          public void onServiceConnected(ComponentName name, IBinder service) {
              RemoteSSO remoteSSOservice = RemoteSSO.Stub.asInterface(service);
              try {
                  ssoPackageName = remoteSSOservice.getPackageName();
                  ssoActivityName = remoteSSOservice.getActivityName();
                  boolean singleSignOnStarted = startSingleSignOn(
                          mAuthActivity, Constants.SINA_APPID, new String[]{},
                          mAuthActivityCode);
                  if (!singleSignOnStarted) {
                  	startWebLogin();
                  }
              } catch (RemoteException e) {
                  e.printStackTrace();
              }

          }
      };
  }
 

开发者ID:emop,
项目名称:EmopAndroid,
代码行数:40,
代码来源:SsoHandler.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)