Skip to main content
Filter by
Sorted by
Tagged with
0 votes
1 answer
61 views

Android. Cannot parse json string from bundle

I'm trying to parse json string from bundle to object. But I get error: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 2 path $ Here is my code: val ...
testivanivan's user avatar
  • 1,494
0 votes
1 answer
578 views

Android Moshi unable to apply custom adapter

My use case is that in data classes wherever I have used Boolean as type, in JSON that can either comes as double quote string ("true") or normal boolean (true) Earlier I was using Gson &...
Ujjwal Kumar Maharana's user avatar
0 votes
1 answer
33 views

JSON array coming as json object if no data in Android

I am getting JSON response from the API call. But in that response one of the JSONArray is coming as JSONObject if there is no data as given below. Without data : "InbuildData": null. With ...
Malhotra's user avatar
  • 241
0 votes
0 answers
888 views

How to create sticker content povider for dynamic Android WhatsApp Sticker App

hey guys I am creating a WhatsApp sticker app that fetch stickers from Firebase cloud Firestore and display it into recycler view. Each recycler view contains list of stickers from each sticker pack. ...
Knowledge hub's user avatar
0 votes
1 answer
51 views

RecyclerView with JSON, setOnClickListener with id and create new GET request with that id

I get a request for all orders, I have to take the id from there and put it on the request that shows the details of the order "?project_id= + id"` my fragment, the place where i display the ...
Suhrob's user avatar
  • 16
0 votes
1 answer
578 views

Error: "Required value 'networkOffers' missing at $" For Android

I keep getting this Error call Yet I'm not sure where to look to fix it. I have a raw JSON file in my Res Folder under the directory "Raw" The Error is coming at my Repository class ...
OEThe11's user avatar
  • 361
0 votes
0 answers
536 views

Try to import JSON image from placeholder. Got errors

I am new to Android kotlin and are currently making a app that import JSON from a url. I am trying to display a image with info like title etc. This error (look futher down) appear in Logcat when I ...
Nicholai Mørch Rindarøy's user avatar
0 votes
2 answers
2k views

Android Retrofit2: Serialize null without GSON or JSONObject

The result of API call in my Android app can be a JSON with configuration which is mapped to SupportConfigurationJson class, or just pure null. When I get a JSON, the app works properly, but when I ...
gabez_rules's user avatar
0 votes
1 answer
1k views

Plugin error: Plugin 'JSON Model Generator' is compatible with IntelliJ IDEA only because it doesn't define any explicit module dependencies

Why am I getting this error every time I start my IDE? I have not installed any such plugin.
Sweta Jain's user avatar
  • 4,214
0 votes
1 answer
99 views

How to compare and merge two JSON keys in Android

I have two JSONObjects with the same keys. But something I am getting from the API response is different from the originally expected one. That is Keys are the same but the difference in their case-...
Malhotra's user avatar
  • 241
0 votes
1 answer
969 views

How to display different data in other activity in RecyclerView in android using JAVA

For example, I have created one activity in recycler view and gave the contains i.e., name, title and heading and also I have put OnClick Listener in the adapter class. Now I want to implement that ...
Mediad's user avatar
  • 42
0 votes
1 answer
46 views

how do call two array within one adapter?

this is my jsonarray { "status": "Success", "message": "2 results found.", "data": [ { "tag_name": "faverate", ...
Sasta Bazaar's user avatar
0 votes
2 answers
1k views

Android Studio: API Calls - How can I read an object from a JSON object

I'm building a currency conversion application by using a public API. In my code, I need to read the conversion_rates part of this JSON Object: {"result":"success","...
snow monster's user avatar
0 votes
1 answer
559 views

Android Json Object put a Array JSON without key

i need to create a json with estructure { "label": "any description", "location":[25.7752965,-100.2636682] } Json Object with array without key,value ...
pedroooo's user avatar
  • 583
2 votes
3 answers
1k views

How to add values to JSONObject on button click in android?

i have an adapter from which i am creating edittext for user to input data dynamically. Now, i have to store the same in JSONObject in a key-value pair? how can i do it? i am storing all the created ...
Test's user avatar
  • 141
0 votes
1 answer
5k views

Simple way to read Json file on android studio [duplicate]

I have a JSON file containing a list of countries and I want to integrate it into my android studio java project then read the content via code, where to put the file in the project and what's the ...
YOUSFI Mohamed Walid's user avatar
0 votes
2 answers
84 views

Volley is not pulling Json data from my URL

people so I have a valid URL with JSON data in it, I pull the data with volley but it's not working for some reason, when I change the URL it works. But I need to use this URL with this data in my ...
stefan josimovski's user avatar
1 vote
1 answer
981 views

YouTube API : org.json.JSONException: No value for <param>

Error while running my project E/ChannelActivity: New Video IdjxaQXUCdIt0 New Video IdSz6U9KWa8s8 W/System.err: org.json.JSONException: No value for videoId at org.json....
Jacintha Rego's user avatar
0 votes
1 answer
168 views

How to update JSON on the API android

I am creating an app to update the JSON data on the API url I want to add a new array item in the JSON ARRAY from the android app Is it possible to do it and how to do it?
user avatar
0 votes
2 answers
64 views

How to show data from ArrayList to RecycleView?

I read data from JSON to ArrayList like this code. MySQLConnect.java public List<ComputerService> getData(){ String url = URL + GET_URL; StringRequest stringRequest = new StringRequest(...
user58519's user avatar
  • 629
1 vote
1 answer
555 views

How to get data from Request sent through HTTP callable function?

I am using the Firebase Admin SDK to complete administrative functions. The functions i have deployed are on the Firebase Cloud Function in my console. I have been able to call these functions from ...
CadyOG's user avatar
  • 175
0 votes
1 answer
118 views

Expected BEGIN_OBJECT but was STRING at line - GSON

I am getting bellow url from api: {"status":true,"ref":"urltogo","url":"http:\/\/myurl\/login\/index.php?testsession=55207"} And here my connection api: mCompositeCommonDisposable.add( ...
jo jo's user avatar
  • 1,838
0 votes
4 answers
1k views

How to extract value from raw payload in android?

I am trying to extract google.sent_time from the following JSON , how do I get that value? It seems like it's a raw payload, and not straightforward JSON, so wondering if there is a way to extract it? ...
Angela Heely's user avatar
0 votes
1 answer
302 views

Unable to parse Json Data from json file in Android using Gson

I am facing below error, I don't know why this error occurs. I spent 48 hrs and try to solve with different-different technique. java.lang.IllegalStateException: Expected a string but was ...
VISHAL RANA's user avatar
0 votes
0 answers
52 views

Can JSON Array be sent through Url in android

Url Maximum length: Although the specification of the HTTP protocol does not specify any maximum length, practical limits are imposed by web browser and server software. Microsoft states that the ...
Paul's omg Hardware's user avatar
0 votes
2 answers
2k views

Show only certain items in recycleview according to condition

I have a recycleview showing a list of audio files fetched from my audios.json file hosted on my server. i have a model class with a getter method getLanguage() to see the audio language. I would like ...
Clutchplasdfsdfte's user avatar
0 votes
1 answer
101 views

How to refresh first recyclerview data when user clicks on second recyclerview items

I have first recyclerview in Main Activity and second recycler is in Fragment. I want when user clicks on first recycler item then second recyclerview data should refresh according to the clicked item....
Geetika Sachdeva's user avatar
0 votes
2 answers
184 views

Android - JSON cleartext parsing from URL returning null but connection is okay

I am parsing data from an URL. And I am using the code below to get cleartext data in logcat. But, although there are no issues it is showing nothing but null. class RetrieveFeedTask extends ...
Appolonias's user avatar
0 votes
1 answer
61 views

Android - Get Data using InputStream returning nothing/empty

I am parsing data of JSON that starts something like this below... [ {"title":"dummy", "content":"ajsfhk"}, {"title":"dummy", "content":"ajsfhk"}, {"title":"dummy", "content":"ajsfhk"}, ] ...
Appolonias's user avatar
0 votes
1 answer
49 views

How can I improve the speed of retrieving data from internet in an AsyncTask?

In my following code I am trying to retrieve some JSON data by passing an URL. It works fine but does take some time in fetching data from the Internet. Even though the data isn't that bulky but still ...
xafak's user avatar
  • 51
0 votes
1 answer
151 views

Make Json from model with gson in android studio

I have repeatedly searched for this on Google or other sources, but haven't found anything suitable for my problem, try to help me to resolve this
Axeleryz's user avatar
1 vote
2 answers
3k views

How to fetch json inside json inside another json?

I am new to android and json. I want to implement some logic where i can get the data from sub1 from json inside json inside another json. Is there any way to get that data? This is how my json file ...
Akshay Patel's user avatar
1 vote
3 answers
4k views

How do I receive live API data updates on Android?

I am working on receiving live API data updates on my android app. I am against polling as it drains battery and not in favor of anything that requires to check data updates manually every 5 mins or ...
user avatar
0 votes
2 answers
46 views

How to get JSON data out of JSON Array?

I am using the Volley libary to understand working with JSON data, i have successfully retrieved some data and would like to know how to get the individual data out of my json array? I have tried ...
Arron Lapta's user avatar
0 votes
1 answer
112 views

cannot put values inside Array List

I've tried to set values inside movies ArrayList in BlogRepository class. but I couldn't find the results in the end. I want to modify the example so that the storage inside the ArrayList is movies. ...
ibrahem ahmed's user avatar
0 votes
1 answer
884 views

How to parse JSON date format inside a RecyclerView onbindViewHolder in android studio? [duplicate]

I have looked everywhere but I couldn't find anything about parsing a date time json object inside RecyclerView onbindViewHolder in android. How to do it inside a recycler view adapter? I’m new in ...
Aleef Faminn's user avatar
0 votes
1 answer
52 views

How to use POST method to send raw complex and big JSON with slide changes using Retrofit in android?

I'm getting a huge JSON response from the server which I have to modify some two or three field and post the same JSON file to the sever again with raw JSON. How can I do it? PLease Help, Thanks in ...
Aleef Faminn's user avatar
0 votes
1 answer
2k views

How do I display events to a specific date and time in a MaterialCalendarView?

I am testing out a sample app where I am trying to achieve displaying time and date to a specific day.Currently, it just plots to the entire month even if the event if for a day. Say if the event if ...
user avatar
1 vote
2 answers
962 views

Setting a new line from API call not creating newline

Setting a new line without a network call works for me: mTextView.setText("Message 1 \nMessage 2"); However when I set the text from the JSON in an API call it doesn't work for me: mTextView....
DIRTY DAVE's user avatar
  • 2,711
0 votes
2 answers
879 views

(Rest Api) Recycler View with Accept and Decline a request Buttons in each Row in android

I am developing an android application based on Rest Api remote data, in which I have made one RecyclerView. I have added 2 buttons with each row in RecyclerView. These 2 buttons are Accept and ...
Aleef Faminn's user avatar
-1 votes
1 answer
483 views

List View with Accept and Decline a request Buttons in each Row in android (Rest Api)

I am developing an Android application based on REST API remote data, in which I have made one ListView with two buttons, "Accept" and "Decline". When the user selects the "Accept" button, certain ...
Sheikh Asif Iqbal's user avatar
0 votes
2 answers
120 views

Logging into app with Networking GET method using JSON

I'm fairly new to Android and some of its core concepts. I'm looking for a basic login screen. In order for the user to login http functions (GET) methods must be used to validate the credentials with ...
Bob's user avatar
  • 61
0 votes
1 answer
458 views

How do I retrieve data independently from nested JSON objects that are part of the same group in android/java? ( more clarity/details in body)

I have a pretty common scenario, but I am stuck trying to figure out how to retrieve data from certain json objects within the same json response but returning different size of items. To make it less ...
user avatar
1 vote
1 answer
159 views

how to retrieve data from json array (Android)?

I'm trying to get the data from json using url. There is no problem with json. This is the json url I'm getting null point exception error. I guess the problem is with my getData() function. I tried ...
Shiroshan's user avatar
2 votes
0 answers
2k views

What is the correct way to send (Rich Text) Formatted Data via a Web API

I want to have a (JSON) API (so it is accessible for my Android App) where i can send RTF text. I want to retrieve text for articles, so it would be very useful if the formatting can also be send ...
FlipForties's user avatar
0 votes
1 answer
2k views

Retrofit error URL query string must not have replace block by provided dynamically values

I want to get JSON data using retrofit get this error Caused by: java.lang.IllegalArgumentException: URL query string must not have replaced the block. For dynamic query parameters use @Query. ...
Attaullah's user avatar
  • 4,021
0 votes
2 answers
138 views

App crash when JSONArray is bigger than 261

There is a JSON that include bus tickets information. We use volley to get data from web service. After, it get these bus information it send adapter with broadcast. Also, it occurs this error with ...
Ahmet Yılmaz's user avatar
3 votes
1 answer
185 views

Convert FirebaseDatabase jsonObject to jsonArray and then that jsonArray to .xlsx format

I'm getting DataSnapshot from a Firebase database as a JsonObject. I have to convert this JsonObject into JsonArray and then that JsonArray into Excel format and then download that file into mobile ...
Umair Iqbal's user avatar
  • 2,069
1 vote
4 answers
142 views

looping through nested json array is adding previously assigned value to data model

please look into this json: { "data": [ { "date": "Thursday 1, August, 2019", "time": [ { "times": "1:13PM to 1:13PM", "notice": "testing", "...
Majid's user avatar
  • 201
2 votes
1 answer
887 views

Serializing a Map with custom MapAdapter in moshi

I am trying to write a custom MapAdapter in moshi My requirement is to ignore any bad elements in the map. I have successfully written deserialization method(fromJson()), however, I am facing trouble ...
Abhishek Bansal's user avatar

1
2 3 4 5
12