简体   繁体   中英

How to make android widgets using python?

Is there any way to make widgets with Python on Android?

I mean, that I know only Python , HTML , DOM , JS , maybe jQuery and nothing more (not C , Java or something).

Maybe it's simple?

I honestly searched stackoverflow but search returned no answers :(

Help me, please. Give me a hope.

Personally I wrote a google app engine app in python to collect and display the data, and then used an app called "meta widget" that allows you to turn a website's content into a widget. The app pulls the content from my GAE website and shows it in a widget on the android homescreen.

You might be able to do something completely local if you can make something to serve HTTP requests in sl4a python, then have meta widget go to a local http address.

I don't think this could be done.

I've done a quick search in SL4A documentation and there is no API to register broadcast receiver. And Android widgets are just a bunch of Views and code in BroadcastReceiver.

And as far as I know, SL4A is the only way to use Python on Android with UI interaction.

Please check this links:

Remember that there is a Python implementation on the JVM called Jython.

Edit: In terms of Android development i should say Jythonroid .

Pyjamas perhaps? Maybe not exactly what you're looking for but it would allow you to at least write some of your code in Python (and compile to JavaScript).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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