Skip to content

Android: App not focused on push notification press if backgrounded and custom url is handled #76

Closed
@jehartzog

Description

@jehartzog

Reproduction

  1. Using Android app, use this lib and add a custom urlHandler which processes the url and returns true
  2. Open the Android device, and then hit home button to place app in background (but still running)
  3. Using Iterable Web UI, send a test push from a template with a Push open action of Open URL
  4. On Android device, press the push

Expected

  1. App will process the push url, and come into focus

Actual

  1. App will process push url fully in background, but not come into focus

Environment:

  1. @iterable/react-native-sdk 1.0.12
  2. react-native 0.63.1
  3. Android OS 10

Suspected cause

Looking at this code, it seems the Android SDK is designed to not focus the app if the event is handled. This may be fine for an Android SDK, but this RN SDK doesn't have a way to bring the app into focus if it reports the url is handled.

Current workaround

For Android only, we return false in our urlHandler, basically disabling our custom url handler, and we make sure to use urls to double as valid deep links. This works for now, but is a somewhat limited solution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions