I wrote a service for kivy for android. On the phone, with the help of kivy launcher, the service starts and works properly. However, after building the apk file with buildozer (and installing it accordingly), the service starts and stops immediately. do I have to specify something in the buildozer.spec file regarding the service? Or is it somehow different to get the apk file?
i used to face this issue and solved it with a minor hack, i have a not so complete projects that uses this feature to interact with an online database to send some "push" notifications to my kivy app.
the link to my repo ,i hope it helps
Related
I am making an app in kivy and I wanted to know if there is any way to see the app I am making on my phone without having to use buildozer every minute to create an apk. I found an app called kivy launcher but I think it doesn't work anymore
I tried to use kivy launcher but it didn't work.
I asked this question to help solve my doubt, and my question is this: Is it possible to run the .dex you get when installing an apk? I have my doubts because I want to be able to move and execute an application that is installed from my application. I explain: I may be able to move with all the files of this one like the apk, the dex, the Cahe. Among others, and be able to run that application. And according to my research, an application runs from your .dex file. True? If not, please correct. Thank you very much.
Simple answer:
Android only allows you to start an app via Intents. An intent will only start the app if it is installed. Android decides where the app is installed and will start it from there. A third-party app cannot move an app and instruct the OS to start it from there.
Detailed:
While there are (rather complex) ways to run code from dex files directly (without having Android install them), it does not work the same way as starting the app would: The code from the dex won't get its own process, interaction with the OS doesn't work the same,...
What am I trying to do?
I would like to be able to remotely update my Kivy code.
What have I tried?
os.system
From inside my Kivy code, I called os.system('pm install -r /sdcard/my_app.apk'). It doesn't seem to work.
Kivy Launcher
Execution of my app from Kivy Launcher failed because my imports were not found ImportError: No module named sqlalchemy. Besides, my splash screen was not shown and there was no direct shortcut on the desktop to my app.
The question
Can I use any of the methods above or any other way to deploy new versions of my kivy code? Do I have to use Google Play?
Thanks
I made an updater for this purpose: https://github.com/kived/py4a-updater
It supports normal updates (which will show the installation dialog to the user) as well as root updates (which will just update without user input). Obviously, you need a rooted device to use root updates.
Basically, you put your APK on a web site, along with a text file which contains the version number. The updater will check the version in that text file, and if the installed version doesn't match, it will download and update. Check out the UpdaterTest app, included in the git repo, for a usage example.
OK I have done a lot of research over the last few days, reading a lot of posts on here. I have build an app that using the accelerometer and geo-location.
Now thanks in part to many different posts on here and other sites I have got most of my app working without any problems.
I now have to get it working as a background app. I am building this for iOS and android, but the main aim is iOS. I know that iOS7 changed a few things but also add support for BackgroundFetch, how do I use that within a app that I will be building with build.phonegap.com?
Now I have found this plugin, de.appplant.cordova.plugin.background-mode but when I added it to the config.xml file, phonegap build says its unsupported?
I know there is a list of areas, What's solution to make task background in iOS same service in Android? , where you can list in your 'plist file' for iOS and state what type of application it is and iOS will run it in the background because its using one of these features.
Now I have read somewhere - not to sure where - that the config.xml is built, when phonegap build runs into the plist file, so somewhere in that file I should be able to state that it is application using this and that, therefore run in the background?
So is there any many of making my app run in the background?
Any help would be most welcome
Thanks
Glenn.
The resources you have found are referring to building apps locally on your machine, not with phonegap build. You will not be able to achieve the functionality you are looking for with PGBuild as they don't allow that level of configuration.
To achieve this you will need to setup a local cordova/phonegap client and build your app from your computer.
My company has 2 native applications that run on Windows/Mac/Linux as services or daemons. I have taken this code and compiled it with the Android toolchain. I have a rooted android device to which I can push this application, run as as process and it works great. However, I'd like to build some sort of installer (probably an .apk) to which I could add this native application and run on ANY android device (e.g. without being rooted).
So does anybody know of a link, example or even just how to "install" a native application and run?
Thanks
/Loren
To do this properly, you need to rework your native service to be a library utilized by an android Service, and operate in keeping with android's conception of services (lifecycle, status bar notification, etc).
Trying to run your own executable (vs library to an android-provided executable) is not something android makes easy and not something you are encouraged to do.