How do i simply "hit" a remote php URL?

by chat2joe » Tue, 08 Mar 2011 05:51:14 GMT


Sponsored Links
 Hey guys,

Sorry if this is a stupid question, I'm new to android and JAVA and
have a project which is due very soon.

I want to upload my gps positions to a MySQL database. I have a php
file all ready to accept variables as file.php?lat=55&long=22 . Once
that url is entered... the lat and long go into my database. The
closest I've seen for this is a HTTP request... I've been trying to
get this working but it seems too complicated for my purpose as I
don't need to listen for or process any return data.

Is there a simple way to "hit" the url within a function? Ideally I'd
like to have it triggered on gps location change, then also maybe a
timout type delay to restrict that to only every 8 seconds.

Thanks for any help on it!

Joe

-- 



Re: How do i simply "hit" a remote php URL?

by Aisthesis » Tue, 08 Mar 2011 21:53:08 GMT


 this can be improved a little imo, but it should get you going:
 http://www.aviransplace.com/2008/01/08/make-http-post-or-get-request-from-java/ 





-- 


Sponsored Links


Other Threads

1. Why cant apps be downloaded to an external SD card??

This discussion shows that a solution is more in sight now than it was
a month ago: 

2. Europeans after the G1

The side of the UK box says that;

"This equipment may be operated in AT, BE, CY, CZ, DK, EE, FI, FR, DE, 
GR, HU, IE, IT, LV, LT, LU, MT, NL, PL, PT, SK, SI, ES, SE, GB, IS, LI, 
NO, CH, BG, RO, TR"

So if you can get one unlocked and you live in one of those countries 
you shouldn't have any problems.

Al.

-- 
Al Sutton

W: www.alsutton.com
B: alsutton.wordpress.com
T: twitter.com/alsutton


--~--~---------~--~----~------------~-------~--~----~

3. Using PAD files for Android application releases

4. R.java file not being generated by eclipse plugin

5. How many threads are created by android vm for each android application

6. IP address for G1 via USB?

7. Where can I find output of System.out.println?