简体   繁体   English

ApplicationShortcuts,有什么方法可以不打开应用程序而仅执行某些操作,例如播放/暂停吗?

[英]ApplicationShortcuts, is there any way to not open the app and only execute some actions such as Play/Pause?

I have an audio app and I want to control play/pause with ApplicationShortcutItem directly, but I don't want to open the app. 我有一个音频应用程序,我想直接用ApplicationShortcutItem控制播放/暂停,但是我不想打开该应用程序。 Is it possible? 可能吗?

It is not possible to leave an app in the background when choosing a Home screen quick action. 选择主屏幕快速操作时, 无法将应用程序保留在后台。

From the documentation of UIApplicationShortcutItem : UIApplicationShortcutItem文档中:

When a user chooses one of your Home screen quick actions, the system launches or resumes your app and UIKit calls the application(_:performActionFor:completionHandler:) method in your app delegate. 当用户选择您的主屏幕快速操作之一时, 系统将启动或恢复您的应用程序,并且UIKit在您的应用程序委托中调用application(_:performActionFor:completionHandler:)方法。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何对 AVPlayer 的播放和暂停动作执行一些动作? - How to perform some action on Play and Pause actions of AVPlayer? 有什么方法只能打开Appstore审阅者的网址吗? - Is there any way to open url only for Appstore reviewer? 如何在 WKWebview 中添加观察者以播放和暂停音频文件的动作? - How to add observer to play and pause actions for audio file in WKWebview? 有什么方法可以将音乐列表中的播放列表导出到Spotify并播放? - Is there any way to export playlist from my music app to Spotify and play? 一些应用程序操作打破了TImer? - Some App Actions Breaking TImer? 我的应用中的音频,播放暂停滑块 - Audio in my App, play pause slider 有什么方法可以知道Android App Link是否会打开一个应用程序吗? - Is there any way to know whether an Android App Link will open an app or not? 有什么方法可以通过说iOS中的特定单词来打开应用 - Is any way to open app through speaking specfic word in iOS 有什么方法可以自动构建 Android 和 iOS 应用程序并发布到 Google Play 和 App Store? - Is there any way to automate the building of Android and iOS app and release to Google Play and App Store? 当应用程序进入后台时,AVPlayer暂停并播放问题 - AVPlayer Pause and play issues when app goes background
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM