适用于 Android 应用的 Kivy

发布于 2024-12-28 14:05:17 字数 1431 浏览 0 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

北方的巷 2025-01-04 14:05:17

我已经使用 kivy 并为其做出贡献有一段时间了,并将其用于面向市场的大型应用程序。虽然仍然不如原生开发那么完整(不确定是否可以使用地图 Android API,但有替代方案),但它工作得很好,具有良好的性能。用于快速原型设计的 kv 语言真的很酷。

作为奖励点,你的应用程序也可以在 windows/linux/mac/ios 上运行......(我们仍然需要尝试进入苹果商店,但从技术上讲它是有效的)。编辑:迄今为止,至少有一款 kivy 应用程序已被苹果市场接受,请查找“deflectouch< /a>”如果你有兴趣的话。

与 SL4A 不同,您可以获得一个真正的 apk 来分发,带有 kivy 以及一个非常漂亮和光滑的 GUI api,适合多点触控应用程序。

I've been using and contributing to kivy for some time, and using it for a big application intended for market. Although still not as complete as native developpment (not sure if using the map Android API is possible at all, but there are alternatives), it works very well, with good performance. The kv language for rapid prototyping is really cool.

And as bonus points, your apps work on windows/linux/mac/ios too… (we still have to try getting on apple store, but technically it works). edit: to this day at least one kivy app has been accepted on apple market, look for "deflectouch" if you are interrested.

As opposed to SL4A, you get a real apk to distribute, with kivy as well as a very nice and slick GUI api, fitted for multitouch apps.

活泼老夫 2025-01-04 14:05:17

我相信 KivyMaps 与您想要做的非常相似。

如果您避免使用非 Android 平台特定的代码,那么您的应用程序应该可以在 Android 上运行而不会出现任何问题。

我建议也查看 Python for Android,它是 Kivy 的一个姐妹项目,旨在提供帮助您创建自己的Python发行版,包括您想要的模块,并创建一个包含python、库和您的应用程序的apk。具体看看它的 Android 原生 API 包装器。该项目是新项目,因此仅支持一些本机 API,但如果您需要的话,它可能会让您了解如何为 Android 位置服务 API 创建包装器。

至于Google地图外部库,我同意tshirtman。我不确定如何使用它,但正如上面的 KiviMaps 链接强调的那样,还有其他可用的方法。

I believe KivyMaps is pretty similar to what you are trying to do.

If you avoid non-Android platform specific code then your application, should run on Android without any problems.

I suggest looking at Python for Android also, it's a sister project of Kivy aiming to help you create your own Python distribution including the modules you want, and create an apk including python, libs, and your application. Specifically look at its native API wrappers for Android. The project is new so only a few native API's are supported but it might give you an idea on as to how to go about creating a wrapper for Android location service API's if you need that.

As for the Google maps external library, I agree with tshirtman. I'm not sure how it could be used but as the KiviMaps link above highlights there are alternative approaches available.

丘比特射中我 2025-01-04 14:05:17

我对此的经验很少。但我确实知道

SL4A(Android 脚本层) 确实支持使用Python 也是如此。在您决定使用什么之前,可能值得稍微研究一下。

I have very little experience with it. But I do know that

SL4A (Scripting Layer For Android) does support writing Android applications with Python as well. Might be worth looking into that a bit before you make your decision of what to use.

じее 2025-01-04 14:05:17

Kivy 是用于 NUI 开发的跨平台 Python 框架。
它对于一些 Android 应用程序原型设计很有用。您可以使用 Kivy Launcher 进行更快速的测试。
您可以使用 python 库快速开发功能。
您可以使用 pyjnius 访问基于 java 的功能的 java 类。

我建议你阅读 Kivy Interactive Applications in Python 新手书。

但在更深入的层面上,您应该知道如何仔细使用基本的小部件。
因为存在一些令人困惑的概念。对于canvas来说,在html5中是不同的概念。 Kivy语言的类规则和类对于新手来说有些混乱。

对于Android应用程序,有一些难以使用的非基本支持库,例如Beautiful Soup(著名的html和xml解析器库)。

Kivy is Cross-platform Python Framework for NUI Development.
It is Good for some prototyping android app. You can use Kivy Launcher for more fast test.
You can use python library so fast development for feature.
You can use pyjnius for accessing java classes for java based feature.

I suggest you to reading Kivy Interactive Applications in Python book for newbie.

But in some deeper depth, you should know how to use basic widget carefully.
Because some confusing concept is there. For canvas, it's different concept in html5. Kivy language's class rule and class is some confusing for newbie.

And for android app, there is some difficult to use not basic supported library like Beautiful Soup(famous html and xml parser library).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文