generated from segment-integrations/analytics-kotlin-destination-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from segment-integrations/wenxi/prepare-release…
…-1.0.1 prepare release 1.0.1
- Loading branch information
Showing
5 changed files
with
31 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
...src/main/java/com/segment/analytics/destinations/mydestination/testapp/MainApplication.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package com.segment.analytics.destinations.mydestination.testapp | ||
|
||
import android.app.Application | ||
import com.segment.analytics.kotlin.android.Analytics | ||
import com.segment.analytics.kotlin.core.Analytics | ||
import com.segment.analytics.kotlin.core.manuallyEnableDestination | ||
import com.segment.analytics.kotlin.destinations.adjust.AdjustDestination | ||
|
||
class MainApplication : Application() { | ||
companion object { | ||
lateinit var analytics: Analytics | ||
} | ||
|
||
override fun onCreate() { | ||
super.onCreate() | ||
|
||
analytics = Analytics("<writekey>", applicationContext) { | ||
flushAt = 1 | ||
flushInterval = 10 | ||
} | ||
|
||
Analytics.debugLogsEnabled = true | ||
val adjust = AdjustDestination() | ||
analytics.add(adjust) | ||
} | ||
} |