Не могу получить загруженный файл из Dropbox с помощью cloudrail

В соответствии с этой страницей: https://cloudrail.com/integrations/interfaces/CloudStorage;interfaceId=CloudStorage;interfaceFunctionId=CloudStorage-download это способ загрузки файла из Dropbox

    CloudRail.setAppKey("xxxxxxxxxxxxxxxxxxxxxxxx");

    AwesomeAsyncTask task = new AwesomeAsyncTask();
    task.context = this.getApplicationContext();
    task.execute();

public class AwesomeAsyncTask extends AsyncTask {

Context context;

@Override
protected Object doInBackground(Object[] objects) {

    Dropbox db = new Dropbox(context, "xxxxxxx", "xxxxxxxxxx",
            "https://auth.cloudrail.com/com.exa.ampl.e", "AWESOME_STATE");
    db.useAdvancedAuthentication();

    CloudStorage service = db;
    InputStream result = service.download(
            "/tlocations.txt"
    );
    BufferedReader br;
    String response = "";
    try {
        br = new BufferedReader(new InputStreamReader(result, "cp1252"));
        for (String line; (line = br.readLine()) != null;
             response += line + '\n')
            ;
    } catch (IOException e) {
        e.printStackTrace();
    }

    System.out.println("response: " + response);
    return null;
    }
}

по какой-то причине я не вижу ответа в мониторе Android. В чем может быть проблема?

0 ответов

Другие вопросы по тегам