BranchMetrics / android-branch-deep-linking-attribution

The Branch Android SDK for deep linking and attribution. Branch helps mobile apps grow with deep links / deeplinks that power paid acquisition and re-engagement campaigns, referral programs, content sharing, deep linked emails, smart banners, custom user onboarding, and more.
https://docs.branch.io/pages/apps/android/
MIT License
399 stars 156 forks source link

New method Branch.getInstance().share() not calling callback funcitions #1175

Closed RodrigoSMarques closed 4 months ago

RodrigoSMarques commented 6 months ago

Describe the bug

The new method Branch.getInstance().share() is not calling the callback function Branch.BranchNativeLinkShareListener (onLinkShareResponse and onChannelSelected)

The showShareSheet method (which was deprecated) it worked correctly.

Steps to reproduce

  1. Implement the code for the Branch.getInstance().share() function and include the Branch.BranchNativeLinkShareListener callback functions
  2. call Branch.getInstance().share()
  3. Callback functions not call

Expected behavior

Call Branch.BranchNativeLinkShareListener functions after sharing.

SDK Version

5.10.0 / 5.10.1

Make and Model

Samsung S20 SE / Samsung J5 Prime / Nexus 5 (Emulator)

OS

13 / 8.1 / 14

Additional Information/Context

No response

RodrigoSMarques commented 6 months ago

Analyzing PR #1156 , I identified that it is necessary to include SharingBroadcastReceiver in AndroidManifest.xml.

<receiver android:name="io.branch.receivers.SharingBroadcastReceiver" android:exported="true">
           <intent-filter>
               <action android:name="EXTRA_CHOSEN_COMPONENT" />
           </intent-filter>
       </receiver>

These instructions are not in the documentation.

gdeluna-branch commented 6 months ago

@NidhiDixit09 Can you add this step to our docs?

RodrigoSMarques commented 4 months ago

documentation has been updated