Skip to content

Commit 6fe03a8

Browse files
authored
Change name of function to match Swift analytics. (#134)
1 parent 1bd4e99 commit 6fe03a8

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

android/src/main/java/com/segment/analytics/kotlin/android/AndroidAnalytics.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ private fun Analytics.startup() {
8080
* @param referrer: The string representing the app or url that caused the deep link to be activated.
8181
* @param intent: The intent received by the Activity's onNewIntent() function.
8282
*/
83-
fun Analytics.trackDeepLinkOpen(referrer: String?, intent: Intent?) {
83+
fun Analytics.openUrl(referrer: String?, intent: Intent?) {
8484
DeepLinkUtils(this).trackDeepLinkFrom(referrer, intent)
8585
}
8686

samples/kotlin-android-app/src/main/java/com/segment/analytics/next/MainActivity.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import androidx.appcompat.app.AppCompatActivity
77
import androidx.fragment.app.Fragment
88
import androidx.fragment.app.FragmentManager
99
import androidx.fragment.app.FragmentTransaction
10-
import com.segment.analytics.kotlin.android.trackDeepLinkOpen
10+
import com.segment.analytics.kotlin.android.openUrl
1111
import com.segment.analytics.kotlin.core.Analytics
1212
import com.segment.analytics.kotlin.core.EventType
1313
import com.segment.analytics.kotlin.core.platform.plugins.logger.log
@@ -65,6 +65,6 @@ class MainActivity : AppCompatActivity() {
6565
// The Analytics SDK automatically identifies when you app is started from a deep link
6666
// if the Activity is created, but not if it is re-used. Therefore we have to add this
6767
// code to manually capture the Deep Link info.
68-
analytics.trackDeepLinkOpen("deep-link", intent)
68+
analytics.openUrl("deep-link", intent)
6969
}
7070
}

0 commit comments

Comments
 (0)