-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add app initializer. set foreground notification (WIP).
The app works as it used to, but the expected notification does not show up yet.
- Loading branch information
1 parent
eb8e6b0
commit e24c52a
Showing
9 changed files
with
66 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
app/src/main/java/org/androidaudioplugin/aapapkinstaller/ApkInstallerInitializer.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package org.androidaudioplugin.aapapkinstaller | ||
|
||
import android.content.Context | ||
import androidx.startup.Initializer | ||
import dev.atsushieno.cipackageinstaller.AppModelFactory | ||
import dev.atsushieno.cipackageinstaller.ApplicationModel | ||
|
||
class ApkInstallerInitializer : Initializer<Any> { | ||
override fun create(context: Context) { | ||
AppModelFactory.create = { | ||
object : ApplicationModel() { | ||
// They are specific to my app. | ||
// Replace them with your own if you want to reuse cipackageinstaller package as a library. | ||
override val LOG_TAG = "AAPAPKInstaller" | ||
override val installerSessionReferrer = | ||
"/~https://github.com/atsushieno/android-ci-package-installer" | ||
} | ||
} | ||
} | ||
|
||
override fun dependencies(): MutableList<Class<out Initializer<*>>> = mutableListOf() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters