cagdasc / godot-location-plugin Goto Github PK
View Code? Open in Web Editor NEWAndroid Location API implementation for Godot
License: Apache License 2.0
Android Location API implementation for Godot
License: Apache License 2.0
./gradlew generatePlugin --stacktrace
Task :locationplugin:compileDebugKotlin FAILED
e: /home/shadoww/godot-location-plugin/locationplugin/src/main/java/com/cacaosd/locationplugin/LocationKotlinPlugin.kt: (27, 12): Unresolved reference: godotengine
Help compiling would be appreciated!
mFusedLocationClient!!.requestLocationUpdates(request, mLocationCallback, null)
causes exception
JNI DETECTED ERROR IN APPLICATION: JNI CallVoidMethodA called with pending exception java.lang.IllegalStateException: Can't create handler inside thread that has not called Looper.prepare()
at void com.google.android.gms.common.internal.Preconditions.checkState(boolean, java.lang.Object) ((null):29)
at android.os.Looper com.google.android.gms.internal.location.zzbm.zzc() ((null):-1)
at android.os.Looper com.google.android.gms.internal.location.zzbm.zza(android.os.Looper) ((null):-1)
at com.google.android.gms.tasks.Task com.google.android.gms.location.FusedLocationProviderClient.requestLocationUpdates(com.google.android.gms.location.LocationRequest, com.google.android.gms.location.LocationCallback, android.os.Looper) ((null):-1)
at void com.cacaosd.locationplugin.LocationKotlinPlugin.startLocationUpdates(int, int) (LocationKotlinPlugin.kt:114)
What is the structure to add another platform?
Implement an interface? That would be easiest.
For example:
interface LocationTracker {
fun start(callbacks: Any)
fun stop()
}
// implementation for iOS platform
class LocationTrackerIOS : PlatformLocationTracker {
fun start(callbacks: Any) {
// todo: call into native
}
fun stop() {
// todo: call into native
}
}
This kotlin code would call into my Swift code for iOS. I could also expose public C methods if better.
Can you point me in the right direction? If better, maybe iOS should be a separate module? Idk how godot modules work yet.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.