简体   繁体   English

使用Python 2.7在Android中开发

[英]Developing in Android with Python 2.7

I want to develop a Android app using Python 2.7. 我想使用Python 2.7开发一个Android应用。 I read about it online but I couldn't find good answers, I saw Kivy . 我在网上阅读了有关它的内容,但找不到很好的答案,我看到了Kivy But I also saw a way to develop python via google . 但是我也看到了一种通过google开发python的方法。

I want to show a webpage (not sure if its going to be online or offline), in a app, without the user having to download anything except the app. 我想在应用程序中显示一个网页(不确定其是在线还是离线),而用户无需下载该应用程序以外的任何内容。

I saw Webview , but I coulnd't find how to implement it. 我看到了Webview ,但是我找不到如何实现它。

In short: 简而言之:

  • How do I develop a android app that shows a webpage with python 2.7, without the user having to download anything except the app. 如何开发一个显示python 2.7网页的android应用,而用户无需下载该应用以外的任何内容。

You can create a Kivy app that displays and manages a webview using something like https://github.com/kivy/kivy/wiki/Android-native-embedded-browser , though this requires some interaction with the java api (done via python as in the link) because we don't have a way to stream the webview content to a kivy widget. 您可以创建一个使用https://github.com/kivy/kivy/wiki/Android-native-embedded-browser之类的东西来显示和管理Web视图的Kivy应用,尽管这需要与Java api进行一些交互(通过python完成)就像在链接中一样),因为我们没有办法将Webview内容流式传输到kivy小部件。

A webview-only app is something kivy is not that well suited for, you might be better off learning to make a normal java app. 仅适用于Webview的应用程序是kivy不太适合的东西,您最好学习制作一个普通的Java应用程序。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM