-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using able with a python-for-android service #27
Comments
Unfortunately, currently it is not possible to run able as a service, I have not tried it yet. |
Hi, It is how the service is defined in the main app. self.mActivity = autoclass(u'org.kivy.android.PythonActivity').mActivity and the complete log : File "/home/jejmule/ISSULab/.buildozer/android/app/service.py", line 71, in jnius.jnius.JavaException: JVM exception occurred: Attempt to invoke virtual method 'android.content.pm.PackageManager android.content.Context.getPackageManager()' on a null object reference |
Sorry no fix or work around. We just altered the switch off time on the tablet so as to never sleep and not require a background service. |
Thank you for comment didi you use the wakelock option in the buildozer.spec file to keep the app alive?
I look into the code and the issue is coming from the BLE class defined in BLE.java. able crashes on line 43 when calling I will try to modify the BLE.java to work from service and not activity to check if my guess is correct.... |
The ability to be used from a service context is added in 1.0.8. Usage example: https://herethere.me/able/examples.html#android-services Future work should be done to add scan filters #25. |
We have created a Kivy application which spawns a service and we wish to run able within this. We tried running some existing working code but get
Is this at all possible?
Many thanks
The text was updated successfully, but these errors were encountered: