I want to start an activity from a service in my android application (python 2.7 & kivy). I use startActivity method for it but it's not work.
When I run the app and type "buildozer android logcat", I see this:
File "jnius_export_class.pxi", line 900, in jnius.jnius.JavaMultipleMethod.__ call__ (jnius/jnius.c:24581) JavaException: No methods matching your arguments
Part of my service code:
from jnius import autoclass, cast
PythonService = autoclass("org.renpy.android.PythonService")
activity = cast("android.app.Service", PythonService.mService)
manager = activity.getPackageManager()
Intent = autoclass("android.content.Intent")
intent = manager.getLaunchIntentForPackage("com.MyTest.AndroidTest")
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
activity.startActivity(intent) ### Exception in this line
If I move it to the main activity and use PythonActivity.mActivity, it works. But I need to run this code precisely from service. Please help.