DEV Community

Mustufa Ansari
Mustufa Ansari

Posted on

How to Make Android Apps With Python

In this article, I am gonna show you we can develop android apps on python.

An android app is an application developed to operate on the android platform. The official language for Android development is Java (general-purpose programming language) but android python development may also be done. Python is a high-level programming language that is widely used in web development, app development, analyzing and computing scientific and numeric data, and software development.

However, Android's favored language of implementation is Java so if you wish to run python Android application, you need to have a way to run your Python code on a Java there are several ways by which it can be done.

TRANSPILERS

Transpiler - takes Python ASCII text file, compiles it to CPython Bytecode, and then transpires that bytecode into Java-compatible bytecode.

It also allows you to use native JAVA objects the same as Python objects which allows us to seamlessly create an android application in native android API. The result is that your Python source code files are compiled directly to a Java class file.

TECHNOLOGICAL PLATFORMS

Apart from transpilers, there is a various technological platform in the market i.e. PyMob where android applications can be codded solely in Python and the compiler tool-flow (PyMob) translate them in native source codes for different platforms.

There are a few aspects that make these technological platforms approach distinctive.
Undoubtedly, developing apps in Python is least complex than Obj-C, Java or JavaScript.

The spec for a single stand has to be coded in Python.
Thirdly, these platforms generate native source code for all the supported platforms. The generated native source code is virtually indistinguishable from a handwritten code and can be further optimized by native compilers.

BRIEFCASE PACKAGE

Python to the android application can be written directly against the native Android APIs. Once you are done coding your native Android application, your python code required to be transient cased to package as an Android application.

A briefcase is a tool for renovating a Python project into a standalone native application. You can package projects for MAC, Windows, AppleTv, android, etc.

KIVY FRAMEWORK

Android python development can be done by Kivy framework to develop Android apps. Kivy enables you to build the UI in an exceedingly straightforward Python script but then you have to package it into a standalone Kivy - Open source Python library for rapid development of applications that takes innovative user interfaces in use, such as multi-touch apps.

Kivy processed on Linux, Windows, OS X, Android, and iOS and can be supported by similar platforms. It can use natively most inputs, protocols, and devices including WM_Touch, WM_Pen, Mac OS X Trackpad and Magic Mouse, Mtdev, Linux Kernel HID, TUIO. A multi-touch mouse simulator is included.

Kivy is 100% absolve to use, underneath an MIT license (starting from 1.7.2) and LGPL 3 for the previous versions, the framework is stable and has a well-documented API.

QPYTHON

QPython is an alternative (for Android) that is a Python script engine for the Android system, which runs Python programs on any Android device. Comprising of a Python interpreter, a console, and an editor.

Top comments (1)

Collapse
 
gokayburuc profile image
GOKAY BURUC

Can you add iOS performance comparison for the programmes given above? I am a Linux user and I want to know which one of them will be the best choice for a Linux user.