使用Dropbox应用程序。无法将应用程序活动链接到Dropbox登录页面

时间:2013-12-01 16:23:11

标签: android dropbox

我正在使用此代码。完成Manifest.xml权限。

private static String app_key = "88888888888";

private static String app_secret = "*******************";

private static final int REQUEST_LINK_TO_DBX = 0;

private TextView mTestOutput;

private Button mLinkButton;

private DbxAccountManager mDbxAcctMgr;

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    mLinkButton = (Button) findViewById(R.id.button1);
    mDbxAcctMgr = DbxAccountManager.getInstance(getApplicationContext(), app_key, app_secret);

    mLinkButton.setOnClickListener(new OnClickListener() {
        @Override
        public void onClick(View v) {
            // TODO Auto-generated method stub
            callmethod();
        }
    });
}

private void callmethod() {
    mDbxAcctMgr.startLink(MainActivity.this,REQUEST_LINK_TO_DBX );
}

0 个答案:

没有答案