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

查看:120
本文介绍了如何使用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?

推荐答案

您可能需要构建适当的意图,例如在打算在android上启动时钟应用程序,但是您可以通过pyjnius从Python执行此操作,而不是直接编写Java代码.我有一个示例,您可能会在此处找到有用的示例,它使用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天全站免登陆