](https://f-droid.org/packages/app.olauncher)
15 | [
](https://play.google.com/store/apps/details?id=app.olauncher)
18 |
19 | To maintain the simplicity of the launcher, a few niche features are available but hidden.
20 |
21 | Please check out the [About](https://tanujnotes.substack.com/p/olauncher-minimal-af-launcher?utm_source=github) page in the Olauncher settings for a complete list of features and FAQs.
22 |
23 | ##
24 |
25 | License: [GNU GPLv3](https://www.gnu.org/licenses/gpl-3.0.en.html)
26 |
27 | @tanujnotes | [X/Twitter](https://twitter.com/tanujnotes) | [Bluesky](https://bsky.app/profile/tanujnotes.bsky.social)
28 |
29 | **[See my other apps](https://play.google.com/store/apps/dev?id=7198807840081074933)**
30 |
31 | ##
32 |
33 | *New: We're working on an open source notes app called Note Safe (previously Note to Self). What's cool about it - it has a chat like interface and end-to-end encryption. [Take a look!](https://github.com/jeerovan/ntsapp)*
34 |
--------------------------------------------------------------------------------
/app/src/main/java/app/olauncher/helper/WallpaperWorker.kt:
--------------------------------------------------------------------------------
1 | package app.olauncher.helper
2 |
3 | import android.content.Context
4 | import androidx.appcompat.app.AppCompatDelegate
5 | import androidx.work.CoroutineWorker
6 | import androidx.work.WorkerParameters
7 | import app.olauncher.data.Constants
8 | import app.olauncher.data.Prefs
9 | import kotlinx.coroutines.coroutineScope
10 |
11 | class WallpaperWorker(appContext: Context, workerParams: WorkerParameters) : CoroutineWorker(appContext, workerParams) {
12 |
13 | private val prefs = Prefs(applicationContext)
14 |
15 | override suspend fun doWork(): Result = coroutineScope {
16 | val success =
17 | if (isOlauncherDefault(applicationContext).not())
18 | true
19 | else if (prefs.dailyWallpaper) {
20 | val wallType = checkWallpaperType()
21 | val wallpaperUrl = getTodaysWallpaper(wallType, prefs.firstOpenTime)
22 | if (prefs.dailyWallpaperUrl == wallpaperUrl)
23 | true
24 | else {
25 | prefs.dailyWallpaperUrl = wallpaperUrl
26 | setWallpaper(applicationContext, wallpaperUrl)
27 | }
28 | } else
29 | true
30 |
31 | if (success)
32 | Result.success()
33 | else
34 | Result.retry()
35 | }
36 |
37 | private fun checkWallpaperType(): String {
38 | return when (prefs.appTheme) {
39 | AppCompatDelegate.MODE_NIGHT_YES -> Constants.WALL_TYPE_DARK
40 | AppCompatDelegate.MODE_NIGHT_NO -> Constants.WALL_TYPE_LIGHT
41 | else -> if (applicationContext.isDarkThemeOn())
42 | Constants.WALL_TYPE_DARK
43 | else
44 | Constants.WALL_TYPE_LIGHT
45 | }
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/app/src/main/java/app/olauncher/helper/usageStats/SimpleUsageStat.kt:
--------------------------------------------------------------------------------
1 | package app.olauncher.helper.usageStats
2 |
3 | import android.app.usage.UsageStats
4 | import android.icu.util.Calendar
5 | import java.util.concurrent.TimeUnit
6 |
7 | /**
8 | * A data class to hold simplified usage statistics.
9 | *
10 | * @property day The day since epoch that this object concerns.
11 | * @property timeUsed The time that the application has been in the foreground in milliseconds on this day.
12 | * @property applicationId The package name of the application that this object concerns.
13 | */
14 | data class SimpleUsageStat(
15 | val day: Long,
16 | val timeUsed: Long,
17 | val applicationId: String
18 | ) {
19 | /**
20 | * Secondary constructor to create a SimpleUsageStat from the system's [UsageStats].
21 | */
22 | constructor(systemUsageStat: UsageStats) : this(
23 | day = getEpochDay(systemUsageStat.lastTimeUsed),
24 | timeUsed = systemUsageStat.totalTimeInForeground,
25 | applicationId = systemUsageStat.packageName
26 | )
27 |
28 | companion object {
29 | /**
30 | * Converts a list of system [UsageStats] to a list of [SimpleUsageStat].
31 | * This function is kept for direct compatibility with the original Java static method.
32 | */
33 | @JvmStatic
34 | fun asSimpleStats(usageStats: ListAre you using your phone, or is your phone using you?
Olauncher is a minimal AF Android launcher with just enough features. By the way, AF stands for AdFree. :D
FEATURES YOU MIGHT LIKE:
To maintain the simplicity of such a minimalist launcher, a few niche features are available but hidden. Please visit the About page in settings for the complete list.
FAQs:
Our About page in settings has rest of the FAQs and several other tips to help you make the best usage of Olauncher. Please check it out.
Accessibility Service: Our Accessibility Service is used exclusively to let you turn off your phone’s screen with a double-tap gesture. It is optional, disabled by default and doesn’t collect or share any data.
P.S. Thank you for checking out the description till the end. Only a few very special people do that. Take care! ❤️
-------------------------------------------------------------------------------- /app/src/main/res/navigation/nav_graph.xml: -------------------------------------------------------------------------------- 1 | 2 |