Example #1
0
 public String toAttachmentsString() {
   ArrayList<CharSequence> attachments = new ArrayList<CharSequence>();
   for (VKApiAttachment attach : this) {
     attachments.add(attach.toAttachmentString());
   }
   return VKStringJoiner.join(attachments, ",");
 }
 private String generateSig(VKAccessToken token) {
   // Read description here https://vk.com/dev/api_nohttps
   // At first, we need key-value pairs in order of request
   String queryString = VKStringJoiner.joinParams(mPreparedParameters);
   // Then we generate "request string" /method/{METHOD_NAME}?{GET_PARAMS}{POST_PARAMS}
   queryString = String.format(Locale.US, "/method/%s?%s", methodName, queryString);
   return VKUtil.md5(queryString + token.secret);
 }