This repository is there for demonstration purposes mainly. You could possibly experience some weird issues while getting it running on your platform. Star and fork the repository if you want to say thank you.
Download the app on google play:
Install kivy. Install audio and video deps too.
Create using the system site packages.
Virtualenvwrapper: mkvirtualenv --system-site-packages kognitivo
pip install -r requirements.txt
inv kivy.atlas
inv kivy.po
inv kivy.mo
inv kognitivo.db
KIVY_UNITTEST=true pytest
.
Use pytest xdist in order to start in multiprocess mode: KIVY_UNITTEST=true pytest -n 4
.
Use keyword <lang_code>_lang
to execute the tests for a certain language only:
KIVY_UNITTEST=true pytest -n 4 -k en_lang
.Make sure you've gone all steps in kivy packing guide
Buildozer is python android packaging tool. Because of python for android won't work inside the virtualenv it must be installed within global python env. Make sure you go through installation instructions
sudo pip install buildozer==0.33
. Make sure you are not in the virtualenv.buildozer android update
. This may take a while. Make sure you are not in the virtualenv.$HOME/.buildozer/android/platform/android-sdk-<sdk_version>
invoke.json
inplace of inv android.manager
which starts sdk manager GUI.inv android.debug --no-deploy
. This one is a wrapper around buildozer debug
with a custom patching of the
android project usually located at <YOUR_PROJECT_DIR>/.buildozer/android/platform/build/dists/kognitivo
.bin/
directory named like Kognitivo-<version>-debug.apk
The following instructions are there for you as example of how you could release-ready package your own app.
Of course you can be a total jerk and just upload the copy of kognitivo into Google Play, it's your choice.
release/kognitivo.keystore
<SET_KEYSTORE_PASSWORD>
in your invoke.json
. inv android.release --no-deploy
. It's not much different from the bare buildozer android release
, only
android project files patching.inv android.manager
inv android.avd-manager
Not recommended didn't work for me: Genymotion uses Virtual Box x86 based images, new p4a toolchain seems to have massive problems with x86
Genymotion is a powerful android emulator free for personal use. Genymotion uses virtualbox, so make sure you've done installation guide
<SET_GENYMOTION_PATH>
inv android.check-genymotion
, it should show: Player found
<genymotion>/genymotion
. Go through the wizard and
install a device you wish. Let's say it will be Google Pixel with Android 7.0. Could find gapps for 7.1, see below.invoke.json
VBoxManage list vms
, find the device id in the list of installed virtual boxes. It's the on in curly braces
like {c5ed9f35-38df-4ded-b533-8348a0f3bff8}
invoke.json
inplace of <SET_GENYMOTION_DEVICE_ID>
inv android.genymotion
.install debug version in the emulator with inv android.install --debug
. It would use a debug apk with the biggest
version in /bin
directory.
usually while development you'd want to do package and run your app, you can do so by dropping
no-deploy
option: inv android.debug
. This would start an emulator, install the apk and run the app. You can also
add --logcat
option in order to see the logs in your command line. Stop with Ctrl+C
ImportError: Cython.Distutils
-> install cython apt install cython
apt install libgl1-mesa-dev
pkg_resources.VersionConflict: (pytest 2.8.7 (/usr/lib/python2.7/dist-packages), Requirement.parse('pytest>=3.0.0'))
-> you have pytest installed globally, remove it and reinstall pytest in the virtualenvJava compiler (javac) not found, please install it.
.
-> Install missing jdk. For openjdk and java 8: sudo apt install openjdk-8-jdk
Failure [INSTALL_FAILED_NO_MATCHING_ABIS: Failed to extract native libraries, res=-113]
while installing the app
inside the emulator -> caused by the fact that genymotion emulators are based on the x86 architecture, you've probably
forgotten to install ARM translationinv android.debug
could possibly fail with missing string ids (app_id and facebook_app_id).
Just rerun the the commands. This is happening because patching fails if there is no project directory yet.cannot create GLES surface
-> emulator doesn't have use host GPU
checkboxIf you are still willing to contribute, just make a PR, run the tests and flake8
on your branch. I'll take a look :D
Apache 2.0