Skip to content

Commit

Permalink
Change name of function to match Swift analytics. (#134)
Browse files Browse the repository at this point in the history
  • Loading branch information
didiergarcia authored Feb 27, 2023
1 parent 1bd4e99 commit 6fe03a8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ private fun Analytics.startup() {
* @param referrer: The string representing the app or url that caused the deep link to be activated.
* @param intent: The intent received by the Activity's onNewIntent() function.
*/
fun Analytics.trackDeepLinkOpen(referrer: String?, intent: Intent?) {
fun Analytics.openUrl(referrer: String?, intent: Intent?) {
DeepLinkUtils(this).trackDeepLinkFrom(referrer, intent)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import androidx.appcompat.app.AppCompatActivity
import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentManager
import androidx.fragment.app.FragmentTransaction
import com.segment.analytics.kotlin.android.trackDeepLinkOpen
import com.segment.analytics.kotlin.android.openUrl
import com.segment.analytics.kotlin.core.Analytics
import com.segment.analytics.kotlin.core.EventType
import com.segment.analytics.kotlin.core.platform.plugins.logger.log
Expand Down Expand Up @@ -65,6 +65,6 @@ class MainActivity : AppCompatActivity() {
// The Analytics SDK automatically identifies when you app is started from a deep link
// 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.trackDeepLinkOpen("deep-link", intent)
analytics.openUrl("deep-link", intent)
}
}

0 comments on commit 6fe03a8

Please sign in to comment.