0

i'm struggling with jnius autoclass to open location settings for my app (attached screen) and it does not work, i have following error: jnius.jnius.JavaException: JVM exception occurred: No Activity found to handle Intent { act=android.settings.LOCATION_SOURCE_SETTINGS dat=package:com.att_1.seba_app_1 } android.content.ActivityNotFoundException

self.PythonActivity = autoclass('org.kivy.android.PythonActivity')
        self.mActivity = self.PythonActivity.mActivity
        self.Intent = autoclass('android.content.Intent')
        self.Settings = autoclass('android.provider.Settings')
        self.Uri = autoclass('android.net.Uri')
        self.mActivity.startActivity(
            self.Intent(
                self.Settings.ACTION_LOCATION_SOURCE_SETTINGS,
                self.Uri.parse("package:" + self.mActivity.getPackageName())
            )
        )

Can anyone help me, what i'm doing wrong?

One iteresting thing, i checked another activity ACTION_APPLICATION_DETAILS_SETTINGS from the same class as above (android.provider.Settings) and it works, it opens settings of my app, so why LOCATION_SOURCE_SETTINGS does not work?

Sebastian
  • 11
  • 3

0 Answers0