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.
-
And javascript isn't enough? You can use w3c widgets then I think...rplnt– rplnt2011年10月03日 15:01:47 +00:00Commented Oct 3, 2011 at 15:01
4 Answers 4
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.
1 Comment
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.
Comments
Please check this links:
- http://code.google.com/p/android-scripting/
- http://google-opensource.blogspot.com/2009/06/introducing-android-scripting.html
Remember that there is a Python implementation on the JVM called Jython.
Edit: In terms of Android development i should say Jythonroid.
3 Comments
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).