GithubHelp home page GithubHelp logo

godot-location-plugin's People

Contributors

cagdasc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

finepointcgi

godot-location-plugin's Issues

gradlew Unresolved reference: godotengine

When compiling with:

./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!

requestLocationUpdates fails

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)

support iOS

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.