Commit 7a672462 authored by Chris Scott's avatar Chris Scott

Fix typo in ios src-filenames: CDVBackgroundGeoLocation vs CDVBackgroundGeolocation

parent 2885c5bb
...@@ -27,5 +27,6 @@ ...@@ -27,5 +27,6 @@
- (void) resetOdometer:(CDVInvokedUrlCommand *)command; - (void) resetOdometer:(CDVInvokedUrlCommand *)command;
- (void) addGeofence:(CDVInvokedUrlCommand *)command; - (void) addGeofence:(CDVInvokedUrlCommand *)command;
- (void) onGeofence:(CDVInvokedUrlCommand *)command; - (void) onGeofence:(CDVInvokedUrlCommand *)command;
- (void) playSound:(CDVInvokedUrlCommand *)command;
@end @end
//// ////
// CDVBackgroundGeoLocation // CDVBackgroundGeolocation
// //
// Created by Chris Scott <chris@transistorsoft.com> on 2013-06-15 // Created by Chris Scott <chris@transistorsoft.com> on 2013-06-15
// //
#import "CDVBackgroundGeoLocation.h" #import "CDVBackgroundGeolocation.h"
@implementation CDVBackgroundGeolocation { @implementation CDVBackgroundGeolocation {
TSLocationManager *bgGeo; TSLocationManager *bgGeo;
...@@ -209,6 +209,15 @@ ...@@ -209,6 +209,15 @@
} }
[self.geofenceListeners addObject:command.callbackId]; [self.geofenceListeners addObject:command.callbackId];
} }
- (void) playSound:(CDVInvokedUrlCommand*)command
{
int soundId = [[command.arguments objectAtIndex:0] integerValue];
[bgGeo playSound: soundId];
CDVPluginResult *result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK];
[self.commandDelegate sendPluginResult:result callbackId:command.callbackId];
}
/** /**
* Called by js to signify the end of a background-geolocation event * Called by js to signify the end of a background-geolocation event
*/ */
......
...@@ -22,6 +22,6 @@ ...@@ -22,6 +22,6 @@
- (BOOL) isEnabled; - (BOOL) isEnabled;
- (NSDictionary*) locationToDictionary:(CLLocation*)location; - (NSDictionary*) locationToDictionary:(CLLocation*)location;
- (void) addGeofence:(NSString*)identifier radius:(CLLocationDistance)radius latitude:(CLLocationDegrees)latitude longitude:(CLLocationDegrees)longitude; - (void) addGeofence:(NSString*)identifier radius:(CLLocationDistance)radius latitude:(CLLocationDegrees)latitude longitude:(CLLocationDegrees)longitude;
- (void) playSound:(SystemSoundID)soundId;
@end @end
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<dict> <dict>
<key>Headers/TSLocationManager.h</key> <key>Headers/TSLocationManager.h</key>
<data> <data>
w7pffjKj41qqtvUN0J6fOruESPM= 1VuoMC44vEUkt1CU0bbgpBs3zGY=
</data> </data>
<key>Info.plist</key> <key>Info.plist</key>
<data> <data>
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
<dict> <dict>
<key>Headers/TSLocationManager.h</key> <key>Headers/TSLocationManager.h</key>
<data> <data>
w7pffjKj41qqtvUN0J6fOruESPM= 1VuoMC44vEUkt1CU0bbgpBs3zGY=
</data> </data>
<key>Modules/module.modulemap</key> <key>Modules/module.modulemap</key>
<data> <data>
......
...@@ -206,6 +206,15 @@ module.exports = { ...@@ -206,6 +206,15 @@ module.exports = {
'onGeofence', 'onGeofence',
[]); []);
}, },
playSound: function(soundId) {
var success = function() {};
var failure = function() {};
exec(success,
failure,
'BackgroundGeoLocation',
'playSound',
[soundId]);
},
_setTimestamp: function(rs) { _setTimestamp: function(rs) {
// Transform timestamp to Date instance. // Transform timestamp to Date instance.
if (typeof(rs) === 'object') { if (typeof(rs) === 'object') {
......
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