Writing standalone Qt & Python applications for Android



Similar documents
BogDan Vatra and Andy Gryc. Qt on Android: Is it right for you?

Islamic University of Gaza. Faculty of Engineering. Computer Engineering Department. Mobile Computing ECOM Eng. Wafaa Audah.

Mobile application development with QML & PySide

Andreas Burghart 6 October 2014 v1.0

Programming Mobile Apps with Python

Some Experiences With Python For Android (Py4A) Nik Klever University of Applied Sciences Augsburg

Surface and Volumetric Data Rendering and Visualisation

Android Development Tools for Eclipse

Overview. The Android operating system is like a cake consisting of various layers.

An Android based Quantum GIS prototype. Ramon Carrillo, Daniel Ochoa

Hacking your Droid ADITYA GUPTA

Automated Performance Testing of Desktop Applications

file://d:\webs\touch-base.com\htdocs\documentation\androidplatformnotes52.htm

Platform as a Service and Container Clouds

Android Programming and Security

KonyOne Server Installer - Linux Release Notes

Yocto Project Eclipse plug-in and Developer Tools Hands-on Lab

Building Mobile Applications Creating ios applications with jquery Mobile, PhoneGap, and Drupal 7

What else can you do with Android? Inside Android. Chris Simmonds. Embedded Linux Conference Europe Copyright 2010, 2net Limited.

Building a Python Plugin

Developing In Eclipse, with ADT

On premise upgrade guide (to 3.3) XperiDo for Microsoft Dynamics CRM

Mobile Development with Qt

Integrating Mobile into Your Cross- Platform Strategy with Qt

Kerberos + Android. A Tale of Opportunity. Slide 1 / 39. Copyright 2012 yassl

Citrix Worx App SDK Overview

Introduction to Android Programming (CS5248 Fall 2015)

-Android 2.3 is the most used version of Android on the market today with almost 60% of all Android devices running 2.3 Gingerbread -Winner of

TREK GETTING STARTED GUIDE

Andreas Schreiber

Installing an open source version of MateCat

VOC Documentation. Release 0.1. Russell Keith-Magee

HP AppPulse Active. Software Version: 2.2. Real Device Monitoring For AppPulse Active

Generate Android App

A Practical Guide to creating, compiling and signing an Android Application using Processing for Android.

Android Setup Phase 2

depl Documentation Release depl contributors

How To Run A Hello World On Android (Jdk) On A Microsoft Ds.Io (Windows) Or Android Or Android On A Pc Or Android 4 (

Installing and Running Tomcat 5.5

Hudson configuration manual

1 Building, Deploying and Testing DPES application

System Reference 2013

Android NDK Native Development Kit

Practical Android Projects Lucas Jordan Pieter Greyling

Building graphic-rich and better performing native applications. Pro. Android C++ with the NDK. Onur Cinar

Android 4.4 App Development Essentials

ALERT installation setup

Smartphone Pentest Framework v0.1. User Guide

Installing OpenVSP on Windows 7

GeoInt 2015 Watson Workshop

The power of root on Android emulators

Lab 1 Whatsup Watson Hands-On Lab

AppUse - Android Pentest Platform Unified

Copyright 2014, SafeNet, Inc. All rights reserved.

Creating Dynamics User Model Dynamic Linked Library (DLL) for Various PSS E Versions

Getting Started Android + Linux. February 27 th, 2014

Getting Started with CodeXL

Kony MobileFabric. Sync Windows Installation Manual - WebSphere. On-Premises. Release 6.5. Document Relevance and Accuracy

Robotium Automated Testing for Android

Android Development: Part One

Source Code Management for Continuous Integration and Deployment. Version 1.0 DO NOT DISTRIBUTE

Develop a Native App (ios and Android) for a Drupal Website without Learning Objective-C or Java. Drupaldelphia 2014 By Joe Roberts

Bridging the Gap: from a Web App to a Mobile Device App

Running a Program on an AVD

SECURE YOUR NETWORK WITH FIREWALL BUILDER

The "Eclipse Classic" version is recommended. Otherwise, a Java or RCP version of Eclipse is recommended.

DraganFly Guardian: API Instillation Instructions

Table of Contents. Adding Build Targets to the SDK 8 The Android Developer Tools (ADT) Plug-in for Eclipse 9

With a single download, the ADT Bundle includes everything you need to begin developing apps:

Extending Tizen Native Framework with Node.js

IOIO for Android Beginners Guide Introduction

Tutorial on Basic Android Setup

Adobe Summit 2015 Lab 712: Building Mobile Apps: A PhoneGap Enterprise Introduction for Developers

IBM WebSphere Application Server V8.5 lab Basic Liberty profile administration using the job manager

AppConnect FAQ for MobileIron Technology Partners! AppConnect Overview

RTI Quick Start Guide

Extending the Survey123 for ArcGIS Mobile App

Python for Series 60 Platform

Mercury User Guide v1.1

Operational Decision Manager Worklight Integration

Adafruit's Raspberry Pi Lesson 5. Using a Console Cable

DevKey Documentation. Release 0.1. Colm O Connor

Rapid GUI Application Development with Python

The Monitis Monitoring Agent ver. 1.2

TEGRA X1 DEVELOPER TOOLS SEBASTIEN DOMINE, SR. DIRECTOR SW ENGINEERING

Continuous Integration and Delivery. manage development build deploy / release

A Study on Android development kits and the Phone Gap Framework

ANDROID APPS DEVELOPMENT FOR MOBILE AND TABLET DEVICE (LEVEL I)

ilaw Installation Procedure

l What is Android? l Getting Started l The Emulator l Hello World l ADB l Text to Speech l Other APIs (camera, bitmap, etc)

Using GitHub for Rally Apps (Mac Version)

The Decaffeinated Robot

Creating OpenGL applications that use GLUT

Install guide for Websphere 7.0

StruxureWare Data Center Expert Release Notes

Board also Supports MicroBridge

Lecture 1 Introduction to Android

Cloud Powered Mobile Apps with Azure

Introduction to IBM Worklight Mobile Platform

Transcription:

Writing standalone Qt & Python applications for Android Martin Kolman Red Hat & Faculty of Informatics, Masaryk University http://www.modrana.org/om2013 martin.kolman@gmail.com 1

Overview Writing Android applications with Python and Qt How it works The pydroid project Examples Acknowledgement 2

Writing Android applications with Python and Qt Lets put it all together! So that: applications can be written entirely in Python Qt/QML can be used for the GUI the result is a standalone Google Play compatible APK package deployment is as easy as possible all binary components can be recompiled at will 3

Writing Android applications with Python and Qt Writing Android applications with Python and Qt Python has been available for Android for ages the Qt graphics library has been available for Android since early 2011 there have been some proof of concepts of Qt-Python bindings working on Android and even some proof of concepts of distributing Python + Qt applications 4

How it works How normal Android applications look like written in the Android Java running on the Dalvik VM can have a native backend written in C/C++ using the Android NDK application packages are distributed as files with the.apk extension there is no support for cross-package dependencies 5

How it works Necessitas - Qt for Android provides Qt libraries compiled for Android 2.2+ most of Qt functionality is supported, including OpenGL acceleration and Qt Quick handles automatic library downloads & updates through the Ministro service 6

How it works Python for Android provides a Python interpreter for the Python code to run in, the Python-Qt bindings are compiled against it there are multiple projects providing Python for Android, for this initiative, the one from the Kivy project was used: https://github.com/kivy/python-for-android 7

How it works PySide Python-Qt bindings make possible to use basically every public Qt API from Python compiled for Android build scripts: https://github.com/m4rtink/android-pyside-buildscripts 8

How it works Optional Qt Components based on MeeGo Qt Components modified to work with Android screen rotation compiled for Android source available from Gitorious https://qt.gitorious.org/~martink/qt-components/ martinks-ineans-qt-components/commits/android 9

How it works What needs to be in the package Python code of the application Python & PySide compiled for Android Necessitas Java boilerplate & C++ wrapper gets libs from Ministro and creates the window starts the embedded Python interpreter optionally Qt Components As a result, the package has about 15 MB :) there are multiple ways to trim it down 10

How it works How to create the package Necessitas Qt creator basically, just press the run button you can get an example project from here: https://github.com/m4rtink/android-pyside-exampl e-project packages can be also created from command line using qmake and ant 11

How it works How everything gets in place on first start there are two zip files in the package one is for the application, the second for libraries the boilerplate gets Qt libs from Ministro and then unpacks both zip files folder then the application is started all subsequent startups are as fast as for normal Android applications 12

How it looks like 13

Not only Android applications 14

How it works The previous image shows the Mieru manga and comic book reader Python + PySide + QML + Qt Components https://github.com/m4rtink/mieru running on: Android, BlackBerry 10 Nokia N900 & N9 PC with Ubuntu 12.10 15

PySide for Android guide A detailed guide for building Pyside and using the results to build a Python application APK available on the Qt Project Wiki http://qt-project.org/wiki/pyside_for_android_guide short URL: http://bit.ly/zw6zhf 16

The pydroid project is a really nice project thats being developed by Aaron Richiger based on my PySide for Android work but even more user/developer friendly and MUCH MORE POWERFUL :) official website (well, a github repo :) : https://github.com/raaron/pydroid short URL: bit.ly/16ci3kj 17

The pydroid project features efortless setup.py based installation automatic project template generation QWidget, QML, QtC, MWC, no-mwc, Pyjnius, etc. supports both QtCreator and CLI only for package generation and deployment automatically creates the app & lip zip bundles progress bar during first start/installation supports pip for adding modules to the project 18

The pydroid project more features support for logging from python directly to the android log that is piped directly to the QtCreator console :) fast deployment to an Android device 5 seconds from pressing the fast deploy button to application finishing startup on device bash autocomplete support :) pydroid & project diagnostics 19

Installing pydroid clone from Git git clone https://github.com/raaron/pydroid.git install sudo python setup.py and restart your shell, or else autocomplete will not work :) if you want to use command line deployment, don't forget to fill in the paths ~/.pydroid/deploy.conf 21

Generate an example application we will use the Qt Components example pydroid create example qt_components there are also other examples QML only, Qwidget, Pyjnius, etc. 22

Deploying with Qt Creator just open the.pro file in the Necessitas Qt Creator set architecture of your device and hit Run (ctrl + r) and that's it :) 23

Examples header 24

Acknowledgements & sources Aaron Richiger for the wonderful pydroid project THPs PySide for Android showing that this is possible Adrià Cereto-Massagué integrated & improved THPs patches for Shiboken and PySide the Android-Python2.7 project solved the APK bundling issue the Kivy project - provides Android-buildable Python 2.7 the BlackBerry-Py Building PySide guide I ve used this as a base when making the Android build scripts the Necessitas project made Qt on Android possible also provides the Necessitas Qt Creator used for by the example project for building standalone APKs Qt-Project provides the GUI toolkit :) PySide provides the Python-Qt bindings Ineans Qt Components with small modifications used in the example application & project 25