Native
Android
Step 1: Set Up the Environment
- Configure the development environment for either Android based on your current system.
Step 2: Render widget in your App page
Place PromoView in the layout for the Activity or Fragment in which you'd like to display it. The easiest way to do this is to add one to the corresponding XML layout file. Here's an example that shows an activity's PromoView:
copy
...
<com.iap.ac.android.marketing.ui.PromoView
android:id="@+id/promo_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:positionId="YOUR_POSITION_ID"
/>
...
Contact A+ team to apply a postionId
iOS
Step 1: Set Up the Environment
- Configure the development environment for either iOS based on your current system.
Step 2: Render widget in your App page
Example:
copy
import IAPMarketing
/// Pass in YOUR_POSITION_ID to initialize the view
let promoViewConfig = PromoViewConfig()
romoViewConfig.positionId = "YOUR_POSITION_ID"
let promoView = PromoView(config: promoViewConfig )
self.view.addSubview(promoView)
/// constraint view
let safeArea = self.view.safeAreaLayoutGuide
promoView?.topAnchor.constraint(equalTo: safeArea.topAnchor, constant: 12).isActive = true
promoView?.leadingAnchor.constraint(equalTo: safeArea.leadingAnchor, constant: 12).isActive = true
promoView?.trailingAnchor.constraint(equalTo: safeArea.trailingAnchor, constant: -12).isActive = true
Validate the integration
After you've finished the previous steps, notify Alipay+ team to configure the delivery content. When all the configuration work is done, you'll see the marketing content rendered in your app page.