mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-03 16:10:00 +00:00
Merge pull request #7585 from element-hq/rav/app_startup_hook
Implement a hook allowing enterprise modules to perform actions on startup
This commit is contained in:
+20
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
* Copyright (c) 2026 Element Creations Ltd.
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial.
|
||||
* Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
package io.element.android.features.enterprise.api
|
||||
|
||||
import android.app.Activity
|
||||
|
||||
/**
|
||||
* A hook that is called during app startup, from the `MainActivity`.
|
||||
*
|
||||
* Note that the hook is run in the background: it will not block startup of the app.
|
||||
*/
|
||||
fun interface AppStartupHook {
|
||||
/** @param activity The activity which is active while the app starts (i.e. the `MainActivity`). */
|
||||
suspend fun onAppStartup(activity: Activity)
|
||||
}
|
||||
Reference in New Issue
Block a user