I was lucky enough to give a talk about Kivy – a multi-touch, cross-platform Python GUI and application framework – at GRDevDay 2013. Although my talk was the least-attended talk I went to all day, I enjoyed giving it and I got to meet a few new Python folks from Michigan. I’m going to chalk up the attendance to the fact that I was in the same time slot as a lot of good talks, including three that I wanted to see myself. Ah well, such are conferences. At any rate, it gave me an opportunity to see what worked and what didn’t in this talk so I can make some changes before I give it at MobiDevDay Detroit in May.
GRDevDay was a great conference. The organizers really treat the speakers well with a semi-private speaker’s lounge and even special gifts. This is one of the few local events that I attend where I don’t do any organizing, and even though I feel like kind of a slacker, it also feels good to not have all of that pressure for the whole day. The GitHub-hosted drink-up at Kitchen76 was unbelievably crowded, but I still had fun and got to talk at length with some people I usually chat with infrequently online.
There were a few questions I was unable to answer at my GRdevDay talk. As I find answers, I will post them here.
Question: Can you make Android widgets using Kivy? Answer: Probably not, but there has been a lot of work in pyjnius. No one has tried it recently.
In my talk I said that you have to specify Android permissions in the Manifest.xml file. This is incorrect, you specify the permissions as part of the build command. See the Python for Android docs for more information.
The relationship and difference between a Google+ Page and a Google+ Community eluded me at first. After having created a few of each for the various user groups I’m involved with, I think I have a handle on how to set them up.
You start with a Page for your group. Make sure you set up Managers for the Page. This can be done by switching to the Page, then clicking the tiny Settings link in the lower right, and then on the Managers tab.
From that Page you create a Community. See, a Page is like a person (kind of like a corporation is a person), so it can own Communities. Those people who are Managers of your Page can also manage the group by switching to the Page first. The Page will be the default Owner of the Community, but you can add other Owners. If you’re viewing the Community, click on the Members link. You can then use the little triangle next to member’s names to promote them to Moderators and from there to Owners.
Hopefully this will get you off on the right foot with your Pages and Communities.
By request, here are the Google+ Pages and Communities I’ve setup:
About a month ago I gave a talk titled “Python and Android: A descent into madness with Ben Rousch” at the PyOhio conference. I think the talk went really well, much better than the one I gave last year. There was a good crowd and a few people asked me questions afterwards. Due to time constraints, I wasn’t able to go into much depth on the topics, so I hope this blog post will help you to find more information about the topics I covered.
To start off, here are the slides from the talk. Most of the useful links are at the end of the slideshow, so I’ve extracted them here to save you some time:
Next up is the video of the presentation. We had some audio problems about two minutes into the talk, but don’t fret, we stopped the talk until they were fixed and it’s all good at around six minutes in.
So now that you’ve watched the talk, you know it ends on a kind of a bummer. The good news is that just a few days later I figured out how to use AIDE and SL4A to create Android apps on Android with Python, and I wrote it up in this blog post.
In the coming weeks you can expect a blog post that goes more in depth with BotBrew. I’ve also been poking around with a few other Python on Android projects and will let you know what I find out.
I’m a developer (among other things). I love Android, but I think Java is cumbersome and annoying. I want to create Android apps using Python. With the Scripting Layer for Android (SL4A) I can create little scripts on the Android device, or I can develop bigger apps using Eclipse and the Android SDK on a “real” computer. About six months ago the Android Java IDE (AIDE) was created. It lets you create real, distributable Android apps (APKs) on Android itself, which is very cool, but you have to do it Java.
Or do you?
Here’s how I combined SL4A’s Eclipse app development process with AIDE to create an Android app and APK on Android, written in Python.
Before we begin, you will need a few Android Apps installed:
Your Python project lives in the `MyProject/res/raw` folder.
`script.py` is the entry point of your Python project. You can change this, but I don’t have instructions for doing so yet.
You can skip the Dropbox part of the instructions and do it all on Android, but if you include Dropbox it is easy to go back and forth between AIDE and Eclipse. I think it’s worth the extra step.
To create a new file or folder in your project, long-press on an existing file for a file menu.
The first time someone runs your APK they will be prompted to install Python for Android if they don’t already have it. The process is the same as you went through when installing the Python Interpreter for SL4A.
If your app refuses to install or run, you probably need to sign it. I suggest creating signing keys in Eclipse on your desktop and storing them in Dropbox. You can then use them from within AIDE. AIDE does have built-in key generation, but it didn’t work when I tried it.
If “Download” is greyed out when you try to get your folder from Dropbox from within AIDE, that may mean you already have a project with that name in AIDE. Each project name must be unique. You can delete the old project from within AIDE, or rename the new project’s folder in Dropbox.
Where should you go from here?
You should head over to the SL4A Tutorials to learn what all you can do with it.
What’s next for this project?
My goal is to encapsulate this process into an Android app you can download from Google Play. The app will download SL4A Python and the script template, extract it to Dropbox or a location of your choosing, setup the app name you want, and setup the entry point you want (instead of script.py). It will be an easy Android App creator for Python on Android.
I scraped together this information from several sources. These are the big ones:
[2012-07-31] I’ve just learned about the android-python27 and related projects. Using this, you can embed the Python runtime in your application to avoid your users having to download it on first run. There is a lot of cool stuff going on around this project including PyQT support and advanced UIs with Kivy.