plyer
plyer copied to clipboard
Address LocationListener java method added with API31
For reference: LocationListener
Is there another way you'd handle this List/make use of the OnLocationChanged?
closes #657
suppose onFlushComplete should be added as well in this PR
For reference: LocationListener
Is there another way you'd handle this List/make use of the OnLocationChanged?
there might be apps that want to trace the path of the device as precisely as possible, and would rather have all the intermediate points? Maybe we could let the user decide which scenario they want to handle, either through a flag, or through a separate event.
For me it seems ok, better than plyer breaking on API 31. We are at least sync with previous implementation.
For the record, even targetting with SDK 30, this new method got triggered.
❯ aapt list -a build/bin/lillefives1942-0.9.0-armeabi-v7a-debug.apk|grep SdkVersion
A: android:compileSdkVersion(0x01010572)=(type 0x10)0x1e
A: android:compileSdkVersionCodename(0x01010573)="11" (Raw: "11")
A: android:minSdkVersion(0x0101020c)=(type 0x10)0x15
A: android:targetSdkVersion(0x01010270)=(type 0x10)0x1e
03-15 19:43:54.477 30534 30534 I python : ===== Python/java method missing ======
03-15 19:43:54.477 30534 30534 I python : Python class:<plyer.platforms.android.gps._LocationListener object at 0xaed0e868>
03-15 19:43:54.477 30534 30534 I python : Java method name:onLocationChanged
03-15 19:43:54.477 30534 30534 I python : Signature: (Ljava/util/List;)V
03-15 19:43:54.477 30534 30534 I python : =======================================
03-15 19:43:54.477 30534 30534 I python :
03-15 19:43:54.480 30534 30534 I python : Traceback (most recent call last):
03-15 19:43:54.480 30534 30534 I python : File "jnius/jnius_proxy.pxi", line 50, in jnius.jnius.PythonJavaClass.invoke
03-15 19:43:54.480 30534 30534 I python : File "jnius/jnius_proxy.pxi", line 74, in jnius.jnius.PythonJavaClass._invoke
03-15 19:43:54.480 30534 30534 I python : NotImplementedError: The method ('onLocationChanged', ('V', ('Ljava/util/List;',))) is not implemented
I am accepting this.