# Button Merchant Library

Version: 1.6.1

## Imports
- [ButtonMerchantLibrary](https://building.usebutton.com/button-merchant-android/latest/index.html)
- [com.usebutton.merchant](https://building.usebutton.com/button-merchant-android/latest/-button%20-merchant%20-library/com.usebutton.merchant/index.html)
- [ActivityReportingTask](https://building.usebutton.com/button-merchant-android/latest/-button%20-merchant%20-library/com.usebutton.merchant/-activity-reporting-task/index.html)
- [ButtonMerchant](https://building.usebutton.com/button-merchant-android/latest/-button%20-merchant%20-library/com.usebutton.merchant/-button-merchant/index.html)
- [AttributionTokenListener](https://building.usebutton.com/button-merchant-android/latest/-button%20-merchant%20-library/com.usebutton.merchant/-button-merchant/-attribution-token-listener/index.html)
- [ButtonProduct](https://building.usebutton.com/button-merchant-android/latest/-button%20-merchant%20-library/com.usebutton.merchant/-button-product/index.html)
- [ButtonProductCompatible](https://building.usebutton.com/button-merchant-android/latest/-button%20-merchant%20-library/com.usebutton.merchant/-button-product-compatible/index.html)
- [Order](https://building.usebutton.com/button-merchant-android/latest/-button%20-merchant%20-library/com.usebutton.merchant/-order/index.html)
- [Builder](https://building.usebutton.com/button-merchant-android/latest/-button%20-merchant%20-library/com.usebutton.merchant/-order/-builder/index.html)
- [Customer](https://building.usebutton.com/button-merchant-android/latest/-button%20-merchant%20-library/com.usebutton.merchant/-order/-customer/index.html)
- [LineItem](https://building.usebutton.com/button-merchant-android/latest/-button%20-merchant%20-library/com.usebutton.merchant/-order/-line-item/index.html)
- [OrderListener](https://building.usebutton.com/button-merchant-android/latest/-button%20-merchant%20-library/com.usebutton.merchant/-order-listener/index.html)
- [PostInstallIntentListener](https://building.usebutton.com/button-merchant-android/latest/-button%20-merchant%20-library/com.usebutton.merchant/-post-install-intent-listener/index.html)
- [UserActivityListener](https://building.usebutton.com/button-merchant-android/latest/-button%20-merchant%20-library/com.usebutton.merchant/-user-activity-listener/index.html)

## Exceptions
- [com.usebutton.merchant.exception](https://building.usebutton.com/button-merchant-android/latest/-button%20-merchant%20-library/com.usebutton.merchant.exception/index.html)
  - [ApplicationIdNotFoundException](https://building.usebutton.com/button-merchant-android/latest/-button%20-merchant%20-library/com.usebutton.merchant.exception/-application-id-not-found-exception/index.html)
  - [ButtonNetworkException](https://building.usebutton.com/button-merchant-android/latest/-button%20-merchant%20-library/com.usebutton.merchant.exception/-button-network-exception/index.html)
  - [HttpStatusException](https://building.usebutton.com/button-merchant-android/latest/-button%20-merchant%20-library/com.usebutton.merchant.exception/-http-status-exception/index.html)
  - [NetworkNotFoundException](https://building.usebutton.com/button-merchant-android/latest/-button%20-merchant%20-library/com.usebutton.merchant.exception/-network-not-found-exception/index.html)

## Modules
- [com.usebutton.merchant.module](https://building.usebutton.com/button-merchant-android/latest/-button%20-merchant%20-library/com.usebutton.merchant.module/index.html)
  - [ButtonUserActivity](https://building.usebutton.com/button-merchant-android/latest/-button%20-merchant%20-library/com.usebutton.merchant.module/-button-user-activity/index.html)
  - [Features](https://building.usebutton.com/button-merchant-android/latest/-button%20-merchant%20-library/com.usebutton.merchant.module/-features/index.html)

### handlePostInstallIntent

```kotlin
open fun handlePostInstallIntent(
    @NonNull context: Context,
    @NonNull listener: PostInstallIntentListener
)
```

Checks to see if the user visited a URL prior to installing your app. If a URL is found, [onResult](https://building.usebutton.com/button-merchant-android/latest/-button%20-merchant%20-library/com.usebutton.merchant/-post-install-intent-listener/on-result.html) will be called on the listener you passed, and you are responsible for navigating the user to the relevant content in your app. If a URL is not found or an error occurs, [onResult](https://building.usebutton.com/button-merchant-android/latest/-button%20-merchant%20-library/com.usebutton.merchant/-post-install-intent-listener/on-result.html) will be called on your listener, and you can continue with your normal launch sequence. This method checks for a post-install URL exactly one time after a user has installed your app. Subsequent calls will result in a call to [onResult](https://building.usebutton.com/button-merchant-android/latest/-button%20-merchant%20-library/com.usebutton.merchant/-post-install-intent-listener/on-result.html) on your listener. You do not need to wait for the listener before continuing with your normal launch sequence, but you should be prepared to handle an intent if a post-install URL is found.

#### Parameters
- **context**: Context
- **listener**: The listener to be notified when a post-install URL is found.
