Android
이 페이지는 아직 귀하의 언어로 번역되지 않았습니다. 현재 작업 중이므로 곧 다시 확인해 주십시오.
The Kotlin Android SDK lets you send events to Amplitude.
Configure the SDK
Configure batching behavior
To support high-performance environments, the SDK sends events in batches. The SDK queues every event that the track method logs in memory, then flushes events in batches in the background. To customize batch behavior, set flushQueueSize and flushIntervalMillis. By default, serverUrl is https://api2.amplitude.com/2/httpapi. To send large batches of data at a time, set useBatch to true. Setting useBatch to true directs setServerUrl to the batch event upload API at https://api2.amplitude.com/batch. Both regular mode and batch mode use the same event upload threshold and flush time intervals.
import com.amplitude.android.Amplitude
val amplitude = Amplitude(
Configuration(
apiKey = AMPLITUDE_API_KEY,
context = applicationContext,
flushIntervalMillis = 50000,
flushQueueSize = 20,
)
)
이 내용이 도움이 되었나요?