Dropbox的集成在Android应用程序,但没有登录弹出 [英] Integrate Dropbox in android app, but without login popup

查看:225
本文介绍了Dropbox的集成在Android应用程序,但没有登录弹出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想用我的application.I开发上传一个示例应用程序的下拉框和下载文件,并要求进行身份验证。

I want to use the dropbox in my application.I developed a sample application for upload and download files and it ask for authentication.

但我不希望打开登录弹出。

But I don't want to open login popup.

是否有可能访问Dropbox的使用默认帐户(单一账户)登录信息的其他用户? 因此,任何用户都可以直接使用Dropbox的没有登录的弹出窗口。

Is it possible access the dropbox by other users using default account(single account) login details? So any user can use dropbox directly without login popup.

推荐答案

如何手动设置访问用户访问令牌对。

How to set access user access token pair manually.

     AppKeyPair appKeys = new AppKeyPair(APP_KEY, APP_SECRET);
     AndroidAuthSession session = new AndroidAuthSession(appKeys, ACCESS_TYPE);
     if (mDBApi == null) {
        mDBApi = new DropboxAPI<AndroidAuthSession>(session);

//  mDBApi.getSession().startAuthentication(Main.this);  //kicks off the web-based authentication
      //you'll have to use the web-based authentication UI one-time to get the ######### values
        String token_key="#########";  
        String token_seceret="#########";
        AccessTokenPair tokens=new AccessTokenPair(token_key,token_seceret);
        mDBApi.getSession().setAccessTokenPair(tokens);     
  //  boolean v=mDBApi.getSession().authenticationSuccessful(); 
    }

我第一次调试模式运行应用程序破发点,我得到了在detail.and输入有效的日志保存令牌密钥和令牌密钥(注)的证书之后,我手动设置如上code然后就可以成功登录。

First time i run application in debug mode with break point i get the token key and token secret of by entering valid log in detail.and saved(noted) that credential and after that i set them manually as above code then can be log in successfully.

这篇关于Dropbox的集成在Android应用程序,但没有登录弹出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆