public override StartCommandResult OnStartCommand(Intent intent, StartCommandFlags flags, int startId) { _socket.Start(); // Keep the service open return StartCommandResult.NotSticky; }
public FlutnetWebSocketService() { // Generate a long task when start the debug service _taskId = UIApplication.SharedApplication.BeginBackgroundTask("FlutnetWebSocket", () => { // Expiration handler do nothing }); _socket = new FlutnetWebSocket(); _socket.Start(); }