-
Notifications
You must be signed in to change notification settings - Fork 32
Feature/add full deep link support to kotlin sample #133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/add full deep link support to kotlin sample #133
Conversation
Codecov ReportBase: 78.32% // Head: 78.32% // No change to project coverage 👍
Additional details and impacted files@@ Coverage Diff @@
## main #133 +/- ##
=========================================
Coverage 78.32% 78.32%
Complexity 477 477
=========================================
Files 71 71
Lines 5914 5914
Branches 736 736
=========================================
Hits 4632 4632
Misses 708 708
Partials 574 574 Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
// if the Activity is created, but not if it is re-used. Therefore we have to add this | ||
// code to manually capture the Deep Link info. | ||
|
||
Analytics.addDeepLinkOpen(analytics, "deep-link", intent) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
out of curiosity, why do we choose to add an extend function for Analytics.Companion
instead for Analytics
? if we extend Analytics
, we can do something like
analytics.addDeepLinkOpen("deep-link", intent)
it seems cleaner 😄
also, would trackDeepLinkOpen
be a better name? feels more consistent than the track
calls
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great Questions!
Why add the function on Analytics
(static) instead analytics
:
So this was a conscious choice because in looking at code in MainActivity
it had both types of calls:
Analytics.debugLogsEnabled = true
And
analytics.flush()
I decided to go with static function because I thought it made sense, but it's not a hard decision to change. I will update it!
Regarding the name of the function: I like your name better. Consider it changed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…the rest of the functions.
Add full support for deep links in Kotlin Analytics.
This adds a new top-level API
trackDeepLinkOpen()
function to the Analytics functions that people will use to manually track the app opening from a deep link.