Commit cd3a21b6 authored by Chris Scott's avatar Chris Scott

Merge pull request #125 from christocracy/gradle

Gradle
parents ea71a5b3 4f1a1c95
......@@ -27,9 +27,9 @@
<!-- android -->
<platform name="android">
<framework src="com.google.android.gms:play-services-location:7.3.0" />
<source-file src="src/android/libs/eventbus-2.4.0.jar" target-dir="libs" />
<source-file src="src/android/libs/transistor-locationmanager.jar" target-dir="libs" />
<framework src="src/android/build.gradle" custom="true" type="gradleReference" />
<resource-file src="src/android/libs/tslocationmanager.aar" target="src/android/libs/tslocationmanager.aar" />
<source-file src="src/android/CDVBackgroundGeolocation.java" target-dir="src/com/transistorsoft/cordova/bggeo" />
<source-file src="src/android/BootReceiver.java" target-dir="src/com/transistorsoft/cordova/bggeo" />
......
......@@ -20,6 +20,7 @@ import android.app.AlertDialog;
import android.content.DialogInterface;
import de.greenrobot.event.EventBus;
import de.greenrobot.event.Subscribe;
import android.app.Activity;
import android.content.Intent;
import android.content.SharedPreferences;
......@@ -448,6 +449,7 @@ public class CDVBackgroundGeolocation extends CordovaPlugin {
* EventBus listener for Event Bundle
* @param {Bundle} event
*/
@Subscribe
public void onEventMainThread(Bundle event) {
if (event.containsKey("request")) {
return;
......@@ -535,6 +537,7 @@ public class CDVBackgroundGeolocation extends CordovaPlugin {
* EventBus listener for ARS
* @param {ActivityRecognitionResult} result
*/
@Subscribe
public void onEventMainThread(ActivityRecognitionResult result) {
currentActivity = result.getMostProbableActivity();
......@@ -554,6 +557,7 @@ public class CDVBackgroundGeolocation extends CordovaPlugin {
* EventBus listener
* @param {Location} location
*/
@Subscribe
public void onEventMainThread(Location location) {
JSONObject locationData = BackgroundGeolocationService.locationToJson(location, currentActivity, isMoving);
this.onLocationChange(locationData);
......@@ -587,7 +591,8 @@ public class CDVBackgroundGeolocation extends CordovaPlugin {
}
/**
* EventBus handler for Geofencing events
*/
*/
@Subscribe
public void onEventMainThread(GeofencingEvent geofenceEvent) {
Log.i(TAG, "- Rx GeofencingEvent: " + geofenceEvent);
......
android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
defaultConfig {
minSdkVersion 15
targetSdkVersion 22
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
repositories{
jcenter()
flatDir{
dirs 'src/android/libs'
}
}
dependencies {
compile 'com.google.android.gms:play-services:7.5.0'
compile 'de.greenrobot:eventbus:3.0.0-beta1'
compile(name:'tslocationmanager', ext:'aar')
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment