Last week I was quite busy with the lswc’s talks. Sadly, I could only assist a few of them.
First of all, lets clarify what LSWC stands for. Libre Software Worl Conference is an event of open source related projects, where you can learn, assist to talks or even just know people. You can always find a lot of interesting people on this kind of places as well as a lot of nice talks. I found the Python Day quite interesting, as well as the independent talks, mostly given by SMEs and open source projects.
I personally attended (among others) the following ones:
- Guifi.net by gaueko
- Mysql optimization by Warp Networks (Victor Jimenez, CapitanGolo.)
- OpenStreetMaps, obiously by openstreetmap (Jaime Crespo)
- Developing android applications on python
- Open knowledge, or why open source software was invented on middle ages (Juan Freire).
- Introducing RedIs: key-value nosql database by NetNetics (Alberto gimeno)
I was myself a speaker in the lswc, presenting Furnivall, a framework for crowdscience we’re developing at institute of biocomputation and physics of complex systems.
We could not really expect the quantity of people that came to the conferences, it was amazing to see that much open source supporters in spain joint in our city, zaragoza. Dudes from libreOffice and kde, among with lots of people from SMEs related with opensource! We were delighted, and the talks were good enough, some of them could’ve had a little more technical level, but we can’t have everything, can’t we?
It’s been a while since I lastest got Digenpy for android ready, so I decided to take a look at it again and re-do it. After I finised most of the work, I realized I didn’t have a build-and-test apk system, so I’ve built one.
Here are the steps I followed, as described by android documentation:
- Download android sdk
- Get java development kit (sun-java6-jdk in debian. Only available in debian stable at this time)
- Launch “android” executable from sdk tools/ directory and specify it to download the APIs you want, and the platform tools.
- Generate apk with ant *
- Align apk with zipalign from tools directory *
- Set up a virtual machine in emulator *
- Launch app in emulator *
* I’ve made a little script, hosted here , it also can do debian packages and windows exes (I will talk about it in my next article). After apk building it launches android emulator to test it.
Let’s get all of it togheter. We need to install a few things and configure the script.
First of all, we’ll need to install android SDK on a good path, like /usr/local/share/android-sdk.
$ wget http://dl.google.com/android/android-sdk_r15-linux.tgz -O - |tar xvzf - # mv android-sdk-linux /usr/local/share/android-sdk
Then, we install sun-java6-jdk, only debian stable is covered here.
# apt-get install sun-java6-jdk sun-java6-jre
Finally, we’ll install the android platform tools and sdk, launching (as root) the android app.
Inside there, we’ll select an API (I’ve chosen 10) and the platform-tools and SDK-tools.
To be able to emulate, first we’ll have to create the config for an emulator, we’ll do it trough tools/Manage AVDs
Now, we will download the template for android-python apps, uncompress it, and put our script on raw/res/script.py, then execute package_generator script.
wget http://android-scripting.googlecode.com/hg/android/script_for_android_template.zip unzip script_for_android_template.zip mv hello_world.py raw/res/script.py
And there we have it: It will generate a nice APK, and launch the emulator with the apk installed so we can test it.