Yea. Turns out that was indeed the issue. I tried accessing a method that didn't actually exist.
Unfortunately, your code doesn't work either. It leads to a segmentation violation/nil pointer error. I suspect one needs to somehow get the right context from the Java side. Question is how. I already tried an OnCreate override func, but that one is somehow never called. On Wednesday, 24 April 2019 15:08:02 UTC+2, ma...@eliasnaur.com wrote: > > > > On Wednesday, April 24, 2019 at 2:34:34 PM UTC+2, Mark Bauermeister wrote: >> >> I'm currently experimenting with Gomobile Reverse Bindings (my hope is to >> eventually be able to call getFilesDir(), so I can save my SQLite3 DB on >> mobile) and it is, quite literally, driving me insane. >> I've followed the sparse information available, was able to successfully >> work with 'import "Java/java/lang/System" and call >> "System.currentTimeMillis()". >> >> Now I'm trying to import "Java/android/content" and it fails outright, >> stating that the package "Java/android/content" cannot be found. >> >> What is the correct import path for Android packages, or is there >> something else I need to do that I'm missing? >> > > Note that reverse binding packages will only be generated if you use a > type from it; importing is unfortunately not enough. > > Perhaps > > import "Java/android/content" > > var ctx content.Context > ctx.GetFilesDir() > > is enough to get further. > > The reverse bindings are very fickle, sorry. > > - elias > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.