List all the folder and files of Dropbox using Dropbox API

后端 未结 3 1044
梦谈多话
梦谈多话 2020-12-31 06:32

Am looking for the tutorial to display all the files and folder in a listview..but I didn\'t get anything..Does anyone here know that how can I show all the folder and files

3条回答
  •  梦毁少年i
    2020-12-31 07:06

    please use this one , it is the latest api .....

     public void login(String accessToken) {
            DbxRequestConfig requestConfig = DbxRequestConfig.newBuilder("ManualApp")
                    .withHttpRequestor(OkHttp3Requestor.INSTANCE)
                    .build();
            mDbxClient = new DbxClientV2(requestConfig, accessToken);
        }
    
        public List getListFile(String path) {
    
            if (mDbxClient == null) {
                RkLogger.e("get files error", "must login first please");
                return null;
            }
    
            try {
                return mDbxClient.files().listFolder(path).getEntries();
            } catch (DbxException e) {
                RkLogger.e("DbxException ", e.toString());
                return null;
            }
    
        }
    

提交回复
热议问题