Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not initialize SDK in direct boot mode #682

Merged
merged 6 commits into from
Jun 19, 2024

Conversation

yangyansong-adbe
Copy link
Contributor

@yangyansong-adbe yangyansong-adbe commented Jun 18, 2024

Features

  • Added logic to prevent the SDK from initializing in Android direct boot mode to avoid app crashes.
  • Updated the test app to allow running in Android direct boot mode.

Manual testing (test app)

  • After rebooting the device, it is running in direct boot mode before unlocking the screen.
  • SDK is not initialized and extensions are not registered.
  • After the device is unlocked, the EventHub singleton is initialized. However, the API calls are dropped since extensions are not registered correctly.

Device is locked:
Screenshot 2024-06-18 at 11 04 18 AM
Device is unlocked:
Screenshot 2024-06-18 at 11 05 33 AM
Calling public APIs will cause the MobileCore.dispatch() method to be triggered, which will subsequently initiate the EventHub singleton.

AdobeExperienceSDK      com...marketing.mobile.core.testapp  D  MobileCore/ExtensionContainer[com.adobe.module.eventhub(3.0.2)] - Extension registered
AdobeExperienceSDK      com...marketing.mobile.core.testapp  V  MobileCore/Extension[com.adobe.module.eventhub(3.0.2)] - Extension registered successfully.
AdobeExperienceSDK      com...marketing.mobile.core.testapp  D  MobileCore/EventHub - Dispatching Event #1 - ({
                                                                    class: Event,
                                                                    name: Configuration Update,
                                                                    uniqueIdentifier: aed9001e-4974-4dfa-92cb-30f3ffbec878,
                                                                    source: com.adobe.eventSource.requestContent,
                                                                    type: com.adobe.eventType.configuration,
                                                                    responseId: null,
                                                                    parentId: null,
                                                                    timestamp: 1718726746531,
                                                                    data: {
                                                                    "config.update": {
                                                                        "global.privacy": "optedout"
                                                                    }
                                                                },
                                                                    mask: null,
                                                                })
AdobeExperienceSDK      com...marketing.mobile.core.testapp  V  MobileCore/EventHub - Extension class com.adobe.marketing.mobile.internal.eventhub.EventHubPlaceholderExtension registered successfully

@yangyansong-adbe yangyansong-adbe marked this pull request as ready for review June 18, 2024 16:59
@yangyansong-adbe yangyansong-adbe merged commit 90638b4 into adobe:dev Jun 19, 2024
5 checks passed
@yangyansong-adbe yangyansong-adbe deleted the direct_boot branch June 19, 2024 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants