Mid-summer Progress on Kivy and Plyer

This week I worked on retrieving a Unique ID depending the the hardware your program is running on. This involves querying some platform specific unique IDs that are suitable for this purpose. For example, you could use the IMEI number on an Android device or the serial number of the machine when running on a desktop. While none of these methods are foolproof and can be spoofed, they can still be useful in primitive fingerprinting and probably even seeding a random number generator. You can check out my pull request here.

The week also marks the end of five weeks since I have started working on the Kivy project. I have been making steady progress towards improving Plyer, a cross-platform library to handle all the common platform dependent things you need while writing python applications that can run on Android / iOS / Linux / Mac or Windows.

Here are the links to my previous blog posts describing my progress each week:

  1. Kivy for all your GUI (or NUI) needs!
  2. Kivy Updates from the First Week
  3. Mid-Midterm Activities on Kivy, and
  4. PyJnius to rule them all!

I started my work with a critical bug that was blocking further progress in the first week. Although it is only recently that Inclement has been able to propose a fix for it, we were able to find a quick work-around that did not stop the development on Android platforms.

I also did some review of existing pull requests in Plyer that were pending to be merged. I also implemented the accelerometer facade on MacOS by writing a small library using ctypes to make the API calls. I then re-wrote some of the existing sensor facades on Android using the support provided by the PyJnius project. This made access to the platform specific APIs more simple and very clean. We decided against using the sl4a compatibility layer and stick with using Pyjnius for accessing Java classes on Android.

You can find a list of all the pull requests in Plyer here. In summary, these are the facades that were either added, modified or reviewed since the beginning of the project:

Platform Android iOS Windows OSX Linux
Accelerometer X  X  X
Camera (taking picture) X X  X  X
Email (open mail client) X X X X
Vibrator X
Play Sound X X X X
Compass X X
Gyroscope X X
Unique ID X X X X

I also added some example applications using Kivy to demonstrate the use of these facades. And also made a point to include one with most of the new facades that I wrote.

I believe that I have made some significant progress till now but there are still some tricky facades that are left to be implemented before the end of summer. I hope to carry this momentum forward and add many more facades in the coming weeks.

2 thoughts on “Mid-summer Progress on Kivy and Plyer”

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.