Я успешно загрузил 6 изображений одно за другим в Cloudinary.Теперь я хочу получить все изображения URL.Как я могу получить на стороне мобильного клиента Android?
Я использую код ниже.
List<String> imageList = new ArrayList<>();
Map config = ObjectUtils.asMap(
"cloud_name", "shank",
"api_key", "644617911542992",
"api_secret", "oW3bQk8luOT9UlEkRsH21KoQkxY");
Cloudinary cloudinary = new Cloudinary(config);
Api api = cloudinary.api();
JSONObject outerObject = null;
String jsonNext = null;
boolean ifWeHaveMoreResources = true;
while (ifWeHaveMoreResources) {
try {
outerObject = new JSONObject(api.resources(ObjectUtils.asMap("max_results", 10, "next_cursor", jsonNext)));
if (outerObject.has("next_cursor")) {
jsonNext = outerObject.get("next_cursor").toString();
ifWeHaveMoreResources = true;
} else {
ifWeHaveMoreResources = false;
}
JSONArray jsonArray = outerObject.getJSONArray("resources");
for (int i = 0, size = jsonArray.length(); i < size; i++) {
JSONObject objectInArray = jsonArray.getJSONObject(i);
String public_id = objectInArray.get("public_id").toString();
String url = objectInArray.get("secure_url").toString();
imageList.add(url);
}
} catch (Exception e) {
e.printStackTrace();
}
}
Но это дает исключение.
java.lang.Exception: Administration API is not supported for mobile applications
Пожалуйста, помогите мнерешить эту проблему.