Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8868949
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T17:22:22+00:00 2026-06-14T17:22:22+00:00

I am storing an image in form of String using Base64 encoding. I wish

  • 0

I am storing an image in form of String using Base64 encoding. I wish to send that image to API and get jSON object response. I have deployed the same in Android using ArrayList, but Since iOS does not have ArrayList. How can this be done.

ArrayList nameValuePairs = new ArrayList();

  nameValuePairs.add(new BasicNameValuePair("serialnumber",ReplaceString(UserData.objUserData.getencryptedTerminalid()).trim()));
  nameValuePairs.add(new BasicNameValuePair("mobileimei",ReplaceString(EncryptionHelper.encryptText(telephonyManager.getDeviceId())).trim()));
  nameValuePairs.add(new BasicNameValuePair("submerchantguid",ReplaceString(EncryptionHelper.encryptText(Payment.merchantId)).trim()));
  nameValuePairs.add(new BasicNameValuePair("transactionid",ReplaceString(EncryptionHelper.encryptText(Payment.transactionId))));
  nameValuePairs.add(new BasicNameValuePair("emailid",ReplaceString(EncryptionHelper.encryptText(userEmail)).trim()));
  nameValuePairs.add(new BasicNameValuePair("mobileno",ReplaceString(EncryptionHelper.encryptText(userMobile)).trim()));
  nameValuePairs.add(new BasicNameValuePair("signature",encodedSignImage));
  nameValuePairs.add(new BasicNameValuePair("photo",encodedPhotoImage.trim()));


  InputStream is;
  // open data output stream
  OutputStream dos;

  HttpClient httpclient = new DefaultHttpClient();

  HttpPost httppost = new

  HttpPost(Constants.INFO_SUBMIT);

  httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));

  HttpResponse response = httpclient.execute(httppost);

  HttpEntity entity = response.getEntity();

  is = entity.getContent();

  int ch;
  StringBuffer b = new StringBuffer();
  String responseString = "";

  while ((ch = is.read()) != -1) 
  {
   b.append((char) ch);
  }

  responseString = b.toString();
  JSONObject jsonObject = new JSONObject(responseString);
  statusString = (String) jsonObject.get("Status");

    }
 }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T17:22:24+00:00Added an answer on June 14, 2026 at 5:22 pm

    There are really three separate questions here, which I’ll answer individually:

    1. In terms of communicating with a web service, you should check out RestKit or ASIHTTPRequest or AFNetworking or something like that. If you’re interested in writing your own, you’d use NSURLConnection which you can see discussed in the URL Loading System Programming Guide. You can also look at the various examples you’ll see in the NSURLConnection Class Reference, such as SimpleURLConnections

    2. In terms of parsing/creating JSON, you can use NSJSONSerialization.

    3. In terms of base64 coding, I’ve successfully used Google GTMBase64 in GTM. But I’d suggest you look at How do I do base64 encoding on iphone-sdk?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

If I have a string in the form: data:image/x-icon;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QAAAAAAAD5Q7t/AAAA2UlEQVQ4y8WSvQvCMBDFX2rFUvuFSAUFBQfBwUXQVfFfFpzdRV2c7O5UKmihX9E6RZo2pXbyTbmX3C+5uwD/FskG+76WsvX65n/3Lm0pdU214HOAbHIWwvzeYPL1p4cT4QCi5DIxEINIdWt+Hs9cXAtg3UOkIJAUpT5ADiho8kbD0NG0LB6Q76xIevwCpW+0bBvj7Y5wgCpI148RBxTmYo7Z1RGPkSk/kc4jgme0oHoJlmFUOC+8lUEMN0ASvyBpGha++IXCJrJyKJGhjIalyZVyNqufP9j/9AH0S0vqrU+YMgAAAABJRU5ErkJggg== What is the best regex
I have managed objects that have image properties. Since storing large blobs in CoreData
I have a Base64 jpeg image string which is a simple signature image. I
I get an image from a PHP server as a string ( this image
I have an image name as a string. The real imagename on the form
I am using below function to make a image of current form and set
I have the following code that is hard coded <img src=data:image/png;base64,iVBORw0KGgoAAAANSUh .... > Through
I am trying to POST an image to imageshack using their API and Play
I have a C# form that I am creating completely manually (i.e. without using
I'm having trouble creating an Image/Bitmap object in C# from a base64 encoded byte

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.