---
page_source: https://docs.juspay.io/upi-inapp/android/interaction-with-sdk/intent-handling
page_title: Intent Handling
---


## Intent Handling




###   Android Manifest Changes


Changes in manifest for Incoming Intent, Incoming Mandate and UPI Global.



#### Code Snippets: -

#### Java Code Snippet:

```java
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="in.juspay.devtools">

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.SEND_SMS" />

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/Theme.AppCompat.NoActionBar"
        android:usesCleartextTraffic="true">
        <!-- block:start:intent -->
        <activity
            android:name=".DemoUPIActivity"
            android:exported="true"
            android:windowSoftInputMode="adjustResize">
            <intent-filter>
            <action android:name="android.intent.action.VIEW" />

            <category android:name="android.intent.category.DEFAULT" />
            <category android:name="android.intent.category.BROWSABLE" />

            <data
                android:host="pay"
                android:pathPattern=".*"
                android:scheme="upi" />
            </intent-filter>
        </activity>
        <queries>
            <intent>
                <data
                    android:scheme="upi"
                    android:pathPattern=".*"
                    android:host="pay"
                    />
                <data
                    android:scheme="upi"
                    android:pathPattern=".*"
                    android:host="mandate"
                    />
                <data
                    android:scheme="upi"
                    android:pathPattern=".*"
                    android:host="global"
                    />
            </intent>
        </queries>
        <!-- block:end:intent -->
    </application>

</manifest>

```

#### Kotlin Code Snippet:

```kotlin
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="in.juspay.devtools">

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.SEND_SMS" />

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/Theme.AppCompat.NoActionBar"
        android:usesCleartextTraffic="true">
        <!-- block:start:intent -->
        <activity
            android:name=".DemoUPIActivity"
            android:exported="true"
            android:windowSoftInputMode="adjustResize">
            <intent-filter>
            <action android:name="android.intent.action.VIEW" />

            <category android:name="android.intent.category.DEFAULT" />
            <category android:name="android.intent.category.BROWSABLE" />

            <data
                android:host="pay"
                android:pathPattern=".*"
                android:scheme="upi" />
            </intent-filter>
        </activity>
        <queries>
            <intent>
                <data
                    android:scheme="upi"
                    android:pathPattern=".*"
                    android:host="pay"
                    />
                <data
                    android:scheme="upi"
                    android:pathPattern=".*"
                    android:host="mandate"
                    />
                <data
                    android:scheme="upi"
                    android:pathPattern=".*"
                    android:host="global"
                    />
            </intent>
        </queries>
        <!-- block:end:intent -->
    </application>

</manifest>

```



### Intent Response



Android will send result in [onActivityResult](../interaction-with-sdk/life-cycle-events). Following are the intent responses that Android will send:


###   Success



### Payload
- **RequestCode**:
  - Description: Calling apps requestCode
  - Tags: Integer
- **ResultCode**:
  - Description: Result Code
  - Value: Example: RESULT_OK
  - Tags: String
- **Data**:
  - Description: Intent Data
  - Value:
    - **Status**:
      - Description: Intent Status
      - Value: Example: Success
      - Tags: String
    - **TxnId**:
      - Description: Transaction ID
      - Value: Example: YBL99e9db4c88e84fb7834dff54cab92d09
      - Tags: String
    - **Response**:
      - Description: Intent Response
      - Value: Example: txnId=YBL99e9db4c88e84fb7834dff54cab92d09&txnRef=20220511319905447809&Status=Success&responseCode=00
      - Tags: String
    - **TxnRef**:
      - Description: Transaction Reference
      - Value: Example: 20220511319905447809
      - Tags: String
    - **ResponseCode**:
      - Description: Response Code
      - Value: Example: 00
      - Tags: String
  - Tags: JSON





###   Failure



### Payload
- **RequestCode**:
  - Description: Calling apps requestCode
  - Tags: Integer
- **ResultCode**:
  - Description: Result Code
  - Value: Example: RESULT_OK
  - Tags: String
- **Data**:
  - Description: Intent Data
  - Value:
    - **Status**:
      - Description: Intent Status
      - Value: Example: FAILURE
      - Tags: String
    - **TxnId**:
      - Description: Transaction ID
      - Value: Example: YBL99e9db4c88e84fb7834dff54cab92d09
      - Tags: String
    - **Response**:
      - Description: Intent Response
      - Value: Example: txnId=YBLa1b5bc0ada0743c292400fa0be124733&txnRef=15155312749&Status=Failed&responseCode=01
      - Tags: String
    - **TxnRef**:
      - Description: Transaction Reference
      - Value: Example: 20220511319905447809
      - Tags: String
    - **ResponseCode**:
      - Description: Response Code
      - Value: Example: 01
      - Tags: String
  - Tags: JSON





###   Backpress



### Payload
- **RequestCode**:
  - Description: Calling apps requestCode
  - Tags: Integer
- **ResultCode**:
  - Description: Result Code
  - Value: Example: RESULT_OK
  - Tags: String
- **Data**:
  - Description: Intent Data
  - Value:
    - **Status**:
      - Description: Intent Status
      - Value: Example: FAILURE
      - Tags: String
  - Tags: JSON


