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

  • Home
  • SEARCH
  • 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 8428859
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T05:10:22+00:00 2026-06-10T05:10:22+00:00

I am working on a computer that is joined with server in LAN.proxy is

  • 0

I am working on a computer that is joined with server in LAN.proxy is used to access internet in my computer, now i am doing project on consuming php web services which give JSON as output.i have made a app for it but it gives blank response,i have read one of the stack overflow question answer that say that it is because of proxy.
should i have to set proxy setting in my application.
And how can i set proxy for this problem.

i have set the proxy by this step

  1. Click on Menu
  2. Click on Settings
  3. Click on Wireless & Networks
  4. Go to Mobile Networks
  5. Go to Access Point Names
  6. Here you will Telkila Internet, click on it.
  7. In the Edit access point section, input the “proxy” and “port”
  8. Also provide the Username and Password, rest of the fields leave them blank

internet is working in emulator,but still project display nothing.
this is my code

package com.example.jsonexaple2;

import java.io.BufferedInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;

import org.apache.http.util.ByteArrayBuffer;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

import android.os.Bundle;
import android.app.Activity;
import android.util.Log;

public class Jsonexaple2 extends Activity {
    String archiveQuery = "http://www.archive.org/advancedsearch.php?q=Lotus&fl[]=date&fl[]=format&fl[]=identifier&fl[]=mediatype&fl[]=title&sort[]=createdate+desc&sort[]=&sort[]=&rows=10&page=1&output=json&callback=callback&save=yes";
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.jsonexaple2);
        InputStream in = null;
        String queryResult = "";
        try {
         URL url = new URL(archiveQuery);
         HttpURLConnection urlConn = (HttpURLConnection) url.openConnection();
         HttpURLConnection httpConn = (HttpURLConnection) urlConn;
         httpConn.setAllowUserInteraction(false);
         httpConn.connect();
         in = httpConn.getInputStream();
         BufferedInputStream bis = new BufferedInputStream(in);
         ByteArrayBuffer baf = new ByteArrayBuffer(50);
         int read = 0;
         int bufSize = 512;
         byte[] buffer = new byte[bufSize];
         while(true){
          read = bis.read(buffer);
          if(read==-1){
           break;
          }
          baf.append(buffer, 0, read);
         }
         queryResult = new String(baf.toByteArray());
        } catch (MalformedURLException e) {
         // DEBUG
         Log.e("DEBUG: ", e.toString());
        } catch (IOException e) {
         // DEBUG
         Log.e("DEBUG: ", e.toString());
        }
        JSONObject jObject;
        try {
         jObject = new JSONObject(queryResult.replace("callback(", "")).getJSONObject("response");
         JSONArray docsArray = jObject.getJSONArray("docs");
         for (int i = 0; i < 10; i++) {
          if (docsArray.getJSONObject(i).optString("mediatype").equals("etree")) {
           String title = docsArray.getJSONObject(i).optString("title");
           String identifier = docsArray.getJSONObject(i).optString("identifier");
           String date = docsArray.getJSONObject(i).optString("date");
           System.out.println(title + " " + identifier + " " + date);
          }
         }
        } catch (JSONException e) {
         // DEBUG
         Log.e("DEBUG: ", e.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-10T05:10:24+00:00Added an answer on June 10, 2026 at 5:10 am

    Yes you have to. Once, I had the same problem with the emulator. I searched on Google and I found these two blogs that are nice.

    • gitshah
    • twozao

    Hope that it will help you.

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

Sidebar

Related Questions

I'm working on a project for my computer science class that basically uses an
I have a .net application that is not working on a colleagues computer (he
I am working on an NLP project that can create entity sets and compute
I'm working on a Computer Science project, and I haven't been able to find
Good afternoon, WinUSB is working well on the development computer that I am using
I have a computer working as a server with many SQL Server 2005 databases
For a project we're working on right now, we want to pull a Donald
I am currently working on a web application that uses PHP and MySQL, but
I am working on a C++ application that uses computer vision techniques to identify
Assume I have a server application which is working in computer not connected to

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.