Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .classpath
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry exported="true" kind="lib" path="/Users/mikey/Library/adt-bundle-mac/sdk/extras/android/support/v4/android-support-v4.jar"/>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="gen"/>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
<classpathentry kind="output" path="bin"/>
<classpathentry kind="output" path="bin/classes"/>
</classpath>
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ gen
tests/bin
tests/gen
Thumbs.db

.dotcloud
4 changes: 4 additions & 0 deletions .settings/org.eclipse.jdt.core.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.compliance=1.6
org.eclipse.jdt.core.compiler.source=1.6
28 changes: 24 additions & 4 deletions AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.sfcta.cycletracks"
package="co.openbike.cycletracks"
android:versionCode="8" android:versionName="1.03">
<application android:label="@string/app_name" android:debuggable="false" android:icon="@drawable/icon72">
<activity android:label="@string/app_name" android:name=".MainInput" android:launchMode="singleTask">
<activity android:label="@string/app_name" android:name="co.openbike.cycletracks.MainInput" android:launchMode="singleTask">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
Expand All @@ -14,15 +14,35 @@

<activity android:name="SaveTrip" android:finishOnTaskLaunch="true" android:launchMode="singleInstance"></activity>

<activity android:name="ShowMap" android:finishOnTaskLaunch="true" android:launchMode="singleTop"></activity>
<activity android:name="co.openbike.cycletracks.ShowMap" android:finishOnTaskLaunch="true" android:launchMode="singleTop"></activity>
<activity android:name="UserInfoActivity" android:finishOnTaskLaunch="true" android:launchMode="singleInstance"></activity>
<service android:name="RecordingService" android:enabled="true" android:exported="true"></service><uses-library android:name="com.google.android.maps"></uses-library>
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="AIzaSyAEZ11Ihf7r5LIq7KCQmVZvj1PwAUc2T18"/>
</application>

<uses-sdk android:minSdkVersion="3" android:targetSdkVersion="4"/>
<uses-sdk android:minSdkVersion="3" android:targetSdkVersion="10"/>

<permission
android:name="co.openbike.cycletracks.permission.MAPS_RECEIVE"
android:protectionLevel="signature"/>
<uses-permission android:name="co.openbike.cycletracks.permission.MAPS_RECEIVE"/>


<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"></uses-permission>
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
<!-- additions for G maps v2 -->
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
<!-- The following two permissions are not required to use
Google Maps Android API v2, but are recommended. -->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>


<supports-screens android:normalScreens="true" android:anyDensity="true"/>
<uses-feature
android:glEsVersion="0x00020000"
android:required="true"/>
</manifest>
5 changes: 5 additions & 0 deletions README
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
Modified for OpenBike
-----------
OpenBike adds qualitative ratings for safety, ease of use, and convenience.
The modified codebase has been updated with OpenBike related services.

CycleTracks
-----------
Copyright 2009, 2010 San Francisco County Transportation Authority
Expand Down
Binary file modified art/android-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
161 changes: 0 additions & 161 deletions art/android-icon.svg

This file was deleted.

Binary file modified art/icon48.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
58 changes: 58 additions & 0 deletions cycletracks-nodejs-api.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
/* Before we begin, prepare to use nano to write to CouchDB, create a reference to particular
* database we'll be using. Prepare to use querystring to parse the POST data, and of course
* prepare to use the HTTP library
*/

var qs = require('querystring');
var http = require('http');
var tracks = require('nano')('https://ougeremseratontsedisamen:QLbVnxIDp0cHSqGgtOiMDyCR@openbike.cloudant.com/openbike');

http.createServer(function (req, res) {
// Only process POST requests (below, if non-POST, we show a debug form)
if (req.method === "POST") {
var body = "";
// Grab POST data one chunk at a time and aggregate.
req.on('data', function(chunk) { body += chunk; });
req.on('end', function() {
// Filter out the odd empty request.
if (body) {
// console.log( 'Received via POST: ' + body );
// decodedBody = decodeURIComponent( body );
// console.log('Decoded: ' + decodedBody);

try {
// CouchDB expects a genuine JSON object
var couchInput = qs.parse(body);
} catch ( err ) {
console.log('Error: JSON parsing');
res.writeHead( 500, {'Content-Type': 'application/json'});
res.write( '{ "status":"error", "msg":"json parse error" }' );
return;
}

// console.log('Updating CouchDB with ' + JSON.stringify(couchInput));

// Create a (probably) unique name for
var epoch = new Date().getTime().toString() + '_' + ( Math.floor( Math.random() * 1000 ) + 1 );
console.log(epoch);
tracks.insert(couchInput, epoch, function (err, body) { if (err) console.error(err); });
res.writeHead(200, {'Content-Type': 'application/json'});
res.write( '{"status":"success"}' );
}
});
} else {
// Not a POST request, show a debug form where you can paste JSON
dummyHTML =
'<html><head><title>Node.js test page for Cycletracks API</title></head>' +
'<body>' +
'<form method="post">' +
'JSON:<input type="text" name="json">' +
'<input type="submit">' +
'</form></body></html>';
res.writeHead(200, {'Content-Type': 'text/html'} );
res.end(dummyHTML);
}
}).listen(1337);

console.log('Server running on port 1337');

13 changes: 0 additions & 13 deletions default.properties

This file was deleted.

Binary file added lib/android-support-v13.jar
Binary file not shown.
8 changes: 8 additions & 0 deletions lib/google-play-services_lib/.classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="gen"/>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
<classpathentry kind="output" path="bin/classes"/>
</classpath>
9 changes: 9 additions & 0 deletions lib/google-play-services_lib/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.google.android.gms"
android:versionCode="3027110"
android:versionName="3.0.27 (601249-10)" >

<uses-sdk android:minSdkVersion="8"/>

</manifest>
14 changes: 14 additions & 0 deletions lib/google-play-services_lib/README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Library Project including Google Play services client jar.

This can be used by an Android project to use the API's provided
by Google Play services.

There is technically no source, but the src folder is necessary
to ensure that the build system works. The content is actually
located in the libs/ directory.


USAGE:

Make sure you import this Android library project into your IDE
and set this project as a dependency.
20 changes: 20 additions & 0 deletions lib/google-play-services_lib/google-play-services_lib.iml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="android" name="Android">
<configuration>
<option name="LIBRARY_PROJECT" value="true" />
</configuration>
</facet>
</component>
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/gen" isTestSource="false" />
</content>
<orderEntry type="jdk" jdkName="Google 4.1.2" jdkType="Android SDK" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
doc=../../../docs/reference
15 changes: 15 additions & 0 deletions lib/google-play-services_lib/project.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# This file is automatically generated by Android Tools.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file must be checked in Version Control Systems.
#
# To customize properties used by the Ant build system edit
# "ant.properties", and override values to adapt the script to your
# project structure.
#
# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt

# Project target.
target=android-8
android.library=true
Loading