0

I need to somehow press the back button, but do it programmatically, without pressing the physical button, or play finish(), only in another application.

I found this: Trigger back-button functionality on button click in Android, but this reproduces the click from activity, and I need from service

Mr.AntonDer
  • 113
  • 4

1 Answers1

1

there is no way for handling back press using only Service, but you can fake this click using AccessibilityService (and performGlobalAction(GLOBAL_ACTION_BACK) method call), there is no other way...

snachmsm
  • 17,866
  • 3
  • 32
  • 74