<p>The fine folks at <a href="https://getalby.com/" rel="nofollow noreferrer">Alby</a> helped solve this -&gt;</p>
<p><strong>First</strong>, add query intent to manifest:</p>
<pre><code>&lt;queries&gt;
    &lt;intent&gt;
        &lt;action android:name=&quot;android.intent.action.VIEW&quot; /&gt;
        &lt;data android:scheme=&quot;lightning&quot; /&gt;
    &lt;/intent&gt;
&lt;/queries&gt;
</code></pre>
<p><strong>Second</strong>, query getalby.com for encoded <em>lnurl</em>:</p>
<pre><code>val requestUrl = &quot;https://getalby.com/lnurlp/bitanon/callback?amount=1000000&amp;comment=hello&quot; // amount is in millisats
val client = OkHttpClient() 
val request = Request.Builder().url(requestUrl).build() 
val response = client.newCall(request).await()
</code></pre>
<p><strong>Third</strong>, parse json response for 'pr' which contains encoded <em>lnurl</em>.</p>
<p><strong>Fourth</strong>, send Lightning PayRequest Android Intent, which will open with device lightning wallet of your choice:</p>
<pre><code>val intent = Intent(Intent.ACTION_VIEW).apply {
    data = Uri.parse(&quot;lightning:$lnurl&quot;)
}
if (intent.resolveActivity(packageManager) != null) {
    startActivity(intent)
}
</code></pre>
<p><strong>Fifth</strong>, parse and handle additional response info, such as transaction verification url etc.</p>

CC BY-SA 4.0
2023-01-24T23:52:51.790Z
2023-01-24T23:52:51.790Z
bitanon
<p>I'm looking for a way to include extra description (comment) info in a lightning payment request i.e. <a href="https://github.com/lnurl/luds/blob/luds/12.md" rel="nofollow noreferrer">LUD-12</a>.</p>
<p>Either with anchor link:</p>
<pre><code>&lt;a href=&quot;lightning:bitanon@getalby.com&quot; comment=&quot;payer@email.com&quot;&gt;send ln payment&lt;/a&gt;
</code></pre>
<p>Or even better using an Android Intent:</p>
<pre><code>Intent(Intent.ACTION_SEND).apply {

    data = Uri.parse(&quot;lightning:bitanon@getalby.com&quot;) 
    //type = &quot;message/rfc822&quot;
    putExtra(&quot;comment&quot;, &quot;payer@email.com&quot;)

}
</code></pre>
<p>The above anchor link works, but does not send comment data to receiving wallet. And I can't get the Android intent to launch wallet app at all. Anyone know how to get this working?</p>

CC BY-SA 4.0
2023-01-23T17:33:08.087Z
Tried "lightning:bitanon@getalby.com?comment=foo"?
Mercedes
CC BY-SA 4.0
2023-01-23T18:22:16.347Z
Yeah, doesn't work.
bitanon
<lightning-network><payment><android><invoices>
How to send lightning payment request to lnurl from Android app with extra comment data?
bitanon
# How to send lightning payment request to lnurl from Android app with extra comment data?

(Asked by: username_0 on 2023-01-23)

I'm looking for a way to include extra description (comment) info in a lightning payment request i.e. [LUD-12](https://github.com/lnurl/luds/blob/luds/12.md).

Either with anchor link:

```
<a href="lightning:username_0@getalby.com" comment="payer@email.com">send ln payment</a>

```

Or even better using an Android Intent:

```
Intent(Intent.ACTION_SEND).apply {

    data = Uri.parse("lightning:username_0@getalby.com") 
    //type = "message/rfc822"
    putExtra("comment", "payer@email.com")

}

```

The above anchor link works, but does not send comment data to receiving wallet. And I can't get the Android intent to launch wallet app at all. Anyone know how to get this working?

**Tags:** lightning-network, payment, android, invoices

> **Comments:**
> **username_1**: Tried "lightning:username_0@getalby.com?comment=foo"?  
> **username_0**: Yeah, doesn't work.  

---

## 1 answers

### Answer by username_0 on 2023-01-24. Score: 2

The fine folks at [Alby](https://getalby.com/) helped solve this ->

**First**, add query intent to manifest:

```
<queries>
    <intent>
        <action android:name="android.intent.action.VIEW" />
        <data android:scheme="lightning" />
    </intent>
</queries>

```

**Second**, query getalby.com for encoded *lnurl*:

```
val requestUrl = "https://getalby.com/lnurlp/username_0/callback?amount=1000000&comment=hello" // amount is in millisats
val client = OkHttpClient() 
val request = Request.Builder().url(requestUrl).build() 
val response = client.newCall(request).await()

```

**Third**, parse json response for 'pr' which contains encoded *lnurl*.

**Fourth**, send Lightning PayRequest Android Intent, which will open with device lightning wallet of your choice:

```
val intent = Intent(Intent.ACTION_VIEW).apply {
    data = Uri.parse("lightning:$lnurl")
}
if (intent.resolveActivity(packageManager) != null) {
    startActivity(intent)
}

```

**Fifth**, parse and handle additional response info, such as transaction verification url etc.


---

