app/src/play/java/dev/equwal/assistkey/bundle/Bundled.kt (2145 bytes)
1 package dev.equwal.assistkey.bundle 2 3 import android.app.Activity 4 import android.content.Intent 5 import android.net.Uri 6 7 /** 8 * The Google Play build carries no apps of other makers and cannot install 9 * any: Google Play allows that only for an app whose main purpose it is. It 10 * names the same apps and opens the page of the maker. 11 */ 12 object Bundled { 13 14 const val SUPPORTED = false 15 16 class Item( 17 /** The screen that lists the app: HOME, VOICE, UPDATE or HACKS. */ 18 val group: String, 19 val title: String, 20 val hint: String, 21 val pkg: String, 22 val version: String, 23 val licence: String, 24 val source: String 25 ) 26 27 const val HOME = "home" 28 const val VOICE = "voice" 29 const val UPDATE = "update" 30 const val HACKS = "hacks" 31 32 val items = listOf( 33 Item( 34 HOME, "inkOS", "Text home screen for e-ink", "app.inkos", "v0.6", "GPL-3.0", 35 "https://github.com/gezimos/inkOS" 36 ), 37 Item( 38 HOME, "ThinkLauncher", "Minimal home screen for e-ink", "org.matiasdesu.thinklauncherv2", "v3.0", "GPL-3.0", 39 "https://github.com/MatiasDesuu/ThinkLauncher" 40 ), 41 Item( 42 HOME, "Ink Recents", "Recent apps, drawn for e-ink", "dev.equwal.inkrecents", "0.1.1", "GPL-3.0", 43 "https://github.com/equwal/ink-recents" 44 ), 45 Item( 46 VOICE, "Whisper", "Speech to text on the device", "org.woheller69.whisper", "3.7", "MIT", 47 "https://f-droid.org/packages/org.woheller69.whisper/" 48 ), 49 Item( 50 HACKS, "Ink Dim", "Tap an icon for the lowest light", "dev.equwal.inkdim", "0.1.0", "GPL-3.0", 51 "https://github.com/equwal/ink-dim" 52 ), 53 Item( 54 UPDATE, "Ink Update", "Finds new versions and tells you", "dev.equwal.inkupdate", "0.1.0", "GPL-3.0", 55 "https://github.com/equwal/ink-update" 56 ) 57 ) 58 59 /** Opens the page where the maker offers the app. */ 60 fun install(a: Activity, item: Item) { 61 runCatching { a.startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(item.source))) } 62 } 63 }