Questions tagged [android-json]

JSON stands for (Java Script Object Notation). It is a simple and light-weight data interchange format that can be easily read by humans and machines.Android includes the org.json library which allow working efficiently with JSON. This provides easy parsing of JSON data and creating JSON strings

577 questions
0
votes
1 answer

How to download an image from Json and store it in gallery?

I need to parse an image from some Json and STORE it on phone gallery . I have no idea how to save pictures on SD card so I need a code for this thanks .
Sundos Altamimi
  • 29
  • 1
  • 1
  • 12
0
votes
2 answers

JSON data search and bundle in Android

Sorry for my bad English.I am new android. I have some problem for JSON in Android that (1.)I've been to obtain information from the Internet (JSON). How can I mark all station on googlemap on particular page? (2.1) I've been to obtain information…
0
votes
2 answers

Create Jsonstring - Android

Hi i want to create json string like {"id":"12345","option-ids":["100"]} i've tried like below JSONObject object = new JSONObject(); try { object.put("id","12314"); JsonArray jsonArray = new JsonArray(); …
user3275138
0
votes
1 answer

Android: Can reading a file in assets fail?

I have a json file in assets. I am using org.json as parser. If I always validate the json-file before upload and test it on the phone and it works, can I be sure that it will always work then or do I need to handle the case where the parsing or…
user3591115
  • 383
  • 1
  • 3
  • 9
0
votes
1 answer

HTTPAsyncClient skipping the first time

I am using HTTPAsyncClient to send a post request to the server , and it is activated with a button press (named checkbox) the problem is now when I press the first time It skips going into the TextHttpResponseHandler() and so it doesn't send…
0
votes
2 answers

Issues with JSONObject in AsyncTask

I can't seem to fix this problem I'm having. In my MainActivity, I'm syncing my device's application database with my backend database in several Asynctasks, one for each table. Since I have a lot of different tables, I have a general setup on the…
jahed
  • 171
  • 12
0
votes
2 answers

Implementing a "refresh button" for parsing a JSONArray

I currently have a program that can parse a JSONArray and put each item into a listview. But if you add something to the JSONArray the listview doesn't update until you run the app again. So how would I go about being able to update the listview…
user3358306
  • 187
  • 1
  • 13
0
votes
2 answers

JSON Parser using asynctask with progress bar

JSON Parser using asynctask with progress bar. What is the right way to do this? I applied and adapted what I read from tuts, but it returns null when returning data from the downloadTask Here is my downloadTask task: private class DownloadTask…
0
votes
2 answers

Fetch data of JSON array on Android

I have a few test values in my database and i want to fetch them all in android. This is my following JSON output of the values inside my Database: …
Pacheko
  • 133
  • 1
  • 1
  • 13
0
votes
1 answer

How insert the JSON Object in Existing JSON Array?

Here am Created the JSON Values in Static Way. JSON Structure { "MatchType": { "inningsperteam": "1", "maxovers": "5", "players": "11" }, "Innings": [ { "noballs": "0", "BowlingDetail": [ { …
Yugesh
  • 4,030
  • 9
  • 57
  • 97
0
votes
1 answer

How to update specific JSON values?

JSON Structure { "MatchType": { "inningsperteam": "1", "maxovers": "5", "players": "11" }, "Innings": [ { "noballs": "0", "BowlingDetail": [ { "noballs": "0", "balls": "0", …
Yugesh
  • 4,030
  • 9
  • 57
  • 97
0
votes
2 answers

Why I'm not getting any response from server in this code

public String POST(String url){ InputStream inputStream = null; String result = ""; try { // 1. create HttpClient HttpClient httpclient = new DefaultHttpClient(); // 2. make POST request to the given URL …
Nikesh Devaki
  • 2,091
  • 2
  • 16
  • 24
0
votes
2 answers

What is the alternative for storing set in sharedPreference using only api 8 in android?

using Set in sharedpreference is API lv11; i have a project need to parse to many types of nested items and need to save it to sharedpreference using only string, the xml items is very complicated to save as a normal string to sharedpreference, if i…
Piolo Opaw
  • 1,471
  • 2
  • 15
  • 21
0
votes
2 answers

Does HttpPost only returns xml and not json?

I've been working on a project that sends data to the server and receives a return value of JSON data. Unfortunately when I try to use HttpPost it returns as xml and not JSON. I was able to fix the problem by using HttpGet. I am just curious if it…
philip
  • 1,292
  • 3
  • 24
  • 44
0
votes
2 answers

Exception while parsing JSON data

I am parsing JSON data from this link: http://twyst.in/api/v1/near/30/30 As the data is too large, I am posting only the (problem) relevant data here: { "info":…
Rajat
  • 1,449
  • 5
  • 20
  • 33