This article contains the information required to update the Airbridge Android SDK. We recommend checking the information regarding all versions.
Check the information below when updating the Airbridge Android SDK to v4.0. All changes are listed.
Unit |
Initializes the SDK with the provided app and AirbridgeOption. |
Unit |
Enables the SDK. |
Unit |
Disables the SDK. |
Boolean |
Checks whether the SDK is currently enabled. |
Unit |
Starts collecting and transferring events. |
Unit |
Sets the key, value pair to the device alias. |
Unit |
Removes the device alias with the given key. |
Unit |
Clears all device aliases. |
Unit |
Sets the user ID. |
Unit |
Sets the user email. |
Unit |
Sets the user phone number. |
Unit |
Sets the key and value pair to the user attribute. |
Unit |
Sets the key and value pair to the user attribute. |
Unit |
Sets the key and value pair to the user attribute. |
Unit |
Sets the key and value pair to the user attribute. |
Unit |
Sets the key and value pair to the user attribute. |
Unit |
Sets the key and value pair to the user attribute. |
Unit |
Removes the user attribute with the given key. |
Unit |
Clears all user attributes. |
Unit |
Sets the key and value pair to the user alias. |
Unit |
Removes the user alias with the given key. |
Unit |
Clears all user aliases. |
Unit |
Clears all user information. |
Unit |
Registers the FCM registration token to track app uninstalls. |
Boolean |
Silent notifications are sent without any data. However, the notification may be shown to the user depending on the onMessageReceived settings. This determines whether it is a push notification to track uninstalls. |
Unit |
Tracks events. |
Boolean |
Handles Airbridge's deep links from the provided intent and invokes a callback based on the result. |
Boolean |
Handles deferred deep links and invokes a callback based on the result. |
Boolean |
Queries the tracking link to the server to get the deep link information and then moves according to that information if a deep link is set up. It also adds a click event for the tracking link. |
Boolean |
Adds an impression event for the tracking link. |
Unit |
Enables the Android SDK to automatically pull all events from the Web SDK that is installed on the website of the WebView environment. |
Boolean |
Fetches the Device UUID using the provided callbacks for success and failure. |
Boolean |
Fetches the Google Install Referrer. |
Boolean |
Fetched the Huawei Install Referrer. |
Boolean |
Fetchs the Onestore Install Referrer. |
Boolean |
Fetches the Galaxy Store Install Referrer. |
Boolean |
Fetches the Meta Install Referrer. |
Boolean |
Fetches the Google Advertising ID info. |
Boolean |
Fetches the Huawei Advertising ID info. |
Unit |
This method was deprecated in v4. use |
AirbridgeDeviceInfo |
This method was deprecated in v4. use |
AirbridgeUser |
This method was deprecated in v4. use |
Unit |
This method was deprecated in v4. use |
Unit |
This method was removed in v4. use |
Unit |
This method was deprecated in v4. use |
Unit |
This method was deprecated in v4. use |
Unit |
This method was deprecated in v4. use |
Unit |
This method was deprecated in v4. use |
Unit |
This method was deprecated in v4. use |
Unit |
This method was deprecated in v4. use |
Class name | Description |
---|---|
AirbridgeOption |
|
AirbridgeCategory | Key of Standard Event used on |
AirbridgeAttributes | Key of Semantic Attribute used on |
OnSuccess | OnSuccess callback |
OnFailure | OnFailure callback |
AirbridgeLogLevel | Airbridge log level |
Class name | Description |
---|---|
Event | This class was hidden in v4. use |
Class name | Description |
---|---|
AirbridgeConfig | This class was removed in v4. use |
StandardEventCategory | This class was removed in v4. use |
SemanticAttributes | This class was removed in v4. use |
Product | This class was removed in v4. use |
AirbridgeCallback | This class was removed in v4. use |
OnDeferredDeeplinkReceiveListener | This class was removed in v4. use |
OnDeferredDeeplinkDetermineListener | This class was removed in v4. |
AirbridgeDeviceInfo | This method was removed in v4. use |
AirbridgeUser | This method was removed in v4. use |
Class name | Description |
---|---|
AdvertisingIdInfo | Moved to |
ReferrerDetails | Moved |
AirbridgeConfig | AirbridgeOption | default value |
---|---|---|
|
| - |
|
| - |
|
|
|
|
| 300 |
|
| true |
|
| true |
|
| false |
|
| false |
|
| false |
|
| false |
|
| false |
|
| true |
|
| false |
|
| true |
|
| “” |
|
| “native” |
|
| Int.MAX_VALUE |
|
| Long.MAX_VALUE |
|
| 0 |
|
| emptyList() |
| remove | - |
| remove | - |
|
| null |
|
| null |
|
| null |
Airbridge.init(Application, AirbridgeConfig)
has been changed to Airbridge.initializeSDK(Application, AirbridgeOption)
.
AirbridgeConfig
has been changed to AirbridgeOption
. AirbridgeConfig.Builder
has been changed to AirbridgeOptionBuilder
. Some function names in the AirbridgeOptionBuilder
have been changed or deleted.
Refer to the example below.
override fun onCreate() {
super.onCreate()
val option = AirbridgeOptionBuilder("YOUR_APP_NAME", "YOUR_APP_SDK_TOKEN")
.build()
Airbridge.initializeSDK(this, option)
}
@Override
public void onCreate() {
super.onCreate();
AirbridgeOption option = new AirbridgeOptionBuilder("YOUR_APP_NAME", "YOUR_APP_SDK_TOKEN")
.build();
Airbridge.initializeSDK(this, option);
}
The function name has been changed from getDeeplink()
to handleDeeplink()
. AirbridgeCallback
has been removed. The OnSuccess
and OnFailure
listener have been added. You can check whether the function worked by its return value.
val result = Airbridge.handleDeeplink(
intent = intent
onSuccess = { },
onFailure = { }
)
boolean result = Airbridge.handleDeeplink(
intent,
uri -> { },
throwable -> { }
);
We have improved the existing deferred deep link code logic that adds a listener
to make screen transitions more convenient. The previous method of adding a listener
has been removed. Instead, you can receive deferred deep links through the Airbridge interface.
You can call handleDeeplink
and its value from the activity configuration.
You can check with the result value whether the deferred deep links can be handled.
Deferred deep links are designed to be acquired only once after the app install. If the value is already acquired or called first, the result is false
.
val result = Airbridge.handleDeferredDeeplink(
onSuccess = { },
onFailure = { }
)
boolean result = Airbridge.handleDeferredDeeplink(
uri -> { },
throwable -> { }
);
The following APIs have been deleted. Also, StandardEventCategory
, SemanticAttributes
, and Product
have been removed.
trackEvent(category: StandardEventCategory, action: String? = null, label: String? = null, value: Number? = null, customAttributes: Map<String, Any?>? = null, semanticAttributes: Map<String, Any?>? = null)
trackEvent(category: String, action: String? = null, label: String? = null, value: Number? = null, customAttributes: Map<String, Any?>? = null, semanticAttributes: Map<String, Any?>? = null)
trackEvent(event: Event)
New APIs have been added.
trackEvent(category: String, semanticAttributes: Map<String, Any>? = null, customAttributes: Map<String, Any>? = null)
AirbridgeCategory
has been added. The event category string is predefined.
The function override and objects (SemanticAttributes
, Product
) for passing additional information were deleted.
Instead, it has been modified to transmit attributes through a map. The key value of the map is predefined in AirbridgeAttribute
as a string. Custom attributes can be sent directly as a string.
Refer to the AirbridgeCategory, AirbridgeAttribute mapping and trackEvent
function below.
Key | Type | Value |
---|---|---|
SIGN_UP | String | airbridge.user.signup |
SIGN_IN | String | airbridge.user.signin |
SIGN_OUT | String | airbridge.user.signout |
HOME_VIEWED | String | airbridge.ecommerce.home.viewed |
PRODUCT_LIST_VIEWED | String | airbridge.ecommerce.productList.viewed |
SEARCH_RESULTS_VIEWED | String | airbridge.ecommerce.searchResults.viewed |
PRODUCT_VIEWED | String | airbridge.ecommerce.product.viewed |
ADD_PAYMENT_INFO | String | airbridge.addPaymentInfo |
ADD_TO_WISHLIST | String | airbridge.addToWishlist |
ADDED_TO_CART | String | airbridge.ecommerce.product.addedToCart |
INITIATE_CHECKOUT | String | airbridge.initiateCheckout |
ORDER_COMPLETED | String | airbridge.ecommerce.order.completed |
ORDER_CANCELED | String | airbridge.ecommerce.order.canceled |
START_TRIAL | String | airbridge.startTrial |
SUBSCRIBE | String | airbridge.subscribe |
UNSUBSCRIBE | String | airbridge.unsubscribe |
AD_IMPRESSION | String | airbridge.adImpression |
AD_CLICK | String | airbridge.adClick |
COMPLETE_TUTORIAL | String | airbridge.completeTutorial |
ACHIEVE_LEVEL | String | airbridge.achieveLevel |
UNLOCK_ACHIEVEMENT | String | airbridge.unlockAchievement |
RATE | String | airbridge.rate |
SHARE | String | airbridge.share |
SCHEDULE | String | airbridge.schedule |
SPEND_CREDITS | String | airbridge.spendCredits |
Key | Type | Value |
---|---|---|
ACTION | String | action |
LABEL | String | label |
VALUE | String | value |
CURRENCY | String | currency |
ORIGINAL_CURRENCY | String | originalCurrency |
PRODUCTS | String | products |
PRODUCT_ID | String | productID |
PRODUCT_NAME | String | name |
PRODUCT_PRICE | String | price |
PRODUCT_QUANTITY | String | quantity |
PRODUCT_CURRENCY | String | currency |
PRODUCT_POSITION | String | position |
PRODUCT_CATEGORY_ID | String | categoryID |
PRODUCT_CATEGORY_NAME | String | categoryName |
PRODUCT_BRAND_ID | String | brandID |
PRODUCT_BRAND_NAME | String | brandName |
PERIOD | String | period |
IS_RENEWAL | String | isRenewal |
RENEWAL_COUNT | String | renewalCount |
PRODUCT_LIST_ID | String | productListID |
CART_ID | String | cartID |
TRANSACTION_ID | String | transactionID |
TRANSACTION_TYPE | String | transactionType |
TRANSACTION_PAIRED_EVENT_CATEGORY | String | transactionPairedEventCategory |
TRANSACTION_PAIRED_EVENT_TIMESTAMP | String | transactionPairedEventTimestamp |
TOTAL_QUANTITY | String | totalQuantity |
QUERY | String | query |
IN_APP_PURCHASED | String | inAppPurchased |
CONTRIBUTION_MARGIN | String | contributionMargin |
ORIGINAL_CONTRIBUTION_MARGIN | String | originalContributionMargin |
LIST_ID | String | listID |
RATE_ID | String | rateID |
RATE | String | rate |
MAX_RATE | String | maxRate |
ACHIEVEMENT_ID | String | achievementID |
SHARED_CHANNEL | String | sharedChannel |
DATE_TIME | String | datetime |
DESCRIPTION | String | description |
IS_REVENUE | String | isRevenue |
PLACE | String | place |
SCHEDULE_ID | String | scheduleID |
TYPE | String | type |
LEVEL | String | level |
SCORE | String | score |
AD_PARTNERS | String | adPartners |
IS_FIRST_PER_USER | String | isFirstPerUser |
Airbridge.trackEvent(
AirbridgeCategory.ORDER_COMPLETED,
mapOf(
// action
AirbridgeAttribute.ACTION to "Tool",
// label
AirbridgeAttribute.LABEL to "Hammer",
// value
AirbridgeAttribute.VALUE to 10,
// semantic attribute (provided by sdk)
AirbridgeAttribute.CURRENCY to "USD",
AirbridgeAttribute.PRODUCTS to listOf(
mapOf(
// semantic attribute value (provided by sdk)
AirbridgeAttribute.PRODUCT_ID to "12345",
// semantic attribute value (not provided by sdk)
"name" to "PlasticHammer",
),
),
// semantic attribute (not provided by sdk)
"totalQuantity" to 1,
),
mapOf(
// custom attribute
"promotion" to "FirstPurchasePromotion",
)
)
Airbridge.trackEvent(
AirbridgeCategory.ORDER_COMPLETED,
new HashMap() {{
// action
put(AirbridgeAttribute.ACTION, "Tool");
// label
put(AirbridgeAttribute.LABEL, "Hammer");
// value
put(AirbridgeAttribute.VALUE, 10);
// semantic attribute (provided by sdk)
put(AirbridgeAttribute.CURRENCY, "USD");
put(AirbridgeAttribute.PRODUCTS, Arrays.asList(
new HashMap() {{
// semantic attribute value (provided by sdk)
put(AirbridgeAttribute.PRODUCT_ID, "12345");
// semantic attribute value (not provided by sdk)
put("name", "PlasticHammer");
}}
));
// semantic attribute (not provided by sdk)
put("totalQuantity", 1);
}},
new HashMap() {{
// custom attribute
put("promotion", "FirstPurchasePromotion");
}}
);
AirbridgeUser
has been deleted. You can now access the interface through the Airbridge interface that was previously accessible through AirbridgeUser
.
Instead of accessing the code through Airbridge.getUserInfo()
, you need to replace it with the following Airbridge interface.
fun setUserID(id: String)
fun setUserEmail(email: String)
fun setUserPhone(phone: String)
fun setUserAttribute(key: String, value: Int)
fun setUserAttribute(key: String, value: Long)
fun setUserAttribute(key: String, value: Float)
fun setUserAttribute(key: String, value: Double)
fun setUserAttribute(key: String, value: Boolean)
fun setUserAttribute(key: String, value: String)
fun removeUserAttribute(key: String)
fun clearUserAttributes()
fun setUserAlias(key: String, value: String)
fun removeUserAlias(key: String)
fun clearUserAlias()
fun clearUser()
void setUserID(String id)
void setUserEmail(String email)
void setUserPhone(String phone)
void setUserAttribute(String key, int value)
void setUserAttribute(String key, long value)
void setUserAttribute(String key, float value)
void setUserAttribute(String key, double value)
void setUserAttribute(String key, boolean value)
void setUserAttribute(String key, String value)
void removeUserAttribute(String key)
void clearUserAttributes()
void setUserAlias(String key, String value)
void removeUserAlias(key: String)
void clearUserAlias()
void clearUser()
AirbridgeDeviceInfo
has been deleted. The interface that was accessed through AirbridgeDeviceInfo
has been modified so that it can now be accessed through the Airbridge interface.
AirbridgeCallback
has been deleted and OnSuccess
, OnFailure
listener has been added. You can receive the success status through this listener.
You need to replace the codes that enables access through Airbridge.getDeviceInfo() with the following Airbridge interface.
val result = Airbridge.fetchDeviceUUID(
onSuccess = { },
onFailure = { }
)
boolean result = Airbridge.fetchDeviceUUID(
uuid -> { },
throwable -> { }
);
val result = Airbridge.fetchGoogleInstallReferrerDetails(
onSuccess = { },
onFailure = { }
)
boolean result = Airbridge.fetchGoogleInstallReferrerDetails(
referrerDetails -> { },
throwable -> { }
);
val result = Airbridge.fetchHuaweiInstallReferrerDetails(
onSuccess = { },
onFailure = { }
)
boolean result = Airbridge.fetchHuaweiInstallReferrerDetails(
referrerDetails -> { },
throwable -> { }
);
val result = Airbridge.fetchGalaxyStoreInstallReferrerDetails(
onSuccess = { },
onFailure = { }
)
boolean result = Airbridge.fetchGalaxyStoreInstallReferrerDetails(
referrerDetails -> { },
throwable -> { }
);
val result = Airbridge.fetchMetaInstallReferrerDetails(
onSuccess = { },
onFailure = { }
)
boolean result = Airbridge.fetchMetaInstallReferrerDetails(
referrerDetails -> { },
throwable -> { }
);
val result = Airbridge.fetchGoogleAdvertisingIdInfo(
onSuccess = { },
onFailure = { }
)
boolean result = Airbridge.fetchGoogleAdvertisingIdInfo(
advertisingIdInfo -> { },
throwable -> { }
);
val result = Airbridge.fetchHuaweiAdvertisingIdInfo(
onSuccess = { },
onFailure = { }
)
boolean result = Airbridge.fetchHuaweiAdvertisingIdInfo(
advertisingIdInfo -> { },
throwable -> { }
);
AirbridgeDeviceInfo
has been deleted. There is no function to receive the attribution result
through the Airbridge interface. However, it can be received through the listener of AirbridgeOption
, which is an existing method.
class App : Application() {
override fun onCreate() {
super.onCreate()
val option: AirbridgeOption = AirbridgeOptionBuilder("YOUR_APP_NAME", "YOUR_APP_SDK_TOKEN")
.setOnAttributionReceived { result ->
// do something
}
.build()
Airbridge.initializeSDK(this, option)
}
}
class App extends Application {
@Override
public void onCreate() {
super.onCreate();
Airbridge.initializeSDK(this,
new AirbridgeOptionBuilder("YOUR_APP_NAME", "YOUR_APP_SDK_TOKEN")
.setOnAttributionReceived(result -> {
// do something
})
.build()
);
}
}
AirbridgeCallback
has been deleted and OnSuccess
, OnFailure
listeners have been added. You can check the operation status of the function through the return value.
fun click(
trackingLink: String,
onSuccess: OnSuccess<Unit>? = null,
onFailure: OnFailure? = null
): Boolean
boolean click(
@NonNull String trackingLink,
@Nullable OnSuccess<Unit> onSuccess,
@Nullable OnFailure onFailure
)
fun impression(
trackingLink: String,
onSuccess: OnSuccess<Unit>? = null,
onFailure: OnFailure? = null
): Boolean
boolean impression(
@NonNull String trackingLink,
@Nullable OnSuccess<Unit> onSuccess,
@Nullable OnFailure onFailure
)
The function name has been changed from setJavascriptInterface()
to setWebInterface()
.
Airbridge.setWebInterface(webview, "YOUR_WEB_TOKEN")
Airbridge.setWebInterface(webview, "YOUR_WEB_TOKEN")
This section describes the major changes in each version of the Android SDK.
For Airbridge apps created after September 4, 2023, we’ve resolved the issue where the deep-link URL provided in the deep-link callback was decoding the content entered in the Airbridge dashboard twice.
This issue occurred in Android SDK from v2.22.0 to v2.23.0.
An initialization option has been added to stop sending events when the app is in the background.
You can use the AirbridgeConfig#setTransmitEventOnBackgroundEnabled
function to stop sending events when the app is in the background.
The default value is true
. When true
, the remaining events are sent even when the app is in the background.
deeplink.page
has been deprecated. From v2.21.1 onwards, we recommend writing code using the abr.ge
deep link domain.
deeplink.page
is still supported and operates for backward compatibility.
Changes have been made so that ORGANIC_REOPEN
, FOREGROUND
events that occur within the session time are not collected by default.
If you are using a version before v2.19.1 and you are collecting ORGANIC_REOPEN
, FOREGROUND
events, you can continue collecting these events through AirbridgeConfig#setTrackInSessionLifeCycleEventEnabled.
The default value is false
, meaning ORGANIC_REOPEN
and FOREGROUND
events are not collected.
BACKGROUND
events have been removed.
Deeplink Pageview events will only be collected when Airbridge.click
is called.
このページは役に立ちましたか?