Unity No Meta Data passed In Branch Link if app is already Launched

Hello,  I have a weird error.
Unity 5.5.1.p1, Latest Branch SDK and I’m testing on Android. And I’m using universal object.

So here is behavior I’m getting.

  1. App is not running. I click the link, app opens and metadata is recognized.
  2. App is already running, I click the link, app seems to restart instead of just opening and when the app starts metadata is empty.

What could be causing this?

Jump Or Fall — Developer
1 Answer(s)
Answered on February 3, 2017.

could this be related to improperly overriding unity activity in  manifest? https://dev.branch.io/getting-started/sdk-integration-guide/guide/unity/#overriding-onnewintent-for-android

I did not have any





android:name="com.unity3d.player.UnityPlayerActivity"

in my Main Android Manifest so I just added

 

 
  <activity android:name="io.branch.unity.BranchUnityActivity" android:launchMode="singleTask"> 
  </activity>

and ran prefabs manifest update and it created code like this:












  <activity android:name="com.unity3d.player.UnityPlayerNativeActivity" android:label="@string/app_name">






      <meta-data android:name="unityplayer.UnityActivity" android:value="true" />






      <meta-data android:name="unityplayer.ForwardNativeEventsToDalvik" android:value="false" />






      <intent-filter>






        <action android:name="android.intent.action.MAIN" />






        <category android:name="android.intent.category.LAUNCHER" />






      </intent-filter>






    </activity>






    <activity android:name="io.branch.unity.BranchUnityActivity" android:launchMode="singleTask">






      <intent-filter>






        <data android:host="open" android:scheme="myApp" />






        <action android:name="android.intent.action.VIEW" />






        <category android:name="android.intent.category.DEFAULT" />






        <category android:name="android.intent.category.BROWSABLE" />






      </intent-filter>






      <intent-filter android:autoVerify="true">






        <action android:name="android.intent.action.VIEW" />






        <category android:name="android.intent.category.DEFAULT" />






        <category android:name="android.intent.category.BROWSABLE" />






        <data android:scheme="https" android:host="bnc.lt" android:pathPrefix="" />






      </intent-filter>






    </activity>


















Am I doing this right?

 

Jump Or Fall — Developer
Commented on February 9, 2017.

Hi – I am sorry. This thread somehow got missed. Can you please create a ticket for out integrations team here with your account details so they could dive into the issue? Thanks!

Developer