問題描述
我目前正在開發一款適用于 Android 的應用,我希望當用戶點擊應用內的按鈕時,他們會被重定向到默認的 Android 時鐘應用,他們可以在其中為自己設置提醒.Kivy 有什么方法可以訪問這些默認應用程序?
I am currently developing an app for Android, and I would like to make it so that when the user clicks on a button within the app, they are redirected to the default Android clock app, where they can set up reminders for themselves. Is there any way that Kivy can access those default apps?
推薦答案
您可能需要構建一個適當的意圖,如 e.g.意圖在android上啟動時鐘應用程序,但你可以通過 pyjnius 從 Python 執行此操作,而不是直接編寫 java 代碼.我有一個你可能會發現有用的例子 here,它使用 pyjnius 創建意圖,但在這種情況下用于發送電子郵件而不是打開應用程序.
You probably need to construct an appropriate intent, as described at e.g. Intent to launch the clock application on android , but you can do this from Python via pyjnius instead of by writing java code directly. I have an example that you might find useful here, which creates an intent using pyjnius, but in this case for sending an email rather than opening an app.
這篇關于如何使用 kivy 打開默認的 Android 應用程序?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!