This PR implements the new Edge Identity features for advertising identifier capabilities, and incorporates Android GAID functionality using the Google Mobile Ads Lite SDK.
Update Edge Identity view to add the following UI components:
Button Update Ad ID With Current GAID that initiates ad ID update flow
Text that shows ad ID value (or error output)
Text that shows ad ID tracking authorization state
Fetching device advertising identifier uses ExecutorService with a single thread executor and returns values using an AdobeCallback. This architecture was used since Google's API for getting ad ID is async and requires running on a background thread.
To avoid introducing a breaking change (crashing app on launch) to all users of the Android sample app, the implementation and SDK are commented out using special blocks; instructions on enabling the implementation and all prerequisites can be found in the advertising identifier documentation.
It also implements the getUrlVariables feature (thanks to @cacheung and @addb) which returns the identifiers in URL query parameter format for consumption in hybrid mobile applications. The value returned from the API is shown under the button that implements this API. See the documentation for more details on the API.
Related Issue
Please see MOB-16412 for additional details regarding the task.
Motivation and Context
Sample app should be updated to showcase new Edge Identity advertising identifier features; both example of usage and enabling ad ID feature testing capabilities.
How Has This Been Tested?
Tested functionality using Pixel_3a_API_32_arm64-v8a, using the button Update Ad ID With Current GAID to:
Use Google Mobile Ads Lite SDK to get ad ID tracking authorization state
Return the appropriate ad ID value and send through MobileCore.setAdvertisingIdentifier
Verify results with expected values (sending the appropriate consent and ad ID events, responses, etc.)
Screenshots (if appropriate):
From left to right:
Initial state
Ad tracking disabled
Ad tracking enabled
Types of changes
[x] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
Description
This PR implements the new Edge Identity features for advertising identifier capabilities, and incorporates Android GAID functionality using the Google Mobile Ads Lite SDK.
Update Edge Identity view to add the following UI components:
Update Ad ID With Current GAID
that initiates ad ID update flowFetching device advertising identifier uses
ExecutorService
with a single thread executor and returns values using anAdobeCallback
. This architecture was used since Google's API for getting ad ID is async and requires running on a background thread.To avoid introducing a breaking change (crashing app on launch) to all users of the Android sample app, the implementation and SDK are commented out using special blocks; instructions on enabling the implementation and all prerequisites can be found in the advertising identifier documentation.
It also implements the getUrlVariables feature (thanks to @cacheung and @addb) which returns the identifiers in URL query parameter format for consumption in hybrid mobile applications. The value returned from the API is shown under the button that implements this API. See the documentation for more details on the API.
Related Issue
Please see MOB-16412 for additional details regarding the task.
Motivation and Context
Sample app should be updated to showcase new Edge Identity advertising identifier features; both example of usage and enabling ad ID feature testing capabilities.
How Has This Been Tested?
Tested functionality using Pixel_3a_API_32_arm64-v8a, using the button
Update Ad ID With Current GAID
to:MobileCore.setAdvertisingIdentifier
Screenshots (if appropriate):
From left to right:
Types of changes
Checklist: