Skip to main content

Simulate swipe-up quit (app.quit)

Declaration

app.quit(bid)

Parameters

  • bid
    String. App bundle identifier. Use "*" to quit all. Bundle id can be found in XXT App -> More -> App List.

Notes

  • Also a force quit, but unlike app.close, the app receives a notification and has up to 10 seconds to save before fully terminated. It also clears the multitasking card.
  • Do NOT use when screen is locked. May fail to quit root apps properly and could freeze the UI; for root apps prefer app.close.

Example

-- Quit all apps
app.quit("*")
-- Quit QQ if it is running
app.quit("com.tencent.mqq")