flutter_background_service icon indicating copy to clipboard operation
flutter_background_service copied to clipboard

keeps turning on phone LED lights

Open zamaniafshar opened this issue 2 years ago • 3 comments

from version 0.2.0 until the version 2.0.0

i tried all of them and they have this problem

image

i tested it in two androids(7 and 8) and on both of them i have this problem

here is the code

`import 'dart:async';

import 'package:flutter_background_service/flutter_background_service.dart';

FlutterBackgroundService _service = FlutterBackgroundService();

Future initializeBackgroundService() async { await _service.configure( androidConfiguration: AndroidConfiguration( onStart: backgroundTask, isForegroundMode: false, autoStart: false, ), iosConfiguration: IosConfiguration( onForeground: backgroundTask, onBackground: backgroundTask, autoStart: false, ), ); _service.startService(); }

Future backgroundTask(ServiceInstance service) { Timer.periodic(Duration(seconds: 1), (timer) { print('backgroundTask'); }); return Future.value(true); } `

zamaniafshar avatar Apr 23 '22 19:04 zamaniafshar

hi @MohammadAminZamaniAfshar thanks for the report, unfortunately I don't have a device with LEDs to reproduce this issue.

ekasetiawans avatar Apr 26 '22 12:04 ekasetiawans

i think, it can be caused by notification channel priority. Could you try to change the notification priority on the application setting?

ekasetiawans avatar Jun 14 '22 13:06 ekasetiawans

Recentlly i tried the last version of package(2.1.3) and this problem is fixed but not completely When service starts(no matter on foreground mode or background mode) the phone lights turning on for a few seconds and then they turned off I also change the notification priority on the application setting and nothing changed Only when i turn on save power mode , phone lights didn't turn on when service start

https://user-images.githubusercontent.com/88077166/175516754-70d4779e-2574-495c-aa21-465b647e9d1b.mp4

zamaniafshar avatar Jun 24 '22 10:06 zamaniafshar