2

When the lock screen screen opens in Flutter, I want to launch and show my own app.

For example, an app will run on the screen that opens when I press the phone's unlock key. When the user selects the correct meaning of the English word in this application, the screen will open.

Actually what I want to ask is how can I check that the lock screen has been pressed?

I found Lock Screen plugins but they are only for creating a password lock screen.

1 Answers1

1

You can look into the hardware_buttons package. With this package, you can detect the lock screen button pressed. But I'm not sure that there is a way to launch your app with these hardware buttons.

Akif
  • 7,098
  • 7
  • 27
  • 53
  • 1
    Thank you so much! I will examine the package. Can I run my application continuously in the background? – berkipekoglu Oct 26 '20 at 19:05
  • Yes, you can. Read more from this blog: https://medium.com/vrt-digital-studio/flutter-workmanager-81e0cfbd6f6e And you can look at the background_fetch package: https://pub.dev/packages/background_fetch – Akif Oct 26 '20 at 19:09
  • Thank you so much sir! ama gerçekten çok teşekkür ederim cevabınız için :) – berkipekoglu Oct 27 '20 at 19:31