For this you need two devices. Let’s call them Sender and Receiver. If you have your app installed
already, please delete it from both devices. Note that the events will not trigger if you use the
same device for both Sender and Receiver.
iOS
Sender |
Receiver |
Follow the Quickstart guide and build the app to this device. |
|
Run the app and share a link to Receiver. |
Open the link and press “Play now” to simulate that you’re going to download the
app.
|
|
Add `Megacool.Instance.ResetIdentity()` before `Megcool.Instance.Start()`.
This will reset the device identity, so it acts as a new device
every time the app starts. Remember to remove this after you’re done testing.
|
|
Build and run the app. Now this device will receive the
`MegacoolReceivedShareOpenedEvent` event with `megacoolEvent.IsFirstSession == true`
and generate a new install.
|
Press the home button and re-open the app to instantly receive the
`MegacoolSentShareOpenedEvent` event, like shown in the
Quickstart guide.
|
|
Android
Sender |
Receiver |
Follow the Quickstart guide and build the app to this device. |
|
Run the app and share a link to Receiver. |
|
|
Add `Megacool.Instance.ResetIdentity()` before `Megcool.Instance.Start()`.
This will reset the device identity, so it acts as a new device
every time the app starts. Remember to remove this after you’re done testing.
|
|
Connect this device to your computer and run the following in the terminal, to
simulate a new Google Play install:
`adb shell am broadcast -a "com.android.vending.INSTALL_REFERRER" --es referrer '?_m=REFERRAL_CODE' ""`.
Replace `REFERRAL_CODE` with the `_m` parameter value from your shared link.
|
|
Build and run the app. Now this device will receive the
`MegacoolReceivedShareOpenedEvent` event with `megacoolEvent.IsFirstSession == true`
and generate a new install.
|
Press the home button and re-open the app to instantly receive the
`MegacoolSentShareOpenedEvent` event, like shown in the
Quickstart guide.
|
|