Okay, I got this working. Let me leave a procedure for anyone struggling with the documentation:
First of all the two keys needed are cloud-key and cloud-secret.
You need date in this format:
"yyyy-MM-dd'T'HH:mm:ss.xxxZ" called the ISO-8601 date string. (For Android)
String formattedDate = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.530Z").format(new Date());
Now you need to create a string like this:(I am using Android in java)
String signing = "active1appKey"+getString(R.string.cloud_key)+"date"+formattedDate+"image"+encodedString+"meta"+videoUrl+"name"+targetName+"size20typeImageTarget"+getString(R.string.cloud_secret);
For image's encoded String(where mCurrentPhotoPath is AbsolutePath in string format):
String encodedString= null;
try {
encodedString = Base64.getEncoder().encodeToString(
Files.readAllBytes(Paths.get(mCurrentPhotoPath)));
} catch (IOException e) {
e.printStackTrace();
}
Next you need to sha1 hash it:
String hashCode= new String(Hex.encodeHex(DigestUtils.sha1(signing)));
Next construct a jsonObject:
JSONObject params = new JSONObject();
try {
params.put("image",encodedString );
params.put("active", "1");
params.put("name",targetName);
params.put("size","20");
params.put("meta",videoUrl);
params.put("type","ImageTarget");
params.put("date",formattedDate);
params.put("appKey",getString(R.string.cloud_key));
params.put("signature",hashCode);
} catch ( JSONException e) {
e.printStackTrace();
}
Next have params.toString() and you will get the jsonString.
Then just use this in the body and make a POST request to the cloud server url ending in port 8888.
Edit:
You can use these resources for understanding better, they are from EasyAR but are not listed on the site and have java, go examples:
https://github.com/EasyAR/irsamples