Skip to content

Commit

Permalink
save: initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
evoxmusic committed Apr 19, 2016
1 parent fdd0fca commit 2334f24
Show file tree
Hide file tree
Showing 8 changed files with 116 additions and 254 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Expand Up @@ -6,4 +6,5 @@
.DS_Store
/build
/captures
.idea
.idea
gradle/wrapper/gradle-wrapper.jar
111 changes: 111 additions & 0 deletions README.md
@@ -0,0 +1,111 @@
<center><img src="https://raw.githubusercontent.com/ridesafe/project/gh-pages/ridesafe_256.jpg" ></center>

## RideSafe
[RideSafe](http://www.ridesafe.io) is an open source project which detects bikers' falls. This is possible thanks to intelligent algorithms and data collection.

Our smartphones have accelerometers to measure acceleration forces of individuals, these data can be used to analyse the behaviour: when walking, running, biking and even falling !
The self learning algorithms are able to improve the detection of a fall by analysing such data.

Go to:
* [RideSafe Backend](#ridesafe-backend)
* [How it works](#how-it-works)
* [How to install](#how-to-install)
* [How to use](#how-to-use)
* [Contribute](#contribute)
* [Demo](#demo)
* [Who are we](#who-are-we)
* [Partners](#partners)
* [More](#more)
* [Contact](#contact)

## RideSafe Android lib
The RideSafe lib is in charge of getting accelerometer data (timestamp, x², y², z²) from your smartphone and then ship them to the [RideSafe Backend](https://github.com/ridesafe/ridesafe-backend).

## How it works
RideSafe needs accelerometer data to detect bikers' falls. Once the lib installed and configured on your app, this will listen for new accelerometer events, storing them in memory (very tiny footprint) before shipping them to the backend.

## How to install

Included dependencies are:
* [Kotlin](https://kotlinlang.org/)
* [RxJava](https://github.com/ReactiveX/RxJava)
* [Retrofit 2](http://square.github.io/retrofit/)
* [Okhttp 3](http://square.github.io/okhttp/)
* [GSON](https://github.com/google/gson)


Into your build.gradle, add this repository

```
repositories {
...
maven { url "https://jitpack.io" }
}
```

Then add the Android RideSafe lib dependency
```
dependencies {
compile 'com.github.ridesafe:ridesafe:Tag'
}
```

## How to use

It's straightforward:
```Java
RideSafeBackend rsb = new RideSafeBackend("https://api.ridesafe.io")

RideSafe rs = RideSafe.Builder()
.setContext(getContext())
.setBackend(rsb)
.setPushToBackendBatchSize(1000)
.addReadyCallback(readyCallback)
.addActivityObserver(activityObserver)
.build()

# start recording rider activity
rs.startRecordingActivity()

# stop recording rider activity
rs.stopRecordingActivity

# end RideSafe session
rs.close()

```

## Contribute
There are many ways to contribute to RideSafe.
* **You are developer**: You have an idea to make RideSafe better ? You want to clean the code ?.. Just send us a Pull Request :)
* **You are data scientist**: Take a look at our activity recognition algorithms and tell us what do you think and how to improve them.
* **You are motorcycling professional**: More we can test, more accurate are algorithms and fall detection. Contact us to see how you can contribute !

## Demo
RideSafe is used into our [Nousmotards](https://play.google.com/store/apps/details?id=com.nousmotards.android) app.

## Who are we ?
RideSafe has been launched by [Nousmotards](https://www.nousmotards.com).
It is a service platform for bikers, created by [3 engineers and bikers](http://blog.nousmotards.com/2015/04/24/ouverture-du-blog-nousmotards/):
* [Romaric Philogène](https://fr.linkedin.com/in/romaricphilogene)
* [Rémi Demol](https://www.linkedin.com/in/demolremi/fr)
* [Pierre Mavro](https://fr.linkedin.com/in/pmavro/fr)

We are creating a set of services tailored exclusively to the world of motorcycling!
Nousmotards app is available on Mobile ([Android](https://play.google.com/store/apps/details?id=com.nousmotards.android), iOS) and on your [browser](https://www.nousmotards.com).

## Partners
* [FFMC - Fédération Française des Motards en Colère](http://ffmc.fr/)
* [Motomag](http://www.motomag.com/)

We are looking for worldwide partners specialised in motorbike and/or technology.

## More
The "Activity Recognition" project is based on the work of [Amira Lakhal](https://github.com/MiraLak), which detects one type of activity from the accelerometer integrated in smartphones and a self-learning algorithm called [machine learning](https://en.wikipedia.org/wiki/Machine_learning).
The data and algorithms are available under the Apache license, this means that the changes and improvements made will be communicated to the community.
Commercial use is unrestricted.

## Contact

Contact us at [contact@ridesafe.io](mailto:contact@ridesafe.io) or [contact@nousmotards.com](mailto:contact@nousmotards.com)
Follow us: [Twitter](https://twitter.com/Nousmotards) [Facebook](https://www.facebook.com/nousmotardsapp)
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
#Wed Oct 21 11:34:03 PDT 2015
#Tue Apr 19 16:00:28 CEST 2016
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.8-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-2.3-all.zip
160 changes: 0 additions & 160 deletions gradlew

This file was deleted.

90 changes: 0 additions & 90 deletions gradlew.bat

This file was deleted.

1 change: 1 addition & 0 deletions ridesafe-lib-android/build.gradle
Expand Up @@ -43,6 +43,7 @@ buildscript {

dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
}
}

Expand Down
Expand Up @@ -45,7 +45,6 @@ class RideSafeBackend constructor(val host: String,

val builder = chain.request().newBuilder().addHeader("Device", "android")

authenticationToken?.let { builder.addHeader("Device-Id", it) }
authenticationToken?.let { builder.addHeader("Authorization", it) }

chain.proceed(builder.build())
Expand Down

0 comments on commit 2334f24

Please sign in to comment.