Skip to content

Commit

Permalink
Revert "feat: offline support"
Browse files Browse the repository at this point in the history
  • Loading branch information
Mercy811 committed Dec 30, 2023
1 parent 7d97bb0 commit 316e3a2
Show file tree
Hide file tree
Showing 4 changed files with 857 additions and 920 deletions.
17 changes: 3 additions & 14 deletions android/src/main/java/com/amplitude/android/Amplitude.kt
Original file line number Diff line number Diff line change
Expand Up @@ -52,18 +52,14 @@ open class Amplitude(

override fun createIdentityConfiguration(): IdentityConfiguration {
val configuration = configuration as Configuration
val storageDirectory =
configuration.context.getDir(
"${FileStorage.STORAGE_PREFIX}-${configuration.instanceName}",
Context.MODE_PRIVATE,
)
val storageDirectory = configuration.context.getDir("${FileStorage.STORAGE_PREFIX}-${configuration.instanceName}", Context.MODE_PRIVATE)

return IdentityConfiguration(
instanceName = configuration.instanceName,
apiKey = configuration.apiKey,
identityStorageProvider = configuration.identityStorageProvider,
storageDirectory = storageDirectory,
logger = configuration.loggerProvider.getLogger(this),
logger = configuration.loggerProvider.getLogger(this)
)
}

Expand Down Expand Up @@ -147,7 +143,6 @@ open class Amplitude(
* The event type for start session events.
*/
const val START_SESSION_EVENT = "session_start"

/**
* The event type for end session events.
*/
Expand All @@ -157,7 +152,6 @@ open class Amplitude(
* The event type for dummy enter foreground events.
*/
internal const val DUMMY_ENTER_FOREGROUND_EVENT = "dummy_enter_foreground"

/**
* The event type for dummy exit foreground events.
*/
Expand All @@ -172,7 +166,6 @@ open class Amplitude(
networkChangeHandler.onNetworkUnavailable()
}
}

/**
* constructor function to build amplitude in dsl format with config options
* Usage: Amplitude("123", context) {
Expand All @@ -186,11 +179,7 @@ open class Amplitude(
* @param configs Configuration
* @return Amplitude Android Instance
*/
fun Amplitude(
apiKey: String,
context: Context,
configs: Configuration.() -> Unit,
): com.amplitude.android.Amplitude {
fun Amplitude(apiKey: String, context: Context, configs: Configuration.() -> Unit): com.amplitude.android.Amplitude {
val config = Configuration(apiKey, context)
configs.invoke(config)
return com.amplitude.android.Amplitude(config)
Expand Down
Loading

0 comments on commit 316e3a2

Please sign in to comment.