Replies: 6 comments
-
We do not support "gomobile bind" or any usage of the gomobile dependency. The Android functionality is provided within Fyne and you should use |
Beta Was this translation helpful? Give feedback.
-
Thank you so much! If that’s not too much to ask, could you please share a little snippet of how the code could looks like to start a VPNService using RunNative? |
Beta Was this translation helpful? Give feedback.
-
This document should help https://fynelabs.com/2024/03/01/running-native-android-code-in-a-fyne-app/ |
Beta Was this translation helpful? Give feedback.
-
Thanks for the document! I really understand better how to do this, but the example works with a static field. I tried to do it in a similar way |
Beta Was this translation helpful? Give feedback.
-
From the following on tickets this was clearly intended as a discussion, converting. |
Beta Was this translation helpful? Give feedback.
-
Accessing the native code is not Fyne specific, and there have been examples posted. |
Beta Was this translation helpful? Give feedback.
-
Checklist
Is your feature request related to a problem?
Hello! I am writing an Outline VPN client for Android in the Go language and use outline-go-tun2SOCKS (https://github.com/Jigsaw-Code/outline-apps/tree/master/client/go). In order to connect with the server on Android, I need a TUN file descriptor (https://github.com/Jigsaw-Code/outline-apps/blob/master/client/go/outline/tun2socks/tunnel_android.go#L43) is created on Android using VpnService (https://developer.android.com/reference/android/net/VpnService). But it cannot be launched from Go (https://pkg.go.dev/github.com/eycorsican/go-tun2socks-android), so I try to use Gomobile Bind (https://pkg.go.dev/golang.org/x/mobile/cmd/gobind) to create a method working on Go and calling vpnservice, which is made
on Kotlin. However, during the compilation of Gomobile Bind, errors occur. Could you please, help me with that? Any help would be much appreciated!!
Is it possible to construct a solution with the existing API?
No response
Describe the solution you'd like to see.
The function that runs VpnService on Go
Beta Was this translation helpful? Give feedback.
All reactions