startNodeService method
Starts the Node.js script as a foreground service (e.g. Android Notification Service).
mainFileName: The Node.js file to execute.title: Title for the notification.content: Content text for the notification.redirectOutputToLogcat: If true, routes stdout/stderr to Logcat.
Platform-specific implementations must override this.
Implementation
@override
Future<void> startNodeService(
String mainFileName,
String title,
String content, {
bool redirectOutputToLogcat = true,
}) async {
await _methodChannel.invokeMethod('startNodeService', {
'mainFileName': mainFileName,
'options': {
'redirectOutputToLogcat': redirectOutputToLogcat,
'title': title,
'content': content,
},
});
}