amplitude / amplitude/AmplitudeSessionReplay-Android

Android SDK integration docs are wrong/outdated

オープン
#7 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
言語のデータがありません
スター
2
フォーク
0
PR マージ指標
30日以内にマージされた PR はありません

説明

I was following the setup docs for session tracking on Android [here](https://amplitude.com/docs/session-replay/session-replay-android-plugin)
This is the suggested code for basic setup of session tracking:
```
import com.amplitude.android.Amplitude
import com.amplitude.android.Configuration
import com.amplitude.android.plugins.SessionReplayPlugin

// Initialize Amplitude Analytics SDK instance
val amplitude = Amplitude(Configuration(
apiKey = API_KEY,
context = applicationContext,
defaultTracking = DefaultTrackingOptions(sessions = true),
))

// Create and Install Session Replay Plugin
// Recording will be handled automatically
val sessionReplayPlugin = SessionReplayPlugin(sampleRate = 1.0)
amplitude.add(sessionReplayPlugin)

// Send replay data to the server
amplitude.flush()
```

However `DefaultTrackingOptions` has been deprecated, the correct way seems to now be

```
val amplitude = Amplitude(
Configuration(
apiKey = apiKey,
context = context,
serverZone = ServerZone.EU,
autocapture = setOf(AutocaptureOption.SESSIONS)
)
)
val sessionReplayPlugin = SessionReplayPlugin(
sampleRate = 1.0
)
amplitude.add(sessionReplayPlugin)
```

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。