如何使用 kivy 打开默认的 Android 应用程序? [英] How to use kivy to open default Android apps?

查看:24
本文介绍了如何使用 kivy 打开默认的 Android 应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在开发一款适用于 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 应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆