From: Alex Sadleir Date: Sat, 22 Dec 2012 12:00:28 +0000 Subject: android client X-Git-Url: http://maxious.lambdacomplex.org/git/?p=scannr.git&a=commitdiff&h=1b2322d626d1d63ae7a9cbb425af06029e2b3fee --- android client --- --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,18 @@ *.pyc /nbproject/private/ /output.txt + +bin +gen +target +.settings +.classpath +.project +*.keystore +*.swp +*.orig +*.log +*.properties +seed.txt +map.txt + --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -2,10 +2,6 @@ - - - - @@ -13,55 +9,41 @@ - - - - - - - - - - - - - - - - + + - + @@ -123,16 +105,16 @@ - + - - + + - + @@ -158,10 +140,10 @@ @@ -197,7 +179,6 @@ - @@ -219,6 +200,7 @@ + @@ -227,8 +209,8 @@ + - - - - + @@ -430,26 +413,26 @@ - - - - - + + + + + - + - - - + + + --- a/calls.json.php +++ b/calls.json.php @@ -8,7 +8,7 @@ group by tgid, date_trunc(\'hour\', call_timestamp) order by time'); $sth->execute(Array($timeFrom, $timeTo)); - return $sth->fetchAll(); + return $sth->fetchAll(PDO::FETCH_ASSOC); } @@ -20,7 +20,7 @@ group by sensor_id, date_trunc(\'day\', time) order by time'); $sth->execute(Array($TGID)); - return $sth->fetchAll(); + return $sth->fetchAll(PDO::FETCH_ASSOC); } function getTGIDDataYears($TGID, $timeFrom, $timeTo) { @@ -28,7 +28,7 @@ $sth = $conn->prepare("select distinct extract('year' from call_timestamp) as year from recordings where tgid = ? order by year"); $sth->execute(Array($TGID)); - return $sth->fetchAll(); + return $sth->fetchAll(PDO::FETCH_ASSOC); } function getTGIDDataMonths($TGID, $timeFrom, $timeTo) @@ -37,7 +37,7 @@ $sth = $conn->prepare("select distinct extract('month' from call_timestamp) as month, extract('year' from call_timestamp) as year from recordings where tgid = ? order by year, month"); $sth->execute(Array($TGID)); - return $sth->fetchAll(); + return $sth->fetchAll(PDO::FETCH_ASSOC); } function getTGIDDataDays($TGID, $timeFrom, $timeTo) @@ -47,13 +47,21 @@ $sth->execute(Array($TGID)); - return $sth->fetchAll(); + return $sth->fetchAll(PDO::FETCH_ASSOC); } $action = (isset($_REQUEST['action']) ? $_REQUEST['action'] : ''); $TGID = (isset($_REQUEST['tgid']) ? $_REQUEST['tgid'] : ''); $timefrom = (isset($_REQUEST['from']) ? $_REQUEST['from'] : ''); $timeto = (isset($_REQUEST['to']) ? $_REQUEST['to'] : ''); +if ($action == "data") { +$sth = $conn->prepare('select * from recordings + order by call_timestamp desc limit 100'); + +$sth->execute(Array()); + +echo json_encode ($sth->fetchAll(PDO::FETCH_ASSOC)); +} if ($action == "data_description") { $timefrom = strtotime($timefrom); $timeto = strtotime($timeto); --- /dev/null +++ b/scannrmobile/.gitignore @@ -1,1 +1,14 @@ +bin +gen +target +.settings +.classpath +.project +*.keystore +*.swp +*.orig +*.log +*.properties +seed.txt +map.txt --- /dev/null +++ b/scannrmobile/.idea/.name @@ -1,1 +1,1 @@ - +scannrmobile --- /dev/null +++ b/scannrmobile/.idea/ant.xml @@ -1,1 +1,8 @@ + + + + + + + --- /dev/null +++ b/scannrmobile/.idea/compiler.xml @@ -1,1 +1,27 @@ + + + + + + --- /dev/null +++ b/scannrmobile/.idea/copyright/profiles_settings.xml @@ -1,1 +1,5 @@ - + + + + + --- /dev/null +++ b/scannrmobile/.idea/encodings.xml @@ -1,1 +1,6 @@ + + + + + --- /dev/null +++ b/scannrmobile/.idea/misc.xml @@ -1,1 +1,11 @@ + + + + + + + + + + --- /dev/null +++ b/scannrmobile/.idea/modules.xml @@ -1,1 +1,10 @@ + + + + + + + + + --- /dev/null +++ b/scannrmobile/.idea/scopes/scope_settings.xml @@ -1,1 +1,5 @@ - + + + + --- /dev/null +++ b/scannrmobile/.idea/uiDesigner.xml @@ -1,1 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + --- /dev/null +++ b/scannrmobile/.idea/vcs.xml @@ -1,1 +1,8 @@ + + + + + + + --- /dev/null +++ b/scannrmobile/.idea/workspace.xml @@ -1,1 +1,778 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + localhost + 5050 + + + + + + + + + 1356156646856 + 1356156646856 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +