diff --git a/lib/background_location.dart b/lib/background_location.dart index 33ec850..1b9fc10 100644 --- a/lib/background_location.dart +++ b/lib/background_location.dart @@ -21,18 +21,29 @@ class BackgroundLocation { return await _channel.invokeMethod("start_location_service"); } - static setNotificationTitle(String title) async { - var result; - + static setAndroidNotification({String title, String message, String icon}) async { if (Platform.isAndroid) { - result = await _channel.invokeMethod("set_notification_title", { - "title": title + return await _channel.invokeMethod("set_android_notification", { + "title": title, + "message": message, + "icon": icon }); + } else { + //return Promise.resolve(); } - - return result; } + static setAndroidConfiguration({int interval}) async { + if (Platform.isAndroid) { + return await _channel.invokeMethod("set_configuration", { + "interval": interval.toString(), + }); + } else { + //return Promise.resolve(); + } + } + + /// Get the current location once. Future getCurrentLocation() async { Completer completer = Completer();