• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

I interlink JSON string which created by Gson library, with HttpURLCOnnection api and PHP?

 
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I created this JSON sting by the Gson libary:



and I want to send this data every 60 seconds to the server via httpURLConnection api from the Asyntask class I tried it with the aid of WAMP but I am not getting any ouput of doInbackgound.



I used this URL in the case of WAMP: http://192.168.134.45/connection.php where 192.168.134.45 is my Wifi ip address.


PHP connection file with the default WAMP setting.


 
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you aren't getting any output from doInBackground, that would have to be because you aren't calling it. Otherwise your logging code at line 5 would be executed and you would be seeing output at wherever System.out is pointed at.
 
Alex Ardoin
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
sorry I meant I am not getting output from


I am getting the JSON String in doInBackground method:



I want to send the JSON string from my smartphone device to the XMAPP mysql.
 
Paul Clapham
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

alex friday wrote:sorry I meant I am not getting output from



Then an exception is being thrown before that line is reached.

I want to send the JSON string from my smartphone device to the XMAPP mysql.



Have you checked that your smartphone's IP address is in the same local network as that server?
 
reply
    Bookmark Topic Watch Topic
  • New Topic