Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.
This repository was archived by the owner on May 20, 2025. It is now read-only.

Using ANDROID_ID violates google families policy #2575

@biomancer

Description

@biomancer

Hi!
Our app's audience includes kids and the app cannot send any unique identifiers according to Google Play Families Policy.

react-native-code-push on the other hand uses ANDROID_ID in it's code

mClientUniqueId = Settings.Secure.getString(reactContext.getContentResolver(), Settings.Secure.ANDROID_ID);
and that triggers Google's static code analysis warning looking like that:

SPLIT_BUNDLE [VERSION_CODE]: Policy Declaration - Data Safety Section: Device Or Other IDs Data Type - Device Or Other IDs (some common examples may include Advertising ID, Android ID, IMEI, BSSID, MAC address)

which leads to automatic build rejection.

Why is ANDROID_ID used? Is it possible to replace with something else or make it optional?
What would happen if we replace it with static string like "no-android-id" via patch-package — would it break any functionality?

Environment

  • react-native-code-push version: ours is 7.0.4, but that code is still the same in master, it will trigger the same warning.
  • react-native version: 0.68.5
  • iOS/Android/Windows version: N/A
  • Does this reproduce on a debug build or release build? Release build
  • Does this reproduce on a simulator, or only on a physical device? N/A

Related issues are #2327 and #2297, but they are closed while the issue is still active.

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