T
T
TechNOIR2019-07-03 18:04:20
Android
TechNOIR, 2019-07-03 18:04:20

How to emulate android power button press in Xamarin C# Android?

Hello!
I want to sketch a simple application for myself with a countdown and programmatically pressing the power button
How to emulate the shutdown button in Android on Xamarin C# Android?
Thanks in advance

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
pfg21, 2019-07-04
@pfg21

programmatically "press the shutdown button" is not possible.
it is possible to figure out which function the necessary press is bound to (short / long) and programmatically launch this function.

V
Vyacheslav Zolotov, 2019-07-03
@SZolotov

Android doesn't seem to support this. See what native developers write on stack overflow. If anything, just rewrite Java / Kotlin code in c #

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question