flutter_branch_sdk icon indicating copy to clipboard operation
flutter_branch_sdk copied to clipboard

get ANDROID_ID before Privacy Agreement dialog show

Open shingohu opened this issue 2 years ago • 7 comments

Describe the bug The plugin will get ANDROID_ID before Privacy Agreement dialog show,and will be reject by app store like huawei ,xiaomi

To Reproduce at io.branch.referral.SystemObserver$UniqueId.(SystemObserver.java:558) E/PrivacyMethodHookProvider(22105): at io.branch.referral.SystemObserver.getUniqueID(SystemObserver.java:70) E/PrivacyMethodHookProvider(22105): at io.branch.referral.DeviceInfo.getHardwareID(DeviceInfo.java:282) E/PrivacyMethodHookProvider(22105): at io.branch.referral.DeviceInfo.updateRequestWithV1Params(DeviceInfo.java:50) E/PrivacyMethodHookProvider(22105): at io.branch.referral.ServerRequest.setPost(ServerRequest.java:198) E/PrivacyMethodHookProvider(22105): at io.branch.referral.ServerRequestInitSession.setPost(ServerRequestInitSession.java:48) E/PrivacyMethodHookProvider(22105): at io.branch.referral.ServerRequestRegisterOpen.(ServerRequestRegisterOpen.java:30) E/PrivacyMethodHookProvider(22105): at io.branch.referral.Branch.getInstallOrOpenRequest(Branch.java:1959) E/PrivacyMethodHookProvider(22105): at io.branch.referral.Branch$InitSessionBuilder.init(Branch.java:3129) E/PrivacyMethodHookProvider(22105): at br.com.rsmarques.flutter_branch_sdk.FlutterBranchSdkPlugin.onActivityStarted(FlutterBranchSdkPlugin.java:180) E/PrivacyMethodHookProvider(22105): at android.app.Application.dispatchActivityStarted(Application.java:413) E/PrivacyMethodHookProvider(22105): at android.app.Activity.dispatchActivityStarted(Activity.java:1293) E/PrivacyMethodHookProvider(22105): at android.app.Activity.onStart(Activity.java:1790) E/PrivacyMethodHookProvider(22105): at io.flutter.embedding.android.FlutterActivity.onStart(FlutterActivity.java:589)

Expected behavior not get ANDROID_ID before init

Smartphone (please complete the following information):

  • Flutter: version 2.10.5
  • Package version: 5.1.1
  • Device: All Android

shingohu avatar Sep 05 '22 02:09 shingohu

could you explain to me about this consent screen?

I don't understand what screen this is.

RodrigoSMarques avatar Sep 06 '22 16:09 RodrigoSMarques

could you explain to me about this consent screen?

I don't understand what screen this is.

The privacy agreement dialog means that after entering the app for the first time, the user needs to be informed of what user related information the app has obtained, and can enter the app only after the user agrees. China's app stores require that user information, such as Android, IMEI, advertising ID and other important information, cannot be obtained before the privacy agreement dialog show

31662517671_ pic

shingohu avatar Sep 07 '22 02:09 shingohu

See those instructions here

Maybe you should disable tracking at app start and enable it again only after consent.

More information here

RodrigoSMarques avatar Sep 09 '22 04:09 RodrigoSMarques

See those instructions here

Maybe you should disable tracking at app start and enable it again only after consent.

More information here

This is useless. It can't prevent getting ANDROID_ID The plugin will get ANDROID_ID on onActivityStarted this is the call stack:

at io.branch.referral.SystemObserver$UniqueId.(SystemObserver.java:558)
E/PrivacyMethodHookProvider(22105): at io.branch.referral.SystemObserver.getUniqueID(SystemObserver.java:70)
E/PrivacyMethodHookProvider(22105): at io.branch.referral.DeviceInfo.getHardwareID(DeviceInfo.java:282)
E/PrivacyMethodHookProvider(22105): at io.branch.referral.DeviceInfo.updateRequestWithV1Params(DeviceInfo.java:50)
E/PrivacyMethodHookProvider(22105): at io.branch.referral.ServerRequest.setPost(ServerRequest.java:198)
E/PrivacyMethodHookProvider(22105): at io.branch.referral.ServerRequestInitSession.setPost(ServerRequestInitSession.java:48)
E/PrivacyMethodHookProvider(22105): at io.branch.referral.ServerRequestRegisterOpen.(ServerRequestRegisterOpen.java:30)
E/PrivacyMethodHookProvider(22105): at io.branch.referral.Branch.getInstallOrOpenRequest(Branch.java:1959)
E/PrivacyMethodHookProvider(22105): at io.branch.referral.Branch$InitSessionBuilder.init(Branch.java:3129)
E/PrivacyMethodHookProvider(22105): at br.com.rsmarques.flutter_branch_sdk.FlutterBranchSdkPlugin.onActivityStarted(FlutterBranchSdkPlugin.java:180)
E/PrivacyMethodHookProvider(22105): at android.app.Application.dispatchActivityStarted(Application.java:413)
E/PrivacyMethodHookProvider(22105): at android.app.Activity.dispatchActivityStarted(Activity.java:1293)
E/PrivacyMethodHookProvider(22105): at android.app.Activity.onStart(Activity.java:1790)
E/PrivacyMethodHookProvider(22105): at io.flutter.embedding.android.FlutterActivity.onStart(FlutterActivity.java:589)

shingohu avatar Sep 09 '22 06:09 shingohu

@shingohu

I contacted the Branch team and were asked to open a support ticket with them reporting your case.

https://help.branch.io/using-branch/page/submit-a-ticket

RodrigoSMarques avatar Sep 09 '22 14:09 RodrigoSMarques

@shingohu

I contacted the Branch team and were asked to open a support ticket with them reporting your case.

https://help.branch.io/using-branch/page/submit-a-ticket

Thanks

but Is it possible to provide an API for delay initialization

this is the api for branch sdk https://help.branch.io/developers-hub/docs/android-advanced-features#delay-branch-initialization

shingohu avatar Sep 13 '22 02:09 shingohu

@shingohu I contacted the Branch team and were asked to open a support ticket with them reporting your case. https://help.branch.io/using-branch/page/submit-a-ticket

Thanks

but Is it possible to provide an API for delay initialization

this is the api for branch sdk https://help.branch.io/developers-hub/docs/android-advanced-features#delay-branch-initialization

I will evaluate. I have to do some tests

RodrigoSMarques avatar Sep 14 '22 01:09 RodrigoSMarques

Hi @shingohu . Still interested in this feature?

RodrigoSMarques avatar Oct 02 '23 17:10 RodrigoSMarques

@shingohu may i know what is your workaround for this?

ahkela21 avatar Nov 08 '23 15:11 ahkela21