Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to put input stream in my class? #10

Open
MikhilPastagia opened this issue Nov 29, 2014 · 0 comments
Open

how to put input stream in my class? #10

MikhilPastagia opened this issue Nov 29, 2014 · 0 comments

Comments

@MikhilPastagia
Copy link

i am using json volley with simple disk cache class. but issue is that i am getting jsonArray as response, so how to put it as inputStream argument?
my code is here,
req = new JsonArrayRequest("URL",
new Response.Listener() {
@OverRide
public void onResponse(JSONArray data) {

                    for (int i = 0; i < data.length(); i++) {
                        try {
                            JSONObject jObj = data.getJSONObject(i);
                            Categories cat = new Categories();
                            cat.setId(jObj.getString("id"));
                                                    } catch (JSONException e) {
                            // TODO Auto-generated catch block
                            e.printStackTrace();
                        }
                    }
                }
            }, new Response.ErrorListener() {
                @Override
                public void onErrorResponse(VolleyError error) {
                    VolleyLog.d("Error", "Error: " + error.getMessage());
                    hideProgressDialog();
                }
            });

please help me...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant