title: How to set up Firebase Push Notification with Deep Link with Unity3D
body: <p>I am implementing Firebase Cloud Messaging to send Push Notifications to my Unity Project for Android and iOS Devices. I am now Debugging with Android. I receive Push Notifications on my Device but I want to set it up that I can send and receive Deep Links that lead me after clicking the Push Notification to a specific Page on the Application.</p>
  
  <p>I was following the Manual by Google (<a href="https://firebase.google.com/docs/cloud-messaging/unity/client" rel="nofollow noreferrer">https://firebase.google.com/docs/cloud-messaging/unity/client</a>) But I am not sure if I understand it correctly. Configuring a custom entry point they suggest to add a given code in my Activity: </p>
  
  <p><code>
      /**
       * Workaround for when a message is sent containing both a Data     and Notification payload.
       *
       * When the app is in the background, if a message with both a data and notification payload is
       * receieved the data payload is stored on the Intent passed to     onNewIntent. By default, that
       * intent does not get set as the Intent that started the app, so when the app comes back online
       * it doesn't see a new FCM message to respond to. As a workaround, we override onNewIntent so
       * that it sends the intent to the MessageForwardingService which forwards the message to the
       * FirebaseMessagingService which in turn sends the message to the application.
       */
      @Override
      protected void onNewIntent(Intent intent) {
        Intent message = new Intent(this, MessageForwardingService.class);
        message.setAction(MessageForwardingService.ACTION_REMOTE_INTENT);
        message.putExtras(intent);
        message.setData(intent.getData());
        startService(message);
      }</p>
  
  <pre><code>/**
   * Dispose of the mUnityPlayer when restarting the app.
   *
   * This ensures that when the app starts up again it does not s tart with stale data.
   */
  @Override
   protected void onCreate(Bundle savedInstanceState) {
    if (mUnityPlayer != null) {
      mUnityPlayer.quit();
      mUnityPlayer = null;
    }
    super.onCreate(savedInstanceState);
  }
  </code></pre>
  
  <p></code></p>
  
  <p>I get the following questions:
  Is this native Android Code? Or do I have to add it in Unity somewhere? What about iOS?</p>
  
  <p>Reading the section: Handling Messages with Deep Links on Android 
  I added the code, adjusting the domain, to my Android Manifest.</p>
  
  <p>Additionally I don't understand how to send a deepLink from the Firebase Console and process it with Unity. 
  Do I have to set it up as a Key Value Pair? With what Key?
  How Do I process the Key Value Pair / or, if it is not that, How do I process the deepLink in General?</p>