• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Approach to update the data in the map

 
alex friday
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
I have Checkboxlist where the user can select some bus routes which I am envloping in JSON format and sending it from the inner class MyAsynTask in GetLLRD class to the server afterwardsI am getting response from the Server.

Finallay, I am sending the response to the Map activity to display the londitude, latitude, route and direcction of the routes in Google map but I need an approach to send the values of first request (of the selected item in the checkboxlist) to the Server every 30 seconds to update the location of the buses in the Map actvity repeatedly. How can I do it?

I tried to invoke new MyAsyncTask().execute(); from the handler which works for the first request since the parms[0] has a value but after that the app crashes and I am getting this error:


Caused by: java.lang.ArrayIndexOutOfBoundsException: length=0; index=0

I appreciate any help.


MainActivity:



GetLLRD class:


 
alex friday
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I mean how should the app knows what the user have selected after sending the first request to the server if I extends the GetLLRD class wih Service class?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic