<p>If you're connecting to a <code>bitcoind</code> <em>regtest</em> node and you're trying to connect as an RPC client to it via <code>bitcoinj</code>, it's possible.</p>

<p>Figure out what your Android's IP address is, say <code>x.y.z.w</code> and use the <code>-rpcallowip</code> parameter in <code>bitcoind</code> to allow your (remote) Android app to talk to the <em>regtest</em> <code>bitcoind</code> node.</p>

<p>Spawn <code>bitcoind</code> like this, for example:</p>

<pre><code>bitcoind -debug=1 -printtoconsole -server \
    -regtest -listen -rpcport=8332        \
    -rpcuser=yourrpcuser -rpcpassword=yourrpcpass -rpcallowip=18.138.5.97
</code></pre>

<p><strong>WARNING:</strong> Security-wise, keep in mind that <em>the RPC password is transmitted over the network in plaintext</em>.</p>

CC BY-SA 3.0
2016-07-15T03:11:00.817Z
2016-07-15T03:11:00.817Z
Alin Tomescu
<p>I'm developing a simple app to learn how to use the bitcoinj library. I'm using the <code>WalletAppKit</code> object to simplify the process and I'm following the official documentation.</p>

<p>When developing I prefer to use bitcoind regtest mode as it's faster than the testnet3 and I don't need to be connected to the i</p>

<pre><code>if (params == RegTestParams.get()) {
    // Regression test mode is designed for testing and development only, so there's no public network for it.
    // If you pick this mode, you're expected to be running a local "bitcoind -regtest" instance.
    kit.connectToLocalHost();
}
</code></pre>

<p>I was playing with the WalletTemplate example desktop app and it works just fine on the regnet. Now I'm trying to do the same on my Android app but I don't know how to connect it to my regnet instance running on my machine.</p>

<p>Does anyone know how can I do that?</p>

<p>Thanks in advance,</p>

<p>Felipe</p>

<wallet><bitcoinj><regtest><android>
Connect to regnet from my WalletAppKit Android app
felipebueno
# Connect to regnet from my WalletAppKit Android app

(Asked by: username_0 on 2016-04-15)

I'm developing a simple app to learn how to use the bitcoinj library. I'm using the `WalletAppKit` object to simplify the process and I'm following the official documentation.

When developing I prefer to use bitcoind regtest mode as it's faster than the testnet3 and I don't need to be connected to the i

```
if (params == RegTestParams.get()) {
    // Regression test mode is designed for testing and development only, so there's no public network for it.
    // If you pick this mode, you're expected to be running a local "bitcoind -regtest" instance.
    kit.connectToLocalHost();
}

```

I was playing with the WalletTemplate example desktop app and it works just fine on the regnet. Now I'm trying to do the same on my Android app but I don't know how to connect it to my regnet instance running on my machine.

Does anyone know how can I do that?

Thanks in advance,

Felipe

**Tags:** wallet, bitcoinj, regtest, android


---

## 1 answers

### Answer by username_1 on 2016-07-15. Score: 2 | Accepted answer

If you're connecting to a `bitcoind` *regtest* node and you're trying to connect as an RPC client to it via `bitcoinj`, it's possible.

Figure out what your Android's IP address is, say `x.y.z.w` and use the `-rpcallowip` parameter in `bitcoind` to allow your (remote) Android app to talk to the *regtest* `bitcoind` node.

Spawn `bitcoind` like this, for example:

```
bitcoind -debug=1 -printtoconsole -server \
    -regtest -listen -rpcport=8332        \
    -rpcuser=yourrpcuser -rpcpassword=yourrpcpass -rpcallowip=18.138.5.97

```

**WARNING:** Security-wise, keep in mind that *the RPC password is transmitted over the network in plaintext*.


---

