Discussion Forums  >  Maps, Device Location, Tracking

Replies: 3    Views: 93

Sevens
Code is Art
Profile
Posts: 146
Reg: Jan 28, 2012
New York Metro ...
11,960
06/05/12 10:39 AM (13 years ago)

Using Multiple Location Map in BT v1.4

//download class in new thread / class public class DownloadThread extends Thread{ boolean threadRunning = false; String downloadURL = ""; String saveAsFileName = ""; String downloadType = ""; void setThreadRunning(boolean bolRunning){ threadRunning = bolRunning; } void setDownloadURL(String theURL){ downloadURL = theURL; I suspect that I could change this URL to be http://www.yourdomain.com/location-list.php Is this correct? If not, can someone tackle this issue so we dont have to get another key and design a new app to update our v1.4 apps. thanks in advance, Sevens
 
Fred@mySkylla com
Android Fan
Profile
Posts: 5259
Reg: Oct 03, 2011
location unknow...
62,560
like
06/05/12 11:10 AM (13 years ago)
Following
 
Sevens
Code is Art
Profile
Posts: 146
Reg: Jan 28, 2012
New York Metro ...
11,960
like
06/05/12 10:54 PM (13 years ago)
Well, I'm working on getting the dataURL to become what we add to the Screen_locationMap.java instead of downloading from BT. I'm close but I'm not a programmer so its really hard for me to find the right language to implement.
 
Sevens
Code is Art
Profile
Posts: 146
Reg: Jan 28, 2012
New York Metro ...
11,960
like
06/19/12 08:00 AM (13 years ago)
OK. A little progress today. To start. here is the link to a good tutorial. http://www.buzztouch.com/resources/Posting_Current_Location_to_a_Database_v1.0.pdf beware though. this works for 2.0 apps and give trouble for 1.4 apps. Here are my additions to the php code. to connect to your server, instead of using localhost for anything, you must use your own server name "mysql-happyforum.domainname.com" also where the tutorial says to use ...$db) to declare the host username and password, change the variable to $conn. then declare the database with $db (........which is located inside of, $conn) table is theguide or here shipit_contacts (.........which is located in, $db) so it should look like this: <?php $latitude = $_GET['latitude']; $longitude = $_GET['longitude']; $conn = mysql_connect("mysql-happyforum.domainname.com", "username", "password"); $db = mysql_select_db("happyforum",$conn); if (isset($_POST['submit'])) { $SubmitterEmail = $_POST['SubmitterEmail']; $latitude = $_POST['latitude']; $longitude = $_POST['longitude']; $Status = $_POST['Status']; $title = $_POST['title']; $address = $_POST['address']; $sql = "INSERT INTO shipit_contacts (SubmitterEmail, latitude, longitude, Description, Status, title, address) VALUES ('$SubmitterEmail','$latitude','$longitude','$Description','$Status', 'title', 'address' )"; $result = mysql_query($sql); print "Successfully Submitted. Press the BACK button to resubmit your location or manually enter coordinates below."; }else{ $error = $resp->error; } ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title></title> <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" /> <meta content="width=device-width; initial-scale=1.0; maximum-scale=2.0; user-scalable=1;" name="viewport" /> <style type="text/css"> html{background-color:transparent;height:100%;width:100%;} body{background-color:transparent;font-size:11pt;font-family:helvetica;} img{border:0px;} </style> </head> <body> <form name="form" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>"> <table border="0" cellspacing="2" cellpadding="2"> <tr> <td><strong>Your Email</strong></td> </tr> <tr> <td><input type="email" name="SubmitterEmail" size="40"></td> </tr> <tr> <td><strong> Latitude </strong></td> </tr> <tr> <td><input type="text" name="latitude" size="40" value="<?php echo $_GET['latitude']; ?>"></td> </tr> <tr> <td><strong> Longitude </strong></td> </tr> <tr> <td><input type="text" name="longitude" size="40" value="<?php echo $_GET['longitude']; ?>"></td> </tr> <tr> <td align="center"> <?php printf ("<img src=\"http://maps.googleapis.com/maps/api/staticmap?center=%s,%s&markers=color:green|%s,%s&zoom=15&size=300x150&sensor=false\">", $latitude, $longitude, $latitude, $longitude); ?> </td> </tr> <tr> <td> <font> Describe yourself or your company here. Maximum is 140 characters.<br> <textarea name="Description" rows=4 wrap="physical" cols=40> </textarea> <br> </td> </tr> <tr> <td><input type="hidden" name="Status" value="HIDDEN"> </td> </tr> <tr> <td><strong> Name or Company Name </strong></td> </tr> <tr> <td><input type="text" name="title" size="40" value="Shipit User"></td> </tr> <tr> <td><strong> Address </strong></td> </tr> <tr> <td><input type="text" name="Address" size="40" value="123 Anytown, My City, USA 10002"></td> </tr> <tr> <td ColSpan=3 RowSpan=1 Align=Center> <INPUT TYPE="submit" NAME="submit" VALUE="Submit"> <INPUT TYPE="reset" VALUE="Reset"> </td> </tr> </table> </form> </body> </html>
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.