Skip to content

Go to Kotlin SDK. enableForegroundTracking(Application app) -> onEnterForeground (timestamp: Long) #112

@AlbertKobyakov

Description

@AlbertKobyakov

Summary

In the old version we used enableForegroundTracking(application). Kotlin SDK has an onEnterForeground(timestamp: Long) method. This method is not described anywhere, I don't understand what should be passed to the timestamp?

Old version:

Amplitude.getInstance()
         .trackSessionEvents(true)
         .initialize(applicationContext, apiKey)
         .enableForegroundTracking(application)

Kotlin SDK:

Amplitude(
         Configuration(
             apiKey = apiKey,
             context = application.applicationContext
         ).apply {
             trackingSessionEvents = true
         }
     ).apply {
         onEnterForeground(???)
     }

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions