Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Sly2024 authored Dec 24, 2020
1 parent e6906b8 commit b8efc62
Showing 1 changed file with 18 additions and 7 deletions.
25 changes: 18 additions & 7 deletions lib/background_location.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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", <String, dynamic>{
"title": title
return await _channel.invokeMethod("set_android_notification", <String, dynamic>{
"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", <String, dynamic>{
"interval": interval.toString(),
});
} else {
//return Promise.resolve();
}
}


/// Get the current location once.
Future<Location> getCurrentLocation() async {
Completer<Location> completer = Completer();
Expand Down

0 comments on commit b8efc62

Please sign in to comment.