Last active
January 31, 2022 05:41
-
-
Save nandanhere/5ba4d76cad282a0c0b64a1ec1b8530e1 to your computer and use it in GitHub Desktop.
KivyApp to APK For KivyTimetable.ipynb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"nbformat": 4, | |
"nbformat_minor": 0, | |
"metadata": { | |
"colab": { | |
"name": "KivyApp to APK For KivyTimetable.ipynb", | |
"provenance": [], | |
"collapsed_sections": [], | |
"include_colab_link": true | |
}, | |
"kernelspec": { | |
"display_name": "Python 3", | |
"name": "python3" | |
} | |
}, | |
"cells": [ | |
{ | |
"cell_type": "markdown", | |
"metadata": { | |
"id": "view-in-github", | |
"colab_type": "text" | |
}, | |
"source": [ | |
"<a href=\"https://colab.research.google.com/gist/nandanhere/5ba4d76cad282a0c0b64a1ec1b8530e1/kivyapp-to-apk-for-kivytimetable.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": { | |
"id": "PzRHN-enSzFb" | |
}, | |
"source": [ | |
"Add all your files in the /contents folder and then run each command once (except the last 2)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"metadata": { | |
"id": "Yzg0jnV7dHTp" | |
}, | |
"source": [ | |
"!pip install buildozer" | |
], | |
"execution_count": null, | |
"outputs": [] | |
}, | |
{ | |
"cell_type": "code", | |
"metadata": { | |
"id": "XX3isEFydNar" | |
}, | |
"source": [ | |
"!pip install cython==0.29.19" | |
], | |
"execution_count": null, | |
"outputs": [] | |
}, | |
{ | |
"cell_type": "code", | |
"metadata": { | |
"id": "QZRYW9UvdcDt", | |
"colab": { | |
"base_uri": "https://localhost:8080/" | |
}, | |
"outputId": "b22cf660-0ed2-4494-efdf-a0a0094a428a" | |
}, | |
"source": [ | |
"!sudo apt-get install -y \\\n", | |
" python3-pip \\\n", | |
" build-essential \\\n", | |
" git \\\n", | |
" python3 \\\n", | |
" python3-dev \\\n", | |
" ffmpeg \\\n", | |
" libsdl2-dev \\\n", | |
" libsdl2-image-dev \\\n", | |
" libsdl2-mixer-dev \\\n", | |
" libsdl2-ttf-dev \\\n", | |
" libportmidi-dev \\\n", | |
" libswscale-dev \\\n", | |
" libavformat-dev \\\n", | |
" libavcodec-dev \\\n", | |
" zlib1g-dev" | |
], | |
"execution_count": 19, | |
"outputs": [ | |
{ | |
"output_type": "stream", | |
"name": "stdout", | |
"text": [ | |
"Reading package lists... Done\n", | |
"Building dependency tree \n", | |
"Reading state information... Done\n", | |
"build-essential is already the newest version (12.4ubuntu1).\n", | |
"zlib1g-dev is already the newest version (1:1.2.11.dfsg-0ubuntu2).\n", | |
"libportmidi-dev is already the newest version (1:217-6).\n", | |
"libsdl2-image-dev is already the newest version (2.0.3+dfsg1-1).\n", | |
"libsdl2-mixer-dev is already the newest version (2.0.2+dfsg1-2).\n", | |
"libsdl2-ttf-dev is already the newest version (2.0.14+dfsg1-2).\n", | |
"git is already the newest version (1:2.17.1-1ubuntu0.9).\n", | |
"python3 is already the newest version (3.6.7-1~18.04).\n", | |
"python3-dev is already the newest version (3.6.7-1~18.04).\n", | |
"ffmpeg is already the newest version (7:3.4.8-0ubuntu0.2).\n", | |
"libavcodec-dev is already the newest version (7:3.4.8-0ubuntu0.2).\n", | |
"libavformat-dev is already the newest version (7:3.4.8-0ubuntu0.2).\n", | |
"libsdl2-dev is already the newest version (2.0.8+dfsg1-1ubuntu1.18.04.4).\n", | |
"libswscale-dev is already the newest version (7:3.4.8-0ubuntu0.2).\n", | |
"python3-pip is already the newest version (9.0.1-2.3~ubuntu1.18.04.5).\n", | |
"0 upgraded, 0 newly installed, 0 to remove and 36 not upgraded.\n" | |
] | |
} | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"metadata": { | |
"id": "S9Z7KfTOnXuZ" | |
}, | |
"source": [ | |
"!sudo apt-get install -y \\\n", | |
" libgstreamer1.0 \\\n", | |
" gstreamer1.0-plugins-base \\\n", | |
" gstreamer1.0-plugins-good" | |
], | |
"execution_count": null, | |
"outputs": [] | |
}, | |
{ | |
"cell_type": "code", | |
"metadata": { | |
"id": "Gjp7v6bTnd5V" | |
}, | |
"source": [ | |
"!sudo apt-get install build-essential libsqlite3-dev sqlite3 bzip2 libbz2-dev zlib1g-dev libssl-dev openssl libgdbm-dev libgdbm-compat-dev liblzma-dev libreadline-dev libncursesw5-dev libffi-dev uuid-dev libffi6" | |
], | |
"execution_count": null, | |
"outputs": [] | |
}, | |
{ | |
"cell_type": "code", | |
"metadata": { | |
"id": "DA3BNyuKnrI1" | |
}, | |
"source": [ | |
"!sudo apt-get install libffi-dev" | |
], | |
"execution_count": null, | |
"outputs": [] | |
}, | |
{ | |
"cell_type": "code", | |
"metadata": { | |
"id": "EeTysn9dntOO" | |
}, | |
"source": [ | |
"!yes | buildozer init" | |
], | |
"execution_count": null, | |
"outputs": [] | |
}, | |
{ | |
"cell_type": "code", | |
"metadata": { | |
"id": "tLbircO10N0a", | |
"colab": { | |
"base_uri": "https://localhost:8080/" | |
}, | |
"outputId": "3209447f-1c32-4686-85d1-4faf01a23d1e" | |
}, | |
"source": [ | |
"!yes | buildozer -v android debug" | |
], | |
"execution_count": 24, | |
"outputs": [ | |
{ | |
"output_type": "stream", | |
"name": "stdout", | |
"text": [ | |
"\u001b[39m\u001b[0m\u001b[36m# Check configuration tokens\u001b[39m\u001b[0m\n", | |
"\u001b[91m\u001b[1mBuildozer is running as root!\u001b[0m\n", | |
"\u001b[91mThis is \u001b[1mnot\u001b[0m \u001b[91mrecommended, and may lead to problems later.\u001b[0m\n", | |
"Are you sure you want to continue [y/n]? \u001b[39m\u001b[0m\u001b[36m# Ensure build layout\u001b[39m\u001b[0m\n", | |
"\u001b[39m\u001b[0m\u001b[36m# Check configuration tokens\u001b[39m\u001b[0m\n", | |
"\u001b[39m\u001b[0m\u001b[30m\u001b[1m# Read available permissions from api-versions.xml\u001b[39m\u001b[0m\n", | |
"\u001b[39m\u001b[0m\u001b[36m# Preparing build\u001b[39m\u001b[0m\n", | |
"\u001b[39m\u001b[0m\u001b[36m# Check requirements for android\u001b[39m\u001b[0m\n", | |
"\u001b[39m\u001b[0m\u001b[30m\u001b[1m# Run 'dpkg --version'\u001b[39m\u001b[0m\n", | |
"\u001b[39m\u001b[0m\u001b[30m\u001b[1m# Cwd None\u001b[39m\u001b[0m\n", | |
"Debian 'dpkg' package management program version 1.19.0.5 (amd64).\n", | |
"This is free software; see the GNU General Public License version 2 or\n", | |
"later for copying conditions. There is NO warranty.\n", | |
"\u001b[39m\u001b[0m\u001b[30m\u001b[1m# Search for Git (git)\u001b[39m\u001b[0m\n", | |
"\u001b[39m\u001b[0m\u001b[30m\u001b[1m# -> found at /usr/bin/git\u001b[39m\u001b[0m\n", | |
"\u001b[39m\u001b[0m\u001b[30m\u001b[1m# Search for Cython (cython)\u001b[39m\u001b[0m\n", | |
"\u001b[39m\u001b[0m\u001b[30m\u001b[1m# -> found at /usr/local/bin/cython\u001b[39m\u001b[0m\n", | |
"\u001b[39m\u001b[0m\u001b[30m\u001b[1m# Search for Java compiler (javac)\u001b[39m\u001b[0m\n", | |
"\u001b[39m\u001b[0m\u001b[30m\u001b[1m# -> found at /usr/lib/jvm/java-11-openjdk-amd64/bin/javac\u001b[39m\u001b[0m\n", | |
"\u001b[39m\u001b[0m\u001b[30m\u001b[1m# Search for Java keytool (keytool)\u001b[39m\u001b[0m\n", | |
"\u001b[39m\u001b[0m\u001b[30m\u001b[1m# -> found at /usr/lib/jvm/java-11-openjdk-amd64/bin/keytool\u001b[39m\u001b[0m\n", | |
"\u001b[39m\u001b[0m\u001b[36m# Install platform\u001b[39m\u001b[0m\n", | |
"\u001b[39m\u001b[0m\u001b[30m\u001b[1m# Run 'git config --get remote.origin.url'\u001b[39m\u001b[0m\n", | |
"\u001b[39m\u001b[0m\u001b[30m\u001b[1m# Cwd /content/.buildozer/android/platform/python-for-android\u001b[39m\u001b[0m\n", | |
"https://github.com/kivy/python-for-android.git\n", | |
"\u001b[39m\u001b[0m\u001b[30m\u001b[1m# Run 'git branch -vv'\u001b[39m\u001b[0m\n", | |
"\u001b[39m\u001b[0m\u001b[30m\u001b[1m# Cwd /content/.buildozer/android/platform/python-for-android\u001b[39m\u001b[0m\n", | |
"* master 17aa3e29 [origin/master] Update recipe.py (#2544)\n", | |
"\u001b[39m\u001b[0m\u001b[30m\u001b[1m# Run '/usr/bin/python3 -m pip install -q --user \\'appdirs\\' \\'colorama>=0.3.3\\' \\'jinja2\\' \\'six\\' \\'enum34; python_version<\"3.4\"\\' \\'sh>=1.10; sys_platform!=\"nt\"\\' \\'pep517<0.7.0\\' \\'toml\\''\u001b[39m\u001b[0m\n", | |
"\u001b[39m\u001b[0m\u001b[30m\u001b[1m# Cwd None\u001b[39m\u001b[0m\n", | |
"\u001b[39m\u001b[0m\u001b[36m# Apache ANT found at /root/.buildozer/android/platform/apache-ant-1.9.4\u001b[39m\u001b[0m\n", | |
"\u001b[39m\u001b[0m\u001b[36m# Android SDK found at /root/.buildozer/android/platform/android-sdk\u001b[39m\u001b[0m\n", | |
"\u001b[39m\u001b[0m\u001b[36m# Recommended android's NDK version by p4a is: 19c\u001b[39m\u001b[0m\n", | |
"\u001b[39m\u001b[0m\u001b[36m# Android NDK found at /root/.buildozer/android/platform/android-ndk-r19c\u001b[39m\u001b[0m\n", | |
"\u001b[39m\u001b[0m\u001b[30m\u001b[1m# Read available permissions from api-versions.xml\u001b[39m\u001b[0m\n", | |
"\u001b[39m\u001b[0m\u001b[36m# Check application requirements\u001b[39m\u001b[0m\n", | |
"\u001b[39m\u001b[0m\u001b[36m# Check garden requirements\u001b[39m\u001b[0m\n", | |
"\u001b[39m\u001b[0m\u001b[36m# Compile platform\u001b[39m\u001b[0m\n", | |
"\u001b[39m\u001b[0m\u001b[30m\u001b[1m# Run '/usr/bin/python3 -m pythonforandroid.toolchain create --dist_name=datacollector --bootstrap=sdl2 --requirements=python3,kivy==2.0.0,kivymd,pillow,oscpy,plyer,android --arch armeabi-v7a --copy-libs --color=always --storage-dir=\"/content/.buildozer/android/platform/build-armeabi-v7a\" --ndk-api=21'\u001b[39m\u001b[0m\n", | |
"\u001b[39m\u001b[0m\u001b[30m\u001b[1m# Cwd /content/.buildozer/android/platform/python-for-android\u001b[39m\u001b[0m\n", | |
"\u001b[1m[INFO]\u001b[0m: Recipe kivy: version \"2.0.0\" requested\n", | |
"\u001b[1m[INFO]\u001b[0m: Will compile for the following archs: armeabi-v7a\n", | |
"\u001b[1m[INFO]\u001b[0m: Found Android API target in $ANDROIDAPI: 27\n", | |
"\u001b[1m[INFO]\u001b[0m: Available Android APIs are (27)\n", | |
"\u001b[1m[INFO]\u001b[0m: Requested API target 27 is available, continuing.\n", | |
"\u001b[1m[INFO]\u001b[0m: Found NDK dir in $ANDROIDNDK: /root/.buildozer/android/platform/android-ndk-r19c\n", | |
"\u001b[1m[INFO]\u001b[0m: Found NDK version 19c\n", | |
"\u001b[1m[INFO]\u001b[0m: Getting NDK API version (i.e. minimum supported API) from user argument\n", | |
"\u001b[1m[INFO]\u001b[0m: ccache is missing, the build will not be optimized in the future.\n", | |
"\u001b[1m[INFO]\u001b[0m: Found the following toolchain versions: ['4.9']\n", | |
"\u001b[1m[INFO]\u001b[0m: Picking the latest gcc toolchain, here 4.9\n", | |
"\u001b[1m[INFO]\u001b[0m: Of the existing distributions, the following meet the given requirements:\n", | |
"\u001b[1m[INFO]\u001b[0m: \t\u001b[32m\u001b[1mdatacollector\u001b[0m: min API 21, includes recipes (\u001b[32mfreetype, hostpython3, jpeg, libffi, openssl, png, sdl2_image, sdl2_mixer, sdl2_ttf, sqlite3, python3, sdl2, setuptools, pillow, six, pyjnius, android, kivy, plyer, certifi, kivymd, oscpy\u001b[0m), built for archs (\u001b[34marmeabi-v7a\u001b[0m)\n", | |
"\u001b[1m[INFO]\u001b[0m: \u001b[1m\u001b[94mdatacollector has compatible recipes, using this one\u001b[0m\n", | |
"\u001b[39m\u001b[0m\u001b[36m# Build the application #11\u001b[39m\u001b[0m\n", | |
"\u001b[39m\u001b[0m\u001b[30m\u001b[1m# Copy application source from /content\u001b[39m\u001b[0m\n", | |
"\u001b[39m\u001b[0m\u001b[30m\u001b[1m# Create directory /content/.buildozer/android/app\u001b[39m\u001b[0m\n", | |
"\u001b[39m\u001b[0m\u001b[30m\u001b[1m# Copy /content/service.py\u001b[39m\u001b[0m\n", | |
"\u001b[39m\u001b[0m\u001b[30m\u001b[1m# Copy /content/icon.png\u001b[39m\u001b[0m\n", | |
"\u001b[39m\u001b[0m\u001b[30m\u001b[1m# Copy /content/main.py\u001b[39m\u001b[0m\n", | |
"\u001b[39m\u001b[0m\u001b[36m# Package the application\u001b[39m\u001b[0m\n", | |
"\u001b[39m\u001b[0m\u001b[30m\u001b[1m# project.properties updated\u001b[39m\u001b[0m\n", | |
"\u001b[39m\u001b[0m\u001b[36m# Gradle project detected, copy files /content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/src/main/java\u001b[39m\u001b[0m\n", | |
"\u001b[39m\u001b[0m\u001b[30m\u001b[1m# Run '/usr/bin/python3 -m pythonforandroid.toolchain apk --debug --bootstrap=sdl2 --dist_name datacollector --name \\'Data Collector\\' --version 0.1 --package org.kivy.datacollector --minsdk 21 --ndk-api 21 --private /content/.buildozer/android/app --permission INTERNET --permission WRITE_EXTERNAL_STORAGE --permission READ_EXTERNAL_STORAGE --permission WRITE_SETTINGS --permission ACCESS_FINE_LOCATION --permission ACCESS_COARSE_LOCATION --android-entrypoint org.kivy.android.PythonActivity --android-apptheme @android:style/Theme.NoTitleBar --presplash /content/icon.png --icon /content/icon.png --orientation portrait --window --service Datacollectorservice:service.py --copy-libs --arch armeabi-v7a --color=always --storage-dir=\"/content/.buildozer/android/platform/build-armeabi-v7a\" --ndk-api=21'\u001b[39m\u001b[0m\n", | |
"\u001b[39m\u001b[0m\u001b[30m\u001b[1m# Cwd /content/.buildozer/android/platform/python-for-android\u001b[39m\u001b[0m\n", | |
"\u001b[1m[INFO]\u001b[0m: Will compile for the following archs: armeabi-v7a\n", | |
"\u001b[1m[INFO]\u001b[0m: Found Android API target in $ANDROIDAPI: 27\n", | |
"\u001b[1m[INFO]\u001b[0m: Available Android APIs are (27)\n", | |
"\u001b[1m[INFO]\u001b[0m: Requested API target 27 is available, continuing.\n", | |
"\u001b[1m[INFO]\u001b[0m: Found NDK dir in $ANDROIDNDK: /root/.buildozer/android/platform/android-ndk-r19c\n", | |
"\u001b[1m[INFO]\u001b[0m: Found NDK version 19c\n", | |
"\u001b[1m[INFO]\u001b[0m: Getting NDK API version (i.e. minimum supported API) from user argument\n", | |
"\u001b[1m[INFO]\u001b[0m: ccache is missing, the build will not be optimized in the future.\n", | |
"\u001b[1m[INFO]\u001b[0m: Found the following toolchain versions: ['4.9']\n", | |
"\u001b[1m[INFO]\u001b[0m: Picking the latest gcc toolchain, here 4.9\n", | |
"\u001b[1m[INFO]\u001b[0m: Of the existing distributions, the following meet the given requirements:\n", | |
"\u001b[1m[INFO]\u001b[0m: \t\u001b[32m\u001b[1mdatacollector\u001b[0m: min API 21, includes recipes (\u001b[32mfreetype, hostpython3, jpeg, libffi, openssl, png, sdl2_image, sdl2_mixer, sdl2_ttf, sqlite3, python3, sdl2, setuptools, pillow, six, pyjnius, android, kivy, plyer, certifi, kivymd, oscpy\u001b[0m), built for archs (\u001b[34marmeabi-v7a\u001b[0m)\n", | |
"\u001b[1m[INFO]\u001b[0m: \u001b[1m\u001b[94mdatacollector has compatible recipes, using this one\u001b[0m\n", | |
"\u001b[1m[INFO]\u001b[0m: Of the existing distributions, the following meet the given requirements:\n", | |
"\u001b[1m[INFO]\u001b[0m: \t\u001b[32m\u001b[1mdatacollector\u001b[0m: min API 21, includes recipes (\u001b[32mfreetype, hostpython3, jpeg, libffi, openssl, png, sdl2_image, sdl2_mixer, sdl2_ttf, sqlite3, python3, sdl2, setuptools, pillow, six, pyjnius, android, kivy, plyer, certifi, kivymd, oscpy\u001b[0m), built for archs (\u001b[34marmeabi-v7a\u001b[0m)\n", | |
"\u001b[1m[INFO]\u001b[0m: \u001b[1m\u001b[94mdatacollector has compatible recipes, using this one\u001b[0m\n", | |
"\u001b[1m[INFO]\u001b[0m: \u001b[36m-> directory context /content/.buildozer/android/platform/build-armeabi-v7a/build/bootstrap_builds/sdl2\u001b[39m\n", | |
"\u001b[1m[INFO]\u001b[0m: \u001b[36m<- directory context /content/.buildozer/android/platform/python-for-android\u001b[39m\n", | |
"\u001b[1m[INFO]\u001b[0m: \u001b[36m-> directory context /content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a\u001b[39m\n", | |
"Listing '/tmp/p4a-extra-env-q0uw382u'...\n", | |
"Listing '/content/.buildozer/android/app'...\n", | |
"Listing '/content/.buildozer/android/app/_applibs'...\n", | |
"Compiling '/content/.buildozer/android/app/main.py'...\n", | |
"Compiling '/content/.buildozer/android/app/service.py'...\n", | |
"Compiling '/content/.buildozer/android/app/sitecustomize.py'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/modules'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/Kivy-2.0.0-py3.8.egg-info'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/PIL'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/Pillow-7.0.0-py3.8.egg-info'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/_distutils_hack'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/android'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/bin'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/certifi'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/certifi-2021.10.8.dist-info'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/jnius'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/jnius/src'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/jnius/src/org'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/jnius/src/org/jnius'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/kivy'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/kivy/core'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/kivy/core/audio'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/kivy/core/camera'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/kivy/core/clipboard'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/kivy/core/gl'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/kivy/core/image'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/kivy/core/spelling'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/kivy/core/text'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/kivy/core/video'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/kivy/core/window'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/kivy/data'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/kivy/data/fonts'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/kivy/data/glsl'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/kivy/data/images'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/kivy/data/keyboards'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/kivy/data/logo'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/kivy/deps'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/kivy/effects'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/kivy/extras'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/kivy/garden'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/kivy/graphics'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/kivy/graphics/cgl_backend'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/kivy/include'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/kivy/input'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/kivy/input/postproc'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/kivy/input/providers'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/kivy/lang'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/kivy/lib'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/kivy/lib/gstplayer'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/kivy/lib/pango'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/kivy/lib/vidcore_lite'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/kivy/modules'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/kivy/network'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/kivy/storage'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/kivy/tools'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/kivy/tools/gles_compat'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/kivy/tools/highlight'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/kivy/tools/image-testsuite'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/kivy/tools/packaging'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/kivy/tools/packaging/pyinstaller_hooks'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/kivy/tools/pep8checker'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/kivy/tools/theming'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/kivy/tools/theming/defaulttheme'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/kivy/uix'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/kivy/uix/behaviors'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/kivy/uix/recycleview'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/kivymd'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/kivymd/effects'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/kivymd/effects/roulettescroll'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/kivymd/effects/stiffscroll'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/kivymd/fonts'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/kivymd/images'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/kivymd/toast'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/kivymd/toast/androidtoast'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/kivymd/toast/kivytoast'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/kivymd/tools'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/kivymd/tools/packaging'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/kivymd/tools/packaging/pyinstaller'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/kivymd/uix'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/kivymd/uix/behaviors'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/kivymd/utils'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/kivymd-0.104.2.dist-info'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/oscpy'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/oscpy-0.6.0.dist-info'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/pkg_resources'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/pkg_resources/_vendor'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/pkg_resources/_vendor/packaging'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/pkg_resources/extern'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/plyer'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/plyer/facades'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/plyer/platforms'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/plyer/platforms/android'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/plyer/platforms/ios'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/plyer/platforms/linux'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/plyer/platforms/macosx'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/plyer/platforms/macosx/libs'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/plyer/platforms/win'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/plyer/platforms/win/libs'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/plyer-2.0.0.dist-info'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/pyjnius-1.3.0-py3.8.egg-info'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/setuptools'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/setuptools/_distutils'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/setuptools/_distutils/command'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/setuptools/_vendor'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/setuptools/_vendor/packaging'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/setuptools/command'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/setuptools/extern'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/setuptools-51.3.3-py3.8.egg-info'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/usr'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/usr/local'...\n", | |
"Listing '/content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/usr/local/bin'...\n", | |
"\u001b[1m[INFO]\u001b[0m: Detected highest available build tools version to be 32.1.0-rc1\n", | |
"stty: 'standard input': Inappropriate ioctl for device\n", | |
"\u001b[1m\u001b[90m[DEBUG]\u001b[39m\u001b[0m: \u001b[90m->\u001b[0m running gradlew assembleDebug\u001b[0m\n", | |
"\u001b[1m\u001b[90m[DEBUG]\u001b[39m\u001b[0m: \t\n", | |
"\u001b[1m\u001b[90m[DEBUG]\u001b[39m\u001b[0m: \t\n", | |
"\u001b[1m\u001b[90m[DEBUG]\u001b[39m\u001b[0m: \t\u001b[2A\u001b[1m<\u001b[0;1m-------------> 0% CONFIGURING [102ms]\u001b[m\u001b[38D\u001b[1B\u001b[1m> root project\u001b[m\u001b[14D\u001b[1B\u001b[2A\u001b[1m<\u001b[0;32;1m=============\u001b[0;39;1m> 100% CONFIGURING [202ms]\u001b[m\u001b[40D\u001b[1B> IDLE\u001b[0K\u001b[6D\u001b[1B\n", | |
"\u001b[1m\u001b[90m[DEBUG]\u001b[39m\u001b[0m: \t\u001b[3A\u001b[1m<\u001b[0;32;1m====\u001b[0;39;1m---------> 32% EXECUTING [303ms]\u001b[m\u001b[0K\u001b[37D\u001b[1B\u001b[1m> :mergeDebugResources\u001b[m\u001b[22D\u001b[1B\u001b[1m> :processDebugManifest\u001b[m\u001b[23D\u001b[1B\u001b[3A\u001b[1m<\u001b[0;32;1m=====\u001b[0;39;1m--------> 44% EXECUTING [402ms]\u001b[m\u001b[37D\u001b[2B\u001b[1m> :mergeDebugAssets\u001b[m\u001b[0K\u001b[19D\u001b[1B\u001b[3A\u001b[1m<\u001b[0;32;1m======\u001b[0;39;1m-------> 50% EXECUTING [502ms]\u001b[m\u001b[37D\u001b[1B\u001b[1m> :processDebugResources\u001b[m\u001b[24D\u001b[1B> IDLE\u001b[0K\u001b[6D\u001b[1B\u001b[3A\u001b[1m<\u001b[0;32;1m===========\u001b[0;39;1m--> 85% EXECUTING [602ms]\u001b[m\u001b[37D\u001b[1B> IDLE\u001b[0K\u001b[6D\u001b[2B\u001b[3A\u001b[0K\n", | |
"\u001b[1m\u001b[90m[DEBUG]\u001b[39m\u001b[0m: \t\u001b[1m> Task :stripDebugDebugSymbols\u001b[m\u001b[33m UP-TO-DATE\u001b[39m\n", | |
"\u001b[1m\u001b[90m[DEBUG]\u001b[39m\u001b[0m: \tSupport for ANDROID_NDK_HOME is deprecated and will be removed in the future. Use android.ndkVersion in build.gradle instead.\n", | |
"\u001b[1m\u001b[90m[DEBUG]\u001b[39m\u001b[0m: \t\u001b[0K\n", | |
"\u001b[1m\u001b[90m[DEBUG]\u001b[39m\u001b[0m: \t\u001b[0K\n", | |
"\u001b[1m\u001b[90m[DEBUG]\u001b[39m\u001b[0m: \t\u001b[0K\n", | |
"\u001b[1m\u001b[90m[DEBUG]\u001b[39m\u001b[0m: \t\u001b[3A\u001b[1m<\u001b[0;32;1m============\u001b[0;39;1m-> 94% EXECUTING [702ms]\u001b[m\u001b[37D\u001b[1B\u001b[1m> :packageDebug\u001b[m\u001b[15D\u001b[1B> IDLE\u001b[6D\u001b[1B\u001b[3A\u001b[1m<\u001b[0;32;1m============\u001b[0;39;1m-> 94% EXECUTING [802ms]\u001b[m\u001b[37D\u001b[3B\u001b[3A\u001b[1m<\u001b[0;32;1m============\u001b[0;39;1m-> 94% EXECUTING [903ms]\u001b[m\u001b[37D\u001b[3B\u001b[3A\u001b[0K\n", | |
"\u001b[1m\u001b[90m[DEBUG]\u001b[39m\u001b[0m: \tDeprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.\n", | |
"\u001b[1m\u001b[90m[DEBUG]\u001b[39m\u001b[0m: \tUse '--warning-mode all' to show the individual deprecation warnings.\n", | |
"\u001b[1m\u001b[90m[DEBUG]\u001b[39m\u001b[0m: \tSee https://docs.gradle.org/6.4.1/userguide/command_line_interface.html#sec:command_line_warnings\n", | |
"\u001b[1m\u001b[90m[DEBUG]\u001b[39m\u001b[0m: \t\n", | |
"\u001b[1m\u001b[90m[DEBUG]\u001b[39m\u001b[0m: \t\u001b[0K\n", | |
"\u001b[1m\u001b[90m[DEBUG]\u001b[39m\u001b[0m: \t\u001b[0K\n", | |
"\u001b[1m\u001b[90m[DEBUG]\u001b[39m\u001b[0m: \t\u001b[0K\n", | |
"\u001b[1m\u001b[90m[DEBUG]\u001b[39m\u001b[0m: \t\u001b[3A\u001b[1m<\u001b[0;32;1m=============\u001b[0;39;1m> 100% EXECUTING [1s]\u001b[m\u001b[35D\u001b[1B> IDLE\u001b[6D\u001b[1B> IDLE\u001b[6D\u001b[1B\u001b[3A\u001b[32;1mBUILD SUCCESSFUL\u001b[0;39m in 1s\u001b[0K\n", | |
"\u001b[1m\u001b[90m[DEBUG]\u001b[39m\u001b[0m: \t25 actionable tasks: 5 executed, 20 up-to-date\n", | |
"\u001b[1m\u001b[90m[DEBUG]\u001b[39m\u001b[0m: \t\u001b[1B\u001b[0K\n", | |
"\u001b[1m\u001b[90m[DEBUG]\u001b[39m\u001b[0m: \t\u001b[0K\n", | |
"\u001b[1m\u001b[90m[DEBUG]\u001b[39m\u001b[0m: \t\u001b[3A\u001b[1m<\u001b[0;1m-------------> 0% WAITING\u001b[m\u001b[26D\u001b[1B> IDLE\u001b[6D\u001b[1B> IDLE\u001b[6D\u001b[1B\u001b[3A\u001b[2K\u001b[1B\u001b[2K\u001b[1B\u001b[2K\u001b[2A\u001b[m\n", | |
"\u001b[1m[INFO]\u001b[0m: \u001b[36m<- directory context /content/.buildozer/android/platform/python-for-android\u001b[39m\n", | |
"\u001b[1m[INFO]\u001b[0m: Of the existing distributions, the following meet the given requirements:\n", | |
"\u001b[1m[INFO]\u001b[0m: \t\u001b[32m\u001b[1mdatacollector\u001b[0m: min API 21, includes recipes (\u001b[32mfreetype, hostpython3, jpeg, libffi, openssl, png, sdl2_image, sdl2_mixer, sdl2_ttf, sqlite3, python3, sdl2, setuptools, pillow, six, pyjnius, android, kivy, plyer, certifi, kivymd, oscpy\u001b[0m), built for archs (\u001b[34marmeabi-v7a\u001b[0m)\n", | |
"\u001b[1m[INFO]\u001b[0m: \u001b[1m\u001b[94mdatacollector has compatible recipes, using this one\u001b[0m\n", | |
"\u001b[1m[INFO]\u001b[0m: \u001b[1m\u001b[32m# Copying android package to current directory\u001b[0m\u001b[39m\n", | |
"\u001b[1m[INFO]\u001b[0m: \u001b[1m\u001b[32m# Android package filename not found in build output. Guessing...\u001b[0m\u001b[39m\n", | |
"\u001b[1m[INFO]\u001b[0m: \u001b[1m\u001b[32m# Found android package file: /content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/build/outputs/apk/debug/datacollector__armeabi-v7a-debug.apk\u001b[0m\u001b[39m\n", | |
"\u001b[1m[INFO]\u001b[0m: # Add version number to android package\n", | |
"\u001b[1m[INFO]\u001b[0m: # Android package renamed to datacollector__armeabi-v7a-debug-0.1-.apk\n", | |
"stty: 'standard input': Inappropriate ioctl for device\n", | |
"\u001b[1m\u001b[90m[DEBUG]\u001b[39m\u001b[0m: \u001b[90m->\u001b[0m running cp /content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/build/outputs/apk/debug/datacollector__armeabi-v7a-debug.apk datacollector__armeabi-v7a-debug-0.1-.apk\u001b[0m\n", | |
"WARNING: Received a --sdk argument, but this argument is deprecated and does nothing.\n", | |
"No setup.py/pyproject.toml used, copying full private data into .apk.\n", | |
"Applying Java source code patches...\n", | |
"Applying patch: src/patches/SDLActivity.java.patch\n", | |
"Warning: failed to apply patch (exit code 1), assuming it is already applied: src/patches/SDLActivity.java.patch\n", | |
"\u001b[39m\u001b[0m\u001b[36m# Android packaging done!\u001b[39m\u001b[0m\n", | |
"\u001b[39m\u001b[0m\u001b[36m# APK datacollector-0.1-armeabi-v7a-debug.apk available in the bin directory\u001b[39m\u001b[0m\n", | |
"\u001b[0m" | |
] | |
} | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"source": [ | |
"Below code is for notifications .. it will allow kivy to send notifications." | |
], | |
"metadata": { | |
"id": "P1oZgOCPXV3A" | |
} | |
}, | |
{ | |
"cell_type": "code", | |
"metadata": { | |
"id": "XKtB8RpMzi-T", | |
"colab": { | |
"base_uri": "https://localhost:8080/" | |
}, | |
"outputId": "ccbb28bc-7b3e-4ff6-8d3c-16deed0abfa4" | |
}, | |
"source": [ | |
"%%writefile /content/.buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/_python_bundle/_python_bundle/site-packages/plyer/platforms/android/notification.py\n", | |
"'''\n", | |
"Module of Android API for plyer.notification.\n", | |
"\n", | |
".. versionadded:: 1.0.0\n", | |
"\n", | |
".. versionchanged:: 1.4.0\n", | |
" Fixed notifications not displaying due to missing NotificationChannel\n", | |
" required by Android Oreo 8.0+ (API 26+).\n", | |
"\n", | |
".. versionchanged:: 1.4.0\n", | |
" Added simple toaster notification.\n", | |
"\n", | |
".. versionchanged:: 1.4.0\n", | |
" Fixed notifications not displaying big icons properly.\n", | |
" Added option for custom big icon via `icon`.\n", | |
"'''\n", | |
"\n", | |
"from android import python_act\n", | |
"from android.runnable import run_on_ui_thread\n", | |
"from jnius import autoclass, cast\n", | |
"\n", | |
"from plyer.facades import Notification\n", | |
"from plyer.platforms.android import activity, SDK_INT\n", | |
"\n", | |
"AndroidString = autoclass('java.lang.String')\n", | |
"Context = autoclass('android.content.Context')\n", | |
"NotificationBuilder = autoclass('android.app.Notification$Builder')\n", | |
"NotificationManager = autoclass('android.app.NotificationManager')\n", | |
"Drawable = autoclass(\"{}.R$drawable\".format(activity.getPackageName()))\n", | |
"PendingIntent = autoclass('android.app.PendingIntent')\n", | |
"Intent = autoclass('android.content.Intent')\n", | |
"Toast = autoclass('android.widget.Toast')\n", | |
"BitmapFactory = autoclass('android.graphics.BitmapFactory')\n", | |
"BigTextStyle = autoclass('android.app.Notification$BigTextStyle')\n", | |
"\n", | |
"class AndroidNotification(Notification):\n", | |
" '''\n", | |
" Implementation of Android notification API.\n", | |
"\n", | |
" .. versionadded:: 1.0.0\n", | |
" '''\n", | |
"\n", | |
" def __init__(self):\n", | |
" self._ns = None\n", | |
" self._channel_id = activity.getPackageName()\n", | |
"\n", | |
" def _get_notification_service(self):\n", | |
" if not self._ns:\n", | |
" self._ns = cast(NotificationManager, activity.getSystemService(\n", | |
" Context.NOTIFICATION_SERVICE\n", | |
" ))\n", | |
" return self._ns\n", | |
"\n", | |
" def _build_notification_channel(self, name):\n", | |
" '''\n", | |
" Create a NotificationChannel using channel id of the application\n", | |
" package name (com.xyz, org.xyz, ...) and channel name same as the\n", | |
" provided notification title if the API is high enough, otherwise\n", | |
" do nothing.\n", | |
"\n", | |
" .. versionadded:: 1.4.0\n", | |
" '''\n", | |
"\n", | |
" if SDK_INT < 26:\n", | |
" return\n", | |
"\n", | |
" channel = autoclass('android.app.NotificationChannel')\n", | |
"\n", | |
" app_channel = channel(\n", | |
" self._channel_id, name, NotificationManager.IMPORTANCE_DEFAULT\n", | |
" )\n", | |
" self._get_notification_service().createNotificationChannel(\n", | |
" app_channel\n", | |
" )\n", | |
" return app_channel\n", | |
"\n", | |
" @run_on_ui_thread\n", | |
" def _toast(self, message):\n", | |
" '''\n", | |
" Display a popup-like small notification at the bottom of the screen.\n", | |
"\n", | |
" .. versionadded:: 1.4.0\n", | |
" '''\n", | |
" Toast.makeText(\n", | |
" activity,\n", | |
" cast('java.lang.CharSequence', AndroidString(message)),\n", | |
" Toast.LENGTH_LONG\n", | |
" ).show()\n", | |
"\n", | |
" @staticmethod\n", | |
" def _set_icons(notification, icon=None):\n", | |
" '''\n", | |
" Set the small application icon displayed at the top panel together with\n", | |
" WiFi, battery percentage and time and the big optional icon (preferably\n", | |
" PNG format with transparent parts) displayed directly in the\n", | |
" notification body.\n", | |
"\n", | |
" .. versionadded:: 1.4.0\n", | |
" '''\n", | |
" app_icon = Drawable.presplash\n", | |
" notification.setSmallIcon(app_icon)\n", | |
"\n", | |
" bitmap_icon = app_icon\n", | |
" if icon is not None:\n", | |
" bitmap_icon = BitmapFactory.decodeFile(icon)\n", | |
" notification.setLargeIcon(bitmap_icon)\n", | |
" elif icon == '':\n", | |
" # we don't want the big icon set,\n", | |
" # only the small one in the top panel\n", | |
" pass\n", | |
" else:\n", | |
" bitmap_icon = BitmapFactory.decodeResource(\n", | |
" python_act.getResources(), app_icon\n", | |
" )\n", | |
" notification.setLargeIcon(bitmap_icon)\n", | |
"\n", | |
" def _build_notification(self, title):\n", | |
" '''\n", | |
" .. versionadded:: 1.4.0\n", | |
" '''\n", | |
" if SDK_INT < 26:\n", | |
" noti = NotificationBuilder(activity)\n", | |
" else:\n", | |
" self._channel = self._build_notification_channel(title)\n", | |
" noti = NotificationBuilder(activity, self._channel_id)\n", | |
" return noti\n", | |
"\n", | |
" @staticmethod\n", | |
" def _set_open_behavior(notification):\n", | |
" '''\n", | |
" Open the source application when user opens the notification.\n", | |
"\n", | |
" .. versionadded:: 1.4.0\n", | |
" '''\n", | |
"\n", | |
" # create Intent that navigates back to the application\n", | |
" app_context = activity.getApplication().getApplicationContext()\n", | |
" notification_intent = Intent(app_context, python_act)\n", | |
"\n", | |
" # set flags to run our application Activity\n", | |
" notification_intent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP)\n", | |
" notification_intent.setAction(Intent.ACTION_MAIN)\n", | |
" notification_intent.addCategory(Intent.CATEGORY_LAUNCHER)\n", | |
"\n", | |
" # get our application Activity\n", | |
" pending_intent = PendingIntent.getActivity(\n", | |
" app_context, 0, notification_intent, 0\n", | |
" )\n", | |
"\n", | |
" notification.setContentIntent(pending_intent)\n", | |
" notification.setAutoCancel(True)\n", | |
"\n", | |
" def _open_notification(self, notification):\n", | |
" if SDK_INT >= 16:\n", | |
" notification = notification.build()\n", | |
" else:\n", | |
" notification = notification.getNotification()\n", | |
"\n", | |
" self._get_notification_service().notify(0, notification)\n", | |
"\n", | |
" def _notify(self, **kwargs):\n", | |
" noti = None\n", | |
" message = kwargs.get('message').encode('utf-8')\n", | |
" ticker = kwargs.get('ticker').encode('utf-8')\n", | |
" title = AndroidString(\n", | |
" kwargs.get('title', '').encode('utf-8')\n", | |
" )\n", | |
" icon = kwargs.get('app_icon')\n", | |
"\n", | |
" # decide whether toast only or proper notification\n", | |
" if kwargs.get('toast'):\n", | |
" self._toast(message)\n", | |
" return\n", | |
" else:\n", | |
" noti = self._build_notification(title)\n", | |
"\n", | |
" # set basic properties for notification\n", | |
" noti.setContentTitle(title)\n", | |
" noti.setContentText(AndroidString(message))\n", | |
" noti.setTicker(AndroidString(ticker))\n", | |
" noti.setStyle(BigTextStyle().bigText(message))\n", | |
" # set additional flags for notification\n", | |
" self._set_icons(noti, icon=icon)\n", | |
" self._set_open_behavior(noti)\n", | |
"\n", | |
" # launch\n", | |
" self._open_notification(noti)\n", | |
"\n", | |
"\n", | |
"def instance():\n", | |
" '''\n", | |
" Instance for facade proxy.\n", | |
" '''\n", | |
" return AndroidNotification()" | |
], | |
"execution_count": null, | |
"outputs": [ | |
{ | |
"output_type": "stream", | |
"name": "stdout", | |
"text": [ | |
"Writing /content/.buildozer/android/platform/build-armeabi-v7a/dists/timetable__armeabi-v7a/_python_bundle/_python_bundle/site-packages/plyer/platforms/android/notification.py\n" | |
] | |
} | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": { | |
"id": "LaOJATsLRgrx" | |
}, | |
"source": [ | |
"Below command will replace AndroidManifest.xml with a modified version that includes Read/write external storage permissions for services. you can add your own if you want here" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"metadata": { | |
"id": "pCyJLv_iCF7z", | |
"colab": { | |
"base_uri": "https://localhost:8080/" | |
}, | |
"outputId": "f4001040-4b4c-47f8-932d-44461d25bcea" | |
}, | |
"source": [ | |
"%%writefile /content/.buildozer/android/platform/python-for-android/pythonforandroid/bootstraps/sdl2/build/templates/AndroidManifest.tmpl.xml\n", | |
"```\n", | |
"<?xml version=\"1.0\" encoding=\"utf-8\"?>\n", | |
"<!-- Replace org.libsdl.app with the identifier of your game below, e.g.\n", | |
" com.gamemaker.game\n", | |
"-->\n", | |
"<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n", | |
" package=\"{{ args.package }}\"\n", | |
" android:versionCode=\"{{ args.numeric_version }}\"\n", | |
" android:versionName=\"{{ args.version }}\"\n", | |
" android:installLocation=\"auto\">\n", | |
"\n", | |
" <supports-screens\n", | |
" android:smallScreens=\"true\"\n", | |
" android:normalScreens=\"true\"\n", | |
" android:largeScreens=\"true\"\n", | |
" android:anyDensity=\"true\"\n", | |
" {% if args.min_sdk_version >= 9 %}\n", | |
" android:xlargeScreens=\"true\"\n", | |
" {% endif %}\n", | |
" />\n", | |
"\n", | |
" <!-- Android 2.3.3 -->\n", | |
" <uses-sdk android:minSdkVersion=\"{{ args.min_sdk_version }}\" android:targetSdkVersion=\"{{ android_api }}\" />\n", | |
"\n", | |
" <!-- OpenGL ES 2.0 -->\n", | |
" <uses-feature android:glEsVersion=\"0x00020000\" />\n", | |
"\n", | |
" <!-- Allow writing to external storage -->\n", | |
" <uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\" />\n", | |
" {% for perm in args.permissions %}\n", | |
" {% if '.' in perm %}\n", | |
" <uses-permission android:name=\"{{ perm }}\" />\n", | |
" {% else %}\n", | |
" <uses-permission android:name=\"android.permission.{{ perm }}\" />\n", | |
" {% endif %}\n", | |
" {% endfor %}\n", | |
"\n", | |
" {% if args.wakelock %}\n", | |
" <uses-permission android:name=\"android.permission.WAKE_LOCK\" />\n", | |
" {% endif %}\n", | |
"\n", | |
" {% if args.billing_pubkey %}\n", | |
" <uses-permission android:name=\"com.android.vending.BILLING\" />\n", | |
" {% endif %}\n", | |
"\n", | |
" {{ args.extra_manifest_xml }}\n", | |
"\n", | |
"\n", | |
" <!-- Create a Java class extending SDLActivity and place it in a\n", | |
" directory under src matching the package, e.g.\n", | |
" \tsrc/com/gamemaker/game/MyGame.java\n", | |
"\n", | |
" then replace \"SDLActivity\" with the name of your class (e.g. \"MyGame\")\n", | |
" in the XML below.\n", | |
"\n", | |
" An example Java class can be found in README-android.txt\n", | |
" -->\n", | |
" <application android:label=\"@string/app_name\"\n", | |
" {% if debug %}android:debuggable=\"true\"{% endif %}\n", | |
" android:icon=\"@mipmap/icon\"\n", | |
" android:allowBackup=\"{{ args.allow_backup }}\"\n", | |
" {% if args.backup_rules %}android:fullBackupContent=\"@xml/{{ args.backup_rules }}\"{% endif %}\n", | |
" {{ args.extra_manifest_application_arguments }}\n", | |
" android:theme=\"{{args.android_apptheme}}{% if not args.window %}.Fullscreen{% endif %}\"\n", | |
" android:hardwareAccelerated=\"true\"\n", | |
" >\n", | |
" {% for l in args.android_used_libs %}\n", | |
" <uses-library android:name=\"{{ l }}\" />\n", | |
" {% endfor %}\n", | |
"\n", | |
" {% for m in args.meta_data %}\n", | |
" <meta-data android:name=\"{{ m.split('=', 1)[0] }}\" android:value=\"{{ m.split('=', 1)[-1] }}\"/>{% endfor %}\n", | |
" <meta-data android:name=\"wakelock\" android:value=\"{% if args.wakelock %}1{% else %}0{% endif %}\"/>\n", | |
"\n", | |
" <activity android:name=\"{{args.android_entrypoint}}\"\n", | |
" android:label=\"@string/app_name\"\n", | |
" android:configChanges=\"mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|fontScale|uiMode{% if args.min_sdk_version >= 8 %}|uiMode{% endif %}{% if args.min_sdk_version >= 13 %}|screenSize|smallestScreenSize{% endif %}{% if args.min_sdk_version >= 17 %}|layoutDirection{% endif %}{% if args.min_sdk_version >= 24 %}|density{% endif %}\"\n", | |
" android:screenOrientation=\"{{ args.orientation }}\"\n", | |
" {% if args.activity_launch_mode %}\n", | |
" android:launchMode=\"{{ args.activity_launch_mode }}\"\n", | |
" {% endif %}\n", | |
" >\n", | |
"\n", | |
" {% if args.launcher %}\n", | |
" <intent-filter>\n", | |
" <action android:name=\"org.kivy.LAUNCH\" />\n", | |
" <category android:name=\"android.intent.category.DEFAULT\" />\n", | |
" <data android:scheme=\"{{ url_scheme }}\" />\n", | |
" </intent-filter>\n", | |
" {% else %}\n", | |
" <intent-filter>\n", | |
" <action android:name=\"android.intent.action.MAIN\" />\n", | |
" <category android:name=\"android.intent.category.LAUNCHER\" />\n", | |
" </intent-filter>\n", | |
" {% endif %}\n", | |
"\n", | |
" {%- if args.intent_filters -%}\n", | |
" {{- args.intent_filters -}}\n", | |
" {%- endif -%}\n", | |
" </activity>\n", | |
"\n", | |
" {% if args.launcher %}\n", | |
" <activity android:name=\"org.kivy.android.launcher.ProjectChooser\"\n", | |
" android:icon=\"@mipmap/icon\"\n", | |
" android:label=\"@string/app_name\">\n", | |
"\n", | |
" <intent-filter>\n", | |
" <action android:name=\"android.intent.action.MAIN\" />\n", | |
" <category android:name=\"android.intent.category.LAUNCHER\" />\n", | |
" </intent-filter>\n", | |
"\n", | |
" </activity>\n", | |
" {% endif %}\n", | |
"\n", | |
" {% if service or args.launcher %}\n", | |
" <service android:name=\"{{ args.service_class_name }}\"\n", | |
"\t\t\t\tandroid:permission=\"android.permission.WRITE_EXTERNAL_STORAGE\"\n", | |
"\t\t\t\tandroid:permission=\"android.permission.READ_EXTERNAL_STORAGE\"\n", | |
" android:permission=\"android.permission.INTERNET\"\n", | |
" android:permission=\"android.permission.WRITE_SETTINGS\"\n", | |
" android:permission=\"android.permission.ACCESS_FINE_LOCATION\"\n", | |
" android:permission=\"android.permission.ACCESS_COARSE_LOCATION\"\n", | |
" android:process=\":pythonservice\" />\n", | |
" {% endif %}\n", | |
" {% for name in service_names %}\n", | |
" <service android:name=\"{{ args.package }}.Service{{ name|capitalize }}\"\n", | |
" \n", | |
" android:process=\":service_{{ name }}\" />\n", | |
" {% endfor %}\n", | |
" {% for name in native_services %}\n", | |
" <service android:name=\"{{ name }}\" />\n", | |
" {% endfor %}\n", | |
"\n", | |
" {% if args.billing_pubkey %}\n", | |
" <service android:name=\"org.kivy.android.billing.BillingReceiver\"\n", | |
" android:process=\":pythonbilling\" />\n", | |
" <receiver android:name=\"org.kivy.android.billing.BillingReceiver\"\n", | |
" android:process=\":pythonbillingreceiver\">\n", | |
" <intent-filter>\n", | |
" <action android:name=\"com.android.vending.billing.IN_APP_NOTIFY\" />\n", | |
" <action android:name=\"com.android.vending.billing.RESPONSE_CODE\" />\n", | |
" <action android:name=\"com.android.vending.billing.PURCHASE_STATE_CHANGED\" />\n", | |
" </intent-filter>\n", | |
" </receiver>\n", | |
" {% endif %}\n", | |
" {% for a in args.add_activity %}\n", | |
" <activity android:name=\"{{ a }}\"></activity>\n", | |
" {% endfor %}\n", | |
" </application>\n", | |
"\n", | |
"</manifest>\n", | |
"```\n" | |
], | |
"execution_count": 10, | |
"outputs": [ | |
{ | |
"output_type": "stream", | |
"name": "stdout", | |
"text": [ | |
"Overwriting /content/.buildozer/android/platform/python-for-android/pythonforandroid/bootstraps/sdl2/build/templates/AndroidManifest.tmpl.xml\n" | |
] | |
} | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": { | |
"id": "G1qqir0gRS_I" | |
}, | |
"source": [ | |
"Use below if you want to read the AndroidManifest file generated by the buildozer build" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"metadata": { | |
"id": "EJIauF_dkCTb" | |
}, | |
"source": [ | |
"!cat /content/.buildozer/android/platform/build-armeabi-v7a/dists/timetable__armeabi-v7a/AndroidManifest.xml" | |
], | |
"execution_count": null, | |
"outputs": [] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": { | |
"id": "cflUxiZ8SYB5" | |
}, | |
"source": [ | |
"after below command, go back to the build block" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"metadata": { | |
"id": "LnfWq4jKYtci", | |
"colab": { | |
"base_uri": "https://localhost:8080/" | |
}, | |
"outputId": "e0ed85c8-716e-4e51-920a-51813f9b96bd" | |
}, | |
"source": [ | |
"cd /content" | |
], | |
"execution_count": null, | |
"outputs": [ | |
{ | |
"output_type": "stream", | |
"name": "stdout", | |
"text": [ | |
"/content\n" | |
] | |
} | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"source": [ | |
"Following https://stackoverflow.com/questions/64473316/foreground-service-in-android-using-kivy , i was able to make the background process correct somewhat. now it works, but if you kill the application in multitask, the app needs to be killed in order to work again." | |
], | |
"metadata": { | |
"id": "ZxzMyjJ--T9X" | |
} | |
}, | |
{ | |
"cell_type": "code", | |
"source": [ | |
"%%writefile .buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/templates/Service.tmpl.java \n", | |
"\n", | |
"package {{ args.package }};\n", | |
"\n", | |
"import android.content.Intent;\n", | |
"import android.content.Context;\n", | |
"import {{ args.service_class_name }};\n", | |
"\n", | |
"\n", | |
"public class Service{{ name|capitalize }} extends {{ base_service_class }} {\n", | |
" {% if sticky %}\n", | |
" @Override\n", | |
" public int startType() {\n", | |
" return START_STICKY;\n", | |
" }\n", | |
" {% endif %}\n", | |
"\n", | |
" @Override\n", | |
" protected int getServiceId() {\n", | |
" return {{ service_id }};\n", | |
" }\n", | |
"\n", | |
" static public void start(Context ctx, String pythonServiceArgument) {\n", | |
" Intent intent = new Intent(ctx, Service{{ name|capitalize }}.class);\n", | |
" String argument = ctx.getFilesDir().getAbsolutePath() + \"/app\";\n", | |
" intent.putExtra(\"androidPrivate\", ctx.getFilesDir().getAbsolutePath());\n", | |
" intent.putExtra(\"androidArgument\", argument);\n", | |
" intent.putExtra(\"serviceTitle\", \"{{ args.name }}\");\n", | |
" intent.putExtra(\"serviceDescription\", \"{{ name|capitalize }}\");\n", | |
" intent.putExtra(\"serviceEntrypoint\", \"{{ entrypoint }}\");\n", | |
" intent.putExtra(\"pythonName\", \"{{ name }}\");\n", | |
" intent.putExtra(\"serviceStartAsForeground\", \"true\");\n", | |
" intent.putExtra(\"pythonHome\", argument);\n", | |
" intent.putExtra(\"pythonPath\", argument + \":\" + argument + \"/lib\");\n", | |
" intent.putExtra(\"pythonServiceArgument\", pythonServiceArgument);\n", | |
" ctx.startService(intent);\n", | |
" }\n", | |
"\n", | |
" static public void stop(Context ctx) {\n", | |
" Intent intent = new Intent(ctx, Service{{ name|capitalize }}.class);\n", | |
" ctx.stopService(intent);\n", | |
" }\n", | |
"}\n" | |
], | |
"metadata": { | |
"colab": { | |
"base_uri": "https://localhost:8080/" | |
}, | |
"id": "AMZL8iy9e8B8", | |
"outputId": "bd35a37f-92ff-49bb-964b-d15ad2152b98" | |
}, | |
"execution_count": 12, | |
"outputs": [ | |
{ | |
"output_type": "stream", | |
"name": "stdout", | |
"text": [ | |
"Overwriting .buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/templates/Service.tmpl.java\n" | |
] | |
} | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": { | |
"id": "KTHj5926SR_B" | |
}, | |
"source": [ | |
"Use either of these as the last resort if you want to restart the entire process. " | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"metadata": { | |
"id": "wyVLXEgJFeqv" | |
}, | |
"source": [ | |
"rm -r .buildozer/" | |
], | |
"execution_count": null, | |
"outputs": [] | |
}, | |
{ | |
"cell_type": "code", | |
"metadata": { | |
"id": "YZPSi3j4oweu" | |
}, | |
"source": [ | |
"!buildozer android clean" | |
], | |
"execution_count": null, | |
"outputs": [] | |
}, | |
{ | |
"cell_type": "code", | |
"source": [ | |
"cat .buildozer/android/platform/build-armeabi-v7a/dists/datacollector__armeabi-v7a/templates/Service.tmpl.java " | |
], | |
"metadata": { | |
"colab": { | |
"base_uri": "https://localhost:8080/" | |
}, | |
"id": "vLa3HYFBfTWy", | |
"outputId": "58d8fce0-2a3c-4277-f2f9-7f86945c626c" | |
}, | |
"execution_count": 13, | |
"outputs": [ | |
{ | |
"output_type": "stream", | |
"name": "stdout", | |
"text": [ | |
"\n", | |
"package {{ args.package }};\n", | |
"\n", | |
"import android.content.Intent;\n", | |
"import android.content.Context;\n", | |
"import {{ args.service_class_name }};\n", | |
"\n", | |
"\n", | |
"public class Service{{ name|capitalize }} extends {{ base_service_class }} {\n", | |
" {% if sticky %}\n", | |
" @Override\n", | |
" public int startType() {\n", | |
" return START_STICKY;\n", | |
" }\n", | |
" {% endif %}\n", | |
"\n", | |
" @Override\n", | |
" protected int getServiceId() {\n", | |
" return {{ service_id }};\n", | |
" }\n", | |
"\n", | |
" static public void start(Context ctx, String pythonServiceArgument) {\n", | |
" Intent intent = new Intent(ctx, Service{{ name|capitalize }}.class);\n", | |
" String argument = ctx.getFilesDir().getAbsolutePath() + \"/app\";\n", | |
" intent.putExtra(\"androidPrivate\", ctx.getFilesDir().getAbsolutePath());\n", | |
" intent.putExtra(\"androidArgument\", argument);\n", | |
" intent.putExtra(\"serviceTitle\", \"{{ args.name }}\");\n", | |
" intent.putExtra(\"serviceDescription\", \"{{ name|capitalize }}\");\n", | |
" intent.putExtra(\"serviceEntrypoint\", \"{{ entrypoint }}\");\n", | |
" intent.putExtra(\"pythonName\", \"{{ name }}\");\n", | |
" intent.putExtra(\"serviceStartAsForeground\", \"true\");\n", | |
" intent.putExtra(\"pythonHome\", argument);\n", | |
" intent.putExtra(\"pythonPath\", argument + \":\" + argument + \"/lib\");\n", | |
" intent.putExtra(\"pythonServiceArgument\", pythonServiceArgument);\n", | |
" ctx.startService(intent);\n", | |
" }\n", | |
"\n", | |
" static public void stop(Context ctx) {\n", | |
" Intent intent = new Intent(ctx, Service{{ name|capitalize }}.class);\n", | |
" ctx.stopService(intent);\n", | |
" }\n", | |
"}" | |
] | |
} | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"source": [ | |
"" | |
], | |
"metadata": { | |
"id": "j4eLYvoxghYj" | |
}, | |
"execution_count": null, | |
"outputs": [] | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment