> For the complete documentation index, see [llms.txt](https://docs.dfinery.ai/developer-guide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.dfinery.ai/developer-guide/en/undefined-1/android/action/inappmessage.md).

# In-app messages

Unlike push notifications, in-app messages work while the app is open, so you can show content with less disruption to the user. DFINERY's in-app messages work based on events and are displayed automatically.

## In-app messaging hardware acceleration

You need to [enable hardware acceleration](https://developer.android.com/topic/performance/hardware-accel?hl=ko) to make the display look the same as it does on the console and make the animations run smoothly.

### Application level

Enable hardware acceleration for your entire application by adding the following attribute to the tag in your Android manifest file:

```xml
<application android:hardwareAccelerated="true" />
```

### Activity level

You can also control this on an individual Activity level. To enable or disable hardware acceleration at the Activity level, `android:hardwareAccelerated`you can use the element's properties.

```xml
<application>
    <activity />
    <activity android:hardwareAccelerated="true" />
</application>
```

## Setting custom parent view for in-app messages

SDK will automatically find the topmost view of the Activity that is being displayed and display the in-app message. If you do not use the automatic setting, `setCustomInAppMessageParentView()`you can use to set the parent view to display manually.

```kotlin
Dfinery.getInstance().setCustomInAppMessageParentView(parentView);
```

## Leveraging deep link data

If you register a deep link in the in-app message button, the [Activity](https://developer.android.com/reference/android/app/Activity) set in the deep link will be executed when clicked.

{% hint style="info" %}
For information on how to associate a deep link with an Activity, see [Creating App Content Deep Links on Android.](https://developer.android.com/training/app-links/deep-linking?hl=ko)
{% endhint %}

To get deep link data from an Activity, you can get the data as follows:

{% tabs %}
{% tab title="Java" %}

```java
public class MainActivity extends AppCompatActivity{
    @Override
    public void onCreate() {
        super.onCreate();
        if(getIntent() != null && getIntent().getData()!=null){
            Uri deeplink = getIntent().getData();
        }
    }
}
```

{% endtab %}

{% tab title="Kotlin" %}

```kotlin
class MainActivity: AppCompatActivity(){
    override fun onCreate() {
        super.onCreate()
        intent?.let { 
            it.data?.let {
                val deeplink = it
            }
        }
    }
}
```

{% endtab %}
{% endtabs %}
