mirror of
https://github.com/Aviortheking/Neo-Store.git
synced 2025-04-26 12:52:12 +00:00
27 lines
918 B
Kotlin
27 lines
918 B
Kotlin
package com.looker.droidify
|
|
|
|
import android.content.Intent
|
|
import com.looker.droidify.screen.ScreenActivity
|
|
|
|
class MainActivity : ScreenActivity() {
|
|
companion object {
|
|
const val ACTION_UPDATES = "${BuildConfig.APPLICATION_ID}.intent.action.UPDATES"
|
|
const val ACTION_INSTALL = "${BuildConfig.APPLICATION_ID}.intent.action.INSTALL"
|
|
const val EXTRA_CACHE_FILE_NAME =
|
|
"${BuildConfig.APPLICATION_ID}.intent.extra.CACHE_FILE_NAME"
|
|
}
|
|
|
|
override fun handleIntent(intent: Intent?) {
|
|
when (intent?.action) {
|
|
ACTION_UPDATES -> handleSpecialIntent(SpecialIntent.Updates)
|
|
ACTION_INSTALL -> handleSpecialIntent(
|
|
SpecialIntent.Install(
|
|
intent.packageName,
|
|
intent.getStringExtra(EXTRA_CACHE_FILE_NAME)
|
|
)
|
|
)
|
|
else -> super.handleIntent(intent)
|
|
}
|
|
}
|
|
}
|