Hey thanks! I got it to work! On Wed, Aug 16, 2017 at 8:41 AM Elias Naur <elias.n...@gmail.com> wrote:
> Hi, > > Have you tried the golang.org/x/mobile/example/network example? It's a > "pure" Go app that doesn't use Java bindings, but its network access > properties should be the same. > > If that works, you could modify golang.org/x/mobile/example/bind to > introduce a simple http.Get (or net.Dial) and see if that works. If so, you > have a basis for bisection. > > - elias > > > On Wednesday, August 16, 2017 at 4:54:58 PM UTC+2, Dan Ballard wrote: >> >> https://github.com/dballard/AndroidOD is the Java side >> Manifest >> >> https://github.com/dballard/AndroidOD/blob/master/app/src/main/AndroidManifest.xml >> >> <?xml version="1.0" encoding="utf-8"?> >> <manifest xmlns:android="http://schemas.android.com/apk/res/android" >> package="im.ricochet.androidod"> >> >> <uses-permission android:name="android.permission.INTERNET" /> >> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" >> /> >> >> Connect Activity >> >> https://github.com/dballard/AndroidOD/blob/master/app/src/main/java/im/ricochet/androidod/ConnectActivity.java >> >> Where the previous snippets are from setting the policy, opening a socket >> in java and calling go >> >> The Go code it calls is a simple wrapper: >> >> https://github.com/dballard/goRicochetMobile/blob/master/goRicochetMobile.go >> >> of >> https://github.com/s-rah/go-ricochet >> >> The actual connection should be happening in >> >> https://github.com/s-rah/go-ricochet/blob/master/vendor/github.com/yawning/bulb/conn.go >> Dial() at line 214 >> >> >> >> On Tuesday, August 15, 2017 at 8:58:21 AM UTC-7, Dan Ballard wrote: >>> >>> StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder(). >>> permitAll().build(); >>> StrictMode.setThreadPolicy(policy); >>> Socket socket = new Socket("127.0.0.1", 5051); >>> >>> Works, no error. When I then: >>> >>> GoRicochetMobile.echoBot(privateKey); >>> >>> I get: >>> >>> 08-15 08:24:27.441 26959-26959/? I/GoLog: error setting up onion service >>> : dial tcp4 127.0.0.1:9051: getsockopt: connection refused >>> >>> Has any one had anyluck getting go code to make network connections on >>> Android? >>> >>> -- > You received this message because you are subscribed to a topic in the > Google Groups "golang-nuts" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/golang-nuts/lMZy22tlk6Y/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > golang-nuts+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- 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.