adobe / aepsdk-sample-app-android

Sample apps demoing how to use AEP Android SDKs
MIT License
7 stars 23 forks source link

Implementation for Edge Identity ad ID + getUrlVariables features #26

Closed timkimadobe closed 2 years ago

timkimadobe commented 2 years ago

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:

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:

Screenshots (if appropriate):

From left to right:

  1. Initial state
  2. Ad tracking disabled
  3. Ad tracking enabled

    Initial state Ad tracking disabled Ad tracking enabled

Types of changes

Checklist:

timkimadobe commented 2 years ago

Latest updates should address: