Reputation: 294
How should I go about making my kivy application work on a Samsung Galaxy S7? How much of the code do I have to change to make it work? Do I get features of the phone like handling "back" or vibration? Currently my code has two files, a calc.py
file which handles all the back-end calculations that are given from main.py
which is a KivyApp class which returns my main class.
There are also images that are used in the same folder from main.py
If there is a better place to post this please tell me
Thank you!
Upvotes: 1
Views: 507
Reputation: 127
You are on the right place to ask this.
First you have to convert your app in a apk using python-for-android, the easiest way is to use buildozer.
You'll probably need to make your code compatible with python2, apparently there is a new buildozer that allow pure python3, but the classic one work on python2.
For the images, if you want to keep them here, it will work, but I recommend that you put them on a "img" repo.
For the vibrations, and other android behaviors, there are 3 way to do this:
pyjnius that let you use every component you want by creating a binding to the android class.
plyer that have already create you a easy binding but don't have all the fonctionnalities.
python-for-android api, that is also really easy.
I recommand you check if you can do what want first with python-for-android or plyer, and if you can't, give a try to pyjnius.
Upvotes: 2