Skip to content

readme updates #1

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

Merged
merged 5 commits into from
Mar 7, 2022
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 44 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,51 @@
// add badges and stuff here
# Analytics-Kotlin Firebase

# Destination
Add Firebase device mode support to your applications via this plugin for [Analytics-Kotlin](https://github.com/segmentio/analytics-kotlin)

## Getting Started
## Adding the dependency

// TODO
To install the Segment-Firebase integration, simply add this line to your gradle file:

```
implementation 'com.segment.analytics.kotlin.destinations:firebase:1.4.4'
```

Or the following for Kotlin DSL

```
implementation("com.segment.analytics.kotlin.destinations:firebase:1.4.4")
```



## Using the Plugin in your App

Open the file where you setup and configure the Analytics-Kotlin library. Add this plugin to the list of imports.

```
import com.segment.analytics.kotlin.destinations.plugins.FirebaseDestination
```

Just under your Analytics-Kotlin library setup, call `analytics.add(plugin = ...)` to add an instance of the plugin to the Analytics timeline.

```
analytics = Analytics("<YOUR WRITE KEY>", applicationContext) {
this.flushAt = 3
this.trackApplicationLifecycleEvents = true
}
analytics.add(plugin = FirebaseDestination(applicationContext))
```

Your events will now begin to flow to Firebase in device mode.


## Support

Please use Github issues, Pull Requests, or feel free to reach out to our [support team](https://segment.com/help/).

## Integrating with Segment

Interested in integrating your service with us? Check out our [Partners page](https://segment.com/partners/) for more details.

## License
```
Expand Down
10 changes: 5 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ android.enableJetifier=true
kotlin.code.style=official

# Deployment variables
GROUP=com.segment.analytics.kotlin
GROUP=com.segment.analytics.kotlin.destinations

VERSION_CODE=100
VERSION_NAME=1.0.0
VERSION_CODE=144
VERSION_NAME=1.4.4

POM_ARTIFACT_ID=analytics-kotlin-firebase
POM_NAME=analytics-kotlin-firebase
POM_ARTIFACT_ID=firebase
POM_NAME=firebase
POM_DESCRIPTION=Destination for Firebase

POM_URL=https://github.com/segmentio/analytics-kotlin-firebase
Expand Down
5 changes: 3 additions & 2 deletions lib/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,16 @@ android {

defaultConfig {
multiDexEnabled = true
minSdk = 21
minSdk = 16
targetSdk = 31

testInstrumentationRunner = "android.support.test.runner.AndroidJUnitRunner"
consumerProguardFiles("proguard-consumer-rules.pro")
}

buildTypes {
release {
isMinifyEnabled = true
isMinifyEnabled = false
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.segment.analytics.destinations.plugins
package com.segment.analytics.kotlin.destinations.plugins

import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.platform.app.InstrumentationRegistry
Expand All @@ -19,6 +19,6 @@ class ExampleInstrumentedTest {
fun useAppContext() {
// Context of the app under test.
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
assertEquals("com.segment.analytics.destinations.plugins.test", appContext.packageName)
assertEquals("com.segment.analytics.kotlin.destinations.plugins.test", appContext.packageName)
}
}
2 changes: 1 addition & 1 deletion lib/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.segment.analytics.destinations.plugins">
package="com.segment.analytics.kotlin.destinations.plugins">

</manifest>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.segment.analytics.destinations.plugins
package com.segment.analytics.kotlin.destinations.plugins

import android.annotation.SuppressLint
import android.app.Activity
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.segment.analytics.destinations.plugins
package com.segment.analytics.kotlin.destinations.plugins

import android.app.Activity
import android.content.Context
Expand Down