Book Image

Kivy Blueprints

Book Image

Kivy Blueprints

Overview of this book

Table of Contents (17 chapters)
Kivy Blueprints
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
The Python Ecosystem
Index

Chapter 3. Sound Recorder for Android

In the previous chapter, we briefly discussed how the Kivy app, generally cross-platform, may have parts of code working conditionally on selected systems, enhancing user experience for some users and performing other platform-specific tasks.

At times, this is essentially free; for example, multitouch just works if Kivy detects support for it on a target system—you don't need to write any code to turn it on, but only account for the sheer possibility of several pointer events firing at the same time for different touches.

Other platform-dependent tasks include code that just cannot run on other systems for various reasons. Remember the mouse cursor customization from the Paint app? That code used low-level bindings to SDL cursor routines provided by Pygame, which is perfectly fine as long as you have SDL and Pygame running. So, in order to make our app multi-platform, we took precautions to avoid entering that specific code path on incompatible systems...