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 7986423
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T11:51:03+00:00 2026-06-04T11:51:03+00:00

I am writing an application in which I am using Http Connection to post

  • 0

I am writing an application in which I am using Http Connection to post data on a server. My App is working fine when I check it in emulator. My Webservice take too much time to generating responses and my emulator is also responding in a proper way. Somehow when I installed the app on the device, my app is posting data twice on the server. I have checked it… Does anyone have any solution on how to escape from this???

Here I am attaching my code of the sending request. I think the mobile app is sending another request when it reaches HTTP Time out, but I don’t know what’s the problem. Please Help me.

String param=
   "function=OpenRecharge&LoginId="+SharedVariable.getUserInfo().getLoginID()
              +"&BatchId="+SharedVariable.getSelectedProduct().getBatchID()
              +"&SystemServiceID="+SharedVariable.getSelectedProduct().getSystemServiceID()
              +"&ReferalNumber="+strMobileNo
              +"&Amount="+strAmount
              +"&FromANI="+fromMoNo
              +"&Email="
              +"&Checksum="+Checksum;
System.out.println("Final Parameter:\n"+param);

connection = (HttpConnection) Connector.open(url);

//Connector.open(param, strAmount, quit)
connection.setRequestMethod(HttpConnection.POST);
connection.setRequestProperty("User-Agent", "Profile/MIDP-1.0 Configuration/CLDC-1.0");
connection.setRequestProperty("Accept_Language","en-US");
connection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");

OutputStream out = connection.openOutputStream();
out.write(param.getBytes());

out.flush();
//System.out.println("Status Line Code: " + connection.getResponseCode());
//System.out.println("Status Line Message: " + connection.getResponseMessage());

is=connection.openDataInputStream();
int chr;
StringBuffer sb=new StringBuffer();
while ((chr = is.read()) != -1)
    sb.append((char) chr);

System.out.println("Response===>"+sb.toString());
  • 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-04T11:51:04+00:00Added an answer on June 4, 2026 at 11:51 am

    Can you serve up an answer with a place holder text like, “processing…” then after a delay have the web browser try again?

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

Sidebar

Related Questions

I am writing a web application which retrieves a lot of data using AJAX
I am writing an application which has an authenticity mechanism, using HMAC-sha1, plus a
I'm writing a vb.net application which connects to a db using integrated security. However,
I'm writing an application which reads data from a Microsoft Access database and writes
I'm writing application, which connects to CRM using CRM SDK 4. In the first
Scenario: Im elstablishing a connection with an http server using libcurl and downlading a
i am writing a small android application which requires some data which is stored
I'm writing an application which is quite graphically heavy and therefore I'm trying to
I am writing an application which is going to allows users to change the
I'm writing an application which plays multiple sounds concurrently, each sound needs to be

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.