Retrofit request not working with 3G connection

266 views
Skip to first unread message

Kanzaki Nguyen

unread,
Aug 25, 2015, 11:11:10 PM8/25/15
to RoboSpice
Hi,

I have coded an app with request to api for getting data. I created a request by using Retrofit module in Robospice, it works well with Wifi connection, but when I use app with 3G connection, it is not working. I don't know why. Please help me to solve this problem. Thanks in advanced

Stéphane NICOLAS

unread,
Aug 26, 2015, 12:08:15 AM8/26/15
to robo...@googlegroups.com

2015-08-25 20:11 GMT-07:00 Kanzaki Nguyen <hoangng...@gmail.com>:
Hi,

I have coded an app with request to api for getting data. I created a request by using Retrofit module in Robospice, it works well with Wifi connection, but when I use app with 3G connection, it is not working. I don't know why. Please help me to solve this problem. Thanks in advanced

--
Vous recevez ce message, car vous êtes abonné au groupe Google Groupes "RoboSpice".
Pour vous désabonner de ce groupe et ne plus recevoir d'e-mails le concernant, envoyez un e-mail à l'adresse robospice+...@googlegroups.com.
Pour obtenir davantage d'options, consultez la page https://groups.google.com/d/optout.

Kanzaki Nguyen

unread,
Aug 26, 2015, 2:51:48 AM8/26/15
to RoboSpice
In logcat I get some errors: Thread-4513 An exception occurred during request network execution :com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $
E//DefaultRequestRunner.java:154(16054): retrofit.RetrofitError: com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1

But with this code, app works well with wifi and 3G in VietNam. This bug happened with 3G in Japan, with wifi in Japan, it works well.
Do you have any solution for this problem?
Message has been deleted

Stéphane NICOLAS

unread,
Aug 26, 2015, 10:54:04 PM8/26/15
to robo...@googlegroups.com

I don't have any idea of what can happen. This is very strange. I don't think it is related to RS. You should log what you receive from network, it looks like a different content. Maybe you data provider in Japan wraps the json into something different.

S.

Kanzaki Nguyen

unread,
Aug 27, 2015, 11:17:13 PM8/27/15
to RoboSpice
This is 3G problem. Received package has something wrong.
Thank you so much!

Stéphane NICOLAS

unread,
Aug 27, 2015, 11:38:11 PM8/27/15
to robo...@googlegroups.com

My pleasure.

S.

Reply all
Reply to author
Forward
0 new messages