Skip to content

In Version 12 -- App freezes on Splash after APK Installation #1

@robertspaculus

Description

@robertspaculus

When I build APK install in version 12 app is stuck in Splash Screen.

class SplashActivity : BaseActivity() CoroutineScope by MainScope() {
var isNotEmptyGoLast = false

override fun onCreate(savedInstanceState: Bundle?) {
    super.onCreate(savedInstanceState)
    requestWindowFeature(Window.FEATURE_NO_TITLE)
    setContentView(R.layout.activity_splash)     
    
    checkDBVersion()
}

fun moveToScreen() {
    if (getPreference().isFirstLaunch) {
        CommonUtils.gotoActivity(this@SplashActivity, WalkThroughActivity::class.java)
    } else if (getPreference().isLoggedin) {
        if(isNotEmptyGoLast){
            gotoActivityLast()
        }else{
            CommonUtils.gotoActivity(this@SplashActivity,HomeActivity::class.java)
        }
    } else {
        CommonUtils.gotoActivity(this@SplashActivity, LoginActivity::class.java)
    }
    this@SplashActivity.finish()
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions