├── .editorconfig ├── .github ├── FUNDING.yml ├── dependabot.yml └── workflows │ ├── main.yml │ └── security.yml ├── .gitignore ├── .gitignore-custom ├── .idea ├── codeStyles │ ├── Project.xml │ └── codeStyleConfig.xml ├── compiler.xml ├── copyright │ ├── Sascha_Apache_2_0.xml │ └── profiles_settings.xml ├── deploymentTargetSelector.xml ├── encodings.xml ├── jarRepositories.xml ├── modules.xml ├── runConfigurations.xml └── vcs.xml ├── LICENSE.txt ├── README.md ├── app ├── build.gradle.kts ├── proguard-rules.pro └── src │ └── main │ ├── AndroidManifest.xml │ ├── java │ └── com │ │ └── example │ │ └── versioninfo │ │ └── MainActivity.java │ └── res │ ├── layout │ └── activity_main.xml │ ├── mipmap-hdpi │ └── ic_launcher.png │ ├── mipmap-mdpi │ └── ic_launcher.png │ ├── mipmap-xhdpi │ └── ic_launcher.png │ ├── mipmap-xxhdpi │ └── ic_launcher.png │ ├── mipmap-xxxhdpi │ └── ic_launcher.png │ ├── values-w820dp │ └── dimens.xml │ └── values │ ├── colors.xml │ ├── dimens.xml │ ├── strings.xml │ └── styles.xml ├── build.gradle.kts ├── doc └── img │ ├── versioninfo-sample-dialog.png │ └── versioninfo-sample-fragment.png ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── scripts ├── inc.functions.sh └── release ├── settings.gradle.kts └── versioninfo ├── build.gradle.kts ├── proguard-rules.pro └── src └── main ├── java └── saschpe │ └── android │ └── versioninfo │ ├── VersionInfoUtils.java │ └── widget │ └── VersionInfoDialogFragment.java └── res ├── layout └── fragment_version_info.xml ├── values-w820dp └── dimens.xml └── values ├── dimens.xml └── strings.xml /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig is awesome: https://EditorConfig.org 2 | 3 | root = true 4 | 5 | [*] 6 | charset = utf-8 7 | end_of_line = lf 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | # noinspection EditorConfigKeyCorrectness 12 | [*.{kt,kts}] 13 | ktlint_code_style = intellij_idea 14 | ktlint_function_naming_ignore_when_annotated_with = Composable 15 | ktlint_function_signature_rule_force_multiline_when_parameter_count_greater_or_equal_than = unset 16 | ktlint_standard_no-wildcard-imports = disabled 17 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: saschpe 2 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: gradle 4 | directory: "/" 5 | schedule: 6 | interval: weekly 7 | - package-ecosystem: github-actions 8 | directory: ".github/" 9 | schedule: 10 | interval: weekly 11 | -------------------------------------------------------------------------------- /.github/workflows/main.yml: -------------------------------------------------------------------------------- 1 | name: Main CI 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | paths-ignore: 8 | - .gitignore 9 | - LICENSE 10 | - README.md 11 | pull_request: 12 | branches: 13 | - main 14 | 15 | concurrency: 16 | group: ${{ github.workflow }}-${{ github.ref }} 17 | cancel-in-progress: true 18 | 19 | jobs: 20 | spotless: 21 | runs-on: ubuntu-latest 22 | steps: 23 | - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 24 | - name: Set up JDK 22 25 | uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 # v4.7.0 26 | with: 27 | distribution: temurin 28 | java-version: 22 29 | - name: Run Spotless 30 | run: ./gradlew spotlessCheck 31 | 32 | build: 33 | runs-on: macos-14 34 | steps: 35 | - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 36 | - name: Set up JDK 22 37 | uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 # v4.7.0 38 | with: 39 | distribution: temurin 40 | java-version: 22 41 | - name: Setup Android problem matchers 42 | uses: jonasb/android-problem-matchers-action@v1 43 | - name: Build with Gradle 44 | run: ./gradlew build 45 | -------------------------------------------------------------------------------- /.github/workflows/security.yml: -------------------------------------------------------------------------------- 1 | name: Security 2 | on: [push] 3 | 4 | concurrency: 5 | group: ${{ github.workflow }}-${{ github.ref }} 6 | cancel-in-progress: true 7 | 8 | jobs: 9 | mobfs: 10 | permissions: 11 | contents: read # for actions/checkout to fetch code 12 | security-events: write # for github/codeql-action/upload-sarif to upload SARIF results 13 | runs-on: ubuntu-latest 14 | steps: 15 | - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 16 | - name: Setup Python 3.10 17 | uses: actions/setup-python@v4 18 | with: 19 | python-version: '3.11' 20 | - name: Run mobsfscan 21 | uses: MobSF/mobsfscan@0.3.4 22 | with: 23 | args: . --sarif --output results.sarif || true 24 | - name: Upload mobsfscan report 25 | uses: github/codeql-action/upload-sarif@v2 26 | with: 27 | sarif_file: results.sarif 28 | 29 | gradle-validate: 30 | runs-on: ubuntu-latest 31 | steps: 32 | - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 33 | - uses: gradle/actions/wrapper-validation@v4 34 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Custom ignore rules, update with: 2 | # { cat .gitignore-custom ; gibo dump Android Gradle JetBrains Kotlin Vim } > .gitignore 3 | 4 | .idea/libraries-with-intellij-classes.xml 5 | .idea/misc.xml 6 | **/pom.xml 7 | *.jks 8 | buildSrc/src/main/kotlin/Secrets.kt 9 | 10 | ### https://raw.github.com/github/gitignore/b2ccc4644b997fa2e86da5ae37f3b053c39f3d7b/Android.gitignore 11 | 12 | # Built application files 13 | *.apk 14 | *.aar 15 | *.ap_ 16 | *.aab 17 | 18 | # Files for the ART/Dalvik VM 19 | *.dex 20 | 21 | # Java class files 22 | *.class 23 | 24 | # Generated files 25 | bin/ 26 | gen/ 27 | out/ 28 | # Uncomment the following line in case you need and you don't have the release build type files in your app 29 | # release/ 30 | 31 | # Gradle files 32 | .gradle/ 33 | build/ 34 | 35 | # Local configuration file (sdk path, etc) 36 | local.properties 37 | 38 | # Proguard folder generated by Eclipse 39 | proguard/ 40 | 41 | # Log Files 42 | *.log 43 | 44 | # Android Studio Navigation editor temp files 45 | .navigation/ 46 | 47 | # Android Studio captures folder 48 | captures/ 49 | 50 | # IntelliJ 51 | *.iml 52 | .idea/workspace.xml 53 | .idea/tasks.xml 54 | .idea/gradle.xml 55 | .idea/assetWizardSettings.xml 56 | .idea/dictionaries 57 | .idea/libraries 58 | # Android Studio 3 in .gitignore file. 59 | .idea/caches 60 | .idea/modules.xml 61 | # Comment next line if keeping position of elements in Navigation Editor is relevant for you 62 | .idea/navEditor.xml 63 | 64 | # Keystore files 65 | # Uncomment the following lines if you do not want to check your keystore files in. 66 | #*.jks 67 | #*.keystore 68 | 69 | # External native build folder generated in Android Studio 2.2 and later 70 | .externalNativeBuild 71 | .cxx/ 72 | 73 | # Google Services (e.g. APIs or Firebase) 74 | # google-services.json 75 | 76 | # Freeline 77 | freeline.py 78 | freeline/ 79 | freeline_project_description.json 80 | 81 | # fastlane 82 | fastlane/report.xml 83 | fastlane/Preview.html 84 | fastlane/screenshots 85 | fastlane/test_output 86 | fastlane/readme.md 87 | 88 | # Version control 89 | vcs.xml 90 | 91 | # lint 92 | lint/intermediates/ 93 | lint/generated/ 94 | lint/outputs/ 95 | lint/tmp/ 96 | # lint/reports/ 97 | 98 | # Android Profiling 99 | *.hprof 100 | 101 | 102 | ### https://raw.github.com/github/gitignore/b2ccc4644b997fa2e86da5ae37f3b053c39f3d7b/Gradle.gitignore 103 | 104 | .gradle 105 | **/build/ 106 | !src/**/build/ 107 | 108 | # Ignore Gradle GUI config 109 | gradle-app.setting 110 | 111 | # Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored) 112 | !gradle-wrapper.jar 113 | 114 | # Cache of project 115 | .gradletasknamecache 116 | 117 | # # Work around https://youtrack.jetbrains.com/issue/IDEA-116898 118 | # gradle/wrapper/gradle-wrapper.properties 119 | 120 | 121 | ### https://raw.github.com/github/gitignore/b2ccc4644b997fa2e86da5ae37f3b053c39f3d7b/Global/JetBrains.gitignore 122 | 123 | # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider 124 | # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 125 | 126 | # User-specific stuff 127 | .idea/**/workspace.xml 128 | .idea/**/tasks.xml 129 | .idea/**/usage.statistics.xml 130 | .idea/**/dictionaries 131 | .idea/**/shelf 132 | 133 | # AWS User-specific 134 | .idea/**/aws.xml 135 | 136 | # Generated files 137 | .idea/**/contentModel.xml 138 | 139 | # Sensitive or high-churn files 140 | .idea/**/dataSources/ 141 | .idea/**/dataSources.ids 142 | .idea/**/dataSources.local.xml 143 | .idea/**/sqlDataSources.xml 144 | .idea/**/dynamic.xml 145 | .idea/**/uiDesigner.xml 146 | .idea/**/dbnavigator.xml 147 | 148 | # Gradle 149 | .idea/**/gradle.xml 150 | .idea/**/libraries 151 | 152 | # Gradle and Maven with auto-import 153 | # When using Gradle or Maven with auto-import, you should exclude module files, 154 | # since they will be recreated, and may cause churn. Uncomment if using 155 | # auto-import. 156 | # .idea/artifacts 157 | # .idea/compiler.xml 158 | # .idea/jarRepositories.xml 159 | # .idea/modules.xml 160 | # .idea/*.iml 161 | # .idea/modules 162 | # *.iml 163 | # *.ipr 164 | 165 | # CMake 166 | cmake-build-*/ 167 | 168 | # Mongo Explorer plugin 169 | .idea/**/mongoSettings.xml 170 | 171 | # File-based project format 172 | *.iws 173 | 174 | # IntelliJ 175 | out/ 176 | 177 | # mpeltonen/sbt-idea plugin 178 | .idea_modules/ 179 | 180 | # JIRA plugin 181 | atlassian-ide-plugin.xml 182 | 183 | # Cursive Clojure plugin 184 | .idea/replstate.xml 185 | 186 | # Crashlytics plugin (for Android Studio and IntelliJ) 187 | com_crashlytics_export_strings.xml 188 | crashlytics.properties 189 | crashlytics-build.properties 190 | fabric.properties 191 | 192 | # Editor-based Rest Client 193 | .idea/httpRequests 194 | 195 | # Android studio 3.1+ serialized cache file 196 | .idea/caches/build_file_checksums.ser 197 | 198 | 199 | ### https://raw.github.com/github/gitignore/b2ccc4644b997fa2e86da5ae37f3b053c39f3d7b/Kotlin.gitignore 200 | 201 | # Compiled class file 202 | *.class 203 | 204 | # Log file 205 | *.log 206 | 207 | # BlueJ files 208 | *.ctxt 209 | 210 | # Mobile Tools for Java (J2ME) 211 | .mtj.tmp/ 212 | 213 | # Package Files # 214 | *.jar 215 | *.war 216 | *.nar 217 | *.ear 218 | *.zip 219 | *.tar.gz 220 | *.rar 221 | 222 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml 223 | hs_err_pid* 224 | 225 | 226 | ### https://raw.github.com/github/gitignore/b2ccc4644b997fa2e86da5ae37f3b053c39f3d7b/Global/Vim.gitignore 227 | 228 | # Swap 229 | [._]*.s[a-v][a-z] 230 | !*.svg # comment out if you don't need vector files 231 | [._]*.sw[a-p] 232 | [._]s[a-rt-v][a-z] 233 | [._]ss[a-gi-z] 234 | [._]sw[a-p] 235 | 236 | # Session 237 | Session.vim 238 | Sessionx.vim 239 | 240 | # Temporary 241 | .netrwhist 242 | *~ 243 | # Auto-generated tag files 244 | tags 245 | # Persistent undo 246 | [._]*.un~ 247 | 248 | 249 | -------------------------------------------------------------------------------- /.gitignore-custom: -------------------------------------------------------------------------------- 1 | # Custom ignore rules, update with: 2 | # { cat .gitignore-custom ; gibo dump Android Gradle JetBrains Kotlin Vim } > .gitignore 3 | 4 | .idea/libraries-with-intellij-classes.xml 5 | .idea/misc.xml 6 | **/pom.xml 7 | *.jks 8 | buildSrc/src/main/kotlin/Secrets.kt 9 | 10 | -------------------------------------------------------------------------------- /.idea/codeStyles/Project.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 30 | 31 | 33 | 34 | 56 | 57 | 58 | 60 | 61 | 65 | 66 | 178 | 179 | 181 | 182 | -------------------------------------------------------------------------------- /.idea/codeStyles/codeStyleConfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | -------------------------------------------------------------------------------- /.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /.idea/copyright/Sascha_Apache_2_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | -------------------------------------------------------------------------------- /.idea/copyright/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /.idea/deploymentTargetSelector.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/jarRepositories.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 9 | 10 | 14 | 15 | 19 | 20 | 24 | 25 | 29 | 30 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | 2 | Apache License 3 | Version 2.0, January 2004 4 | http://www.apache.org/licenses/ 5 | 6 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 7 | 8 | 1. Definitions. 9 | 10 | "License" shall mean the terms and conditions for use, reproduction, 11 | and distribution as defined by Sections 1 through 9 of this document. 12 | 13 | "Licensor" shall mean the copyright owner or entity authorized by 14 | the copyright owner that is granting the License. 15 | 16 | "Legal Entity" shall mean the union of the acting entity and all 17 | other entities that control, are controlled by, or are under common 18 | control with that entity. For the purposes of this definition, 19 | "control" means (i) the power, direct or indirect, to cause the 20 | direction or management of such entity, whether by contract or 21 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 22 | outstanding shares, or (iii) beneficial ownership of such entity. 23 | 24 | "You" (or "Your") shall mean an individual or Legal Entity 25 | exercising permissions granted by this License. 26 | 27 | "Source" form shall mean the preferred form for making modifications, 28 | including but not limited to software source code, documentation 29 | source, and configuration files. 30 | 31 | "Object" form shall mean any form resulting from mechanical 32 | transformation or translation of a Source form, including but 33 | not limited to compiled object code, generated documentation, 34 | and conversions to other media types. 35 | 36 | "Work" shall mean the work of authorship, whether in Source or 37 | Object form, made available under the License, as indicated by a 38 | copyright notice that is included in or attached to the work 39 | (an example is provided in the Appendix below). 40 | 41 | "Derivative Works" shall mean any work, whether in Source or Object 42 | form, that is based on (or derived from) the Work and for which the 43 | editorial revisions, annotations, elaborations, or other modifications 44 | represent, as a whole, an original work of authorship. For the purposes 45 | of this License, Derivative Works shall not include works that remain 46 | separable from, or merely link (or bind by name) to the interfaces of, 47 | the Work and Derivative Works thereof. 48 | 49 | "Contribution" shall mean any work of authorship, including 50 | the original version of the Work and any modifications or additions 51 | to that Work or Derivative Works thereof, that is intentionally 52 | submitted to Licensor for inclusion in the Work by the copyright owner 53 | or by an individual or Legal Entity authorized to submit on behalf of 54 | the copyright owner. For the purposes of this definition, "submitted" 55 | means any form of electronic, verbal, or written communication sent 56 | to the Licensor or its representatives, including but not limited to 57 | communication on electronic mailing lists, source code control systems, 58 | and issue tracking systems that are managed by, or on behalf of, the 59 | Licensor for the purpose of discussing and improving the Work, but 60 | excluding communication that is conspicuously marked or otherwise 61 | designated in writing by the copyright owner as "Not a Contribution." 62 | 63 | "Contributor" shall mean Licensor and any individual or Legal Entity 64 | on behalf of whom a Contribution has been received by Licensor and 65 | subsequently incorporated within the Work. 66 | 67 | 2. Grant of Copyright License. Subject to the terms and conditions of 68 | this License, each Contributor hereby grants to You a perpetual, 69 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 70 | copyright license to reproduce, prepare Derivative Works of, 71 | publicly display, publicly perform, sublicense, and distribute the 72 | Work and such Derivative Works in Source or Object form. 73 | 74 | 3. Grant of Patent License. Subject to the terms and conditions of 75 | this License, each Contributor hereby grants to You a perpetual, 76 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 77 | (except as stated in this section) patent license to make, have made, 78 | use, offer to sell, sell, import, and otherwise transfer the Work, 79 | where such license applies only to those patent claims licensable 80 | by such Contributor that are necessarily infringed by their 81 | Contribution(s) alone or by combination of their Contribution(s) 82 | with the Work to which such Contribution(s) was submitted. If You 83 | institute patent litigation against any entity (including a 84 | cross-claim or counterclaim in a lawsuit) alleging that the Work 85 | or a Contribution incorporated within the Work constitutes direct 86 | or contributory patent infringement, then any patent licenses 87 | granted to You under this License for that Work shall terminate 88 | as of the date such litigation is filed. 89 | 90 | 4. Redistribution. You may reproduce and distribute copies of the 91 | Work or Derivative Works thereof in any medium, with or without 92 | modifications, and in Source or Object form, provided that You 93 | meet the following conditions: 94 | 95 | (a) You must give any other recipients of the Work or 96 | Derivative Works a copy of this License; and 97 | 98 | (b) You must cause any modified files to carry prominent notices 99 | stating that You changed the files; and 100 | 101 | (c) You must retain, in the Source form of any Derivative Works 102 | that You distribute, all copyright, patent, trademark, and 103 | attribution notices from the Source form of the Work, 104 | excluding those notices that do not pertain to any part of 105 | the Derivative Works; and 106 | 107 | (d) If the Work includes a "NOTICE" text file as part of its 108 | distribution, then any Derivative Works that You distribute must 109 | include a readable copy of the attribution notices contained 110 | within such NOTICE file, excluding those notices that do not 111 | pertain to any part of the Derivative Works, in at least one 112 | of the following places: within a NOTICE text file distributed 113 | as part of the Derivative Works; within the Source form or 114 | documentation, if provided along with the Derivative Works; or, 115 | within a display generated by the Derivative Works, if and 116 | wherever such third-party notices normally appear. The contents 117 | of the NOTICE file are for informational purposes only and 118 | do not modify the License. You may add Your own attribution 119 | notices within Derivative Works that You distribute, alongside 120 | or as an addendum to the NOTICE text from the Work, provided 121 | that such additional attribution notices cannot be construed 122 | as modifying the License. 123 | 124 | You may add Your own copyright statement to Your modifications and 125 | may provide additional or different license terms and conditions 126 | for use, reproduction, or distribution of Your modifications, or 127 | for any such Derivative Works as a whole, provided Your use, 128 | reproduction, and distribution of the Work otherwise complies with 129 | the conditions stated in this License. 130 | 131 | 5. Submission of Contributions. Unless You explicitly state otherwise, 132 | any Contribution intentionally submitted for inclusion in the Work 133 | by You to the Licensor shall be under the terms and conditions of 134 | this License, without any additional terms or conditions. 135 | Notwithstanding the above, nothing herein shall supersede or modify 136 | the terms of any separate license agreement you may have executed 137 | with Licensor regarding such Contributions. 138 | 139 | 6. Trademarks. This License does not grant permission to use the trade 140 | names, trademarks, service marks, or product names of the Licensor, 141 | except as required for reasonable and customary use in describing the 142 | origin of the Work and reproducing the content of the NOTICE file. 143 | 144 | 7. Disclaimer of Warranty. Unless required by applicable law or 145 | agreed to in writing, Licensor provides the Work (and each 146 | Contributor provides its Contributions) on an "AS IS" BASIS, 147 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 148 | implied, including, without limitation, any warranties or conditions 149 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 150 | PARTICULAR PURPOSE. You are solely responsible for determining the 151 | appropriateness of using or redistributing the Work and assume any 152 | risks associated with Your exercise of permissions under this License. 153 | 154 | 8. Limitation of Liability. In no event and under no legal theory, 155 | whether in tort (including negligence), contract, or otherwise, 156 | unless required by applicable law (such as deliberate and grossly 157 | negligent acts) or agreed to in writing, shall any Contributor be 158 | liable to You for damages, including any direct, indirect, special, 159 | incidental, or consequential damages of any character arising as a 160 | result of this License or out of the use or inability to use the 161 | Work (including but not limited to damages for loss of goodwill, 162 | work stoppage, computer failure or malfunction, or any and all 163 | other commercial damages or losses), even if such Contributor 164 | has been advised of the possibility of such damages. 165 | 166 | 9. Accepting Warranty or Additional Liability. While redistributing 167 | the Work or Derivative Works thereof, You may choose to offer, 168 | and charge a fee for, acceptance of support, warranty, indemnity, 169 | or other liability obligations and/or rights consistent with this 170 | License. However, in accepting such obligations, You may act only 171 | on Your own behalf and on Your sole responsibility, not on behalf 172 | of any other Contributor, and only if You agree to indemnify, 173 | defend, and hold each Contributor harmless for any liability 174 | incurred by, or claims asserted against, such Contributor by reason 175 | of your accepting any such warranty or additional liability. 176 | 177 | END OF TERMS AND CONDITIONS 178 | 179 | APPENDIX: How to apply the Apache License to your work. 180 | 181 | To apply the Apache License to your work, attach the following 182 | boilerplate notice, with the fields enclosed by brackets "[]" 183 | replaced with your own identifying information. (Don't include 184 | the brackets!) The text should be enclosed in the appropriate 185 | comment syntax for the file format. We also recommend that a 186 | file or class name and description of purpose be included on the 187 | same "printed page" as the copyright notice for easier 188 | identification within third-party archives. 189 | 190 | Copyright [yyyy] [name of copyright owner] 191 | 192 | Licensed under the Apache License, Version 2.0 (the "License"); 193 | you may not use this file except in compliance with the License. 194 | You may obtain a copy of the License at 195 | 196 | http://www.apache.org/licenses/LICENSE-2.0 197 | 198 | Unless required by applicable law or agreed to in writing, software 199 | distributed under the License is distributed on an "AS IS" BASIS, 200 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 201 | See the License for the specific language governing permissions and 202 | limitations under the License. 203 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Android VersionInfo 2 | ![Maven Central](https://img.shields.io/maven-central/v/de.peilicke.sascha/android-versioninfo) 3 | [![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-VersionInfo-brightgreen.svg?style=flat)](http://android-arsenal.com/details/1/3832) 4 | [![License](http://img.shields.io/:license-apache-blue.svg)](http://www.apache.org/licenses/LICENSE-2.0.html) 5 | [![Build Status](https://travis-ci.org/saschpe/android-versioninfo.svg?branch=master)](https://travis-ci.org/saschpe/android-versioninfo) 6 | 7 | 8 | All about activities have a version info widget somewhere. This library provides one that can be 9 | used as a dialog or fragment. It honors default styling rules, Material-style: 10 | 11 | ![Dialog](doc/img/versioninfo-sample-dialog.png) 12 | ![Fragment](doc/img/versioninfo-sample-fragment.png) 13 | 14 | 15 | # Usage 16 | Allows to either display version information in a dialog: 17 | 18 | ```java 19 | VersionInfoDialogFragment.newInstance( 20 | getString(R.string.app_name), 21 | BuildConfig.VERSION_NAME, 22 | "Sascha Peilicke", 23 | R.mipmap.ic_launcher) 24 | .show(getSupportFragmentManager(), "version_info"); 25 | ``` 26 | 27 | Or a (support) Fragment: 28 | 29 | ```java 30 | DialogFragment fragment = VersionInfoDialogFragment.newInstance( 31 | getString(R.string.app_name), 32 | BuildConfig.VERSION_NAME, 33 | "Sascha Peilicke", 34 | R.mipmap.ic_launcher); 35 | getSupportFragmentManager() 36 | .beginTransaction() 37 | .replace(R.id.container, fragment) 38 | .commit(); 39 | ``` 40 | 41 | Check out the sample app in `app/` to see it in action. 42 | 43 | 44 | # Download 45 | Artifacts are published to [Maven Central][maven-central]: 46 | ```kotlin 47 | repositories { 48 | mavenCentral() 49 | } 50 | 51 | dependencies { 52 | implementation("de.peilicke.sascha:android-versioninfo:2.3.1") 53 | } 54 | ``` 55 | 56 | # In use by 57 | * [Alpha+ Player - Unofficial player for Soma FM](https://play.google.com/store/apps/details?id=saschpe.alphaplus) 58 | * [GameOn - Get games on sale](https://play.google.com/store/apps/details?id=saschpe.gameon) 59 | * [Birthday Calendar](https://play.google.com/store/apps/details?id=saschpe.contactevents) - Open Source on [Github](https://github.com/saschpe/BirthdayCalendar/) 60 | * [Planning Poker - SCRUM Cards](https://play.google.com/store/apps/details?id=saschpe.poker) - Open Source on [Github](https://github.com/saschpe/PlanningPoker) 61 | 62 | # License 63 | 64 | Copyright 2016 Sascha Peilicke 65 | 66 | Licensed under the Apache License, Version 2.0 (the "License"); 67 | you may not use this file except in compliance with the License. 68 | You may obtain a copy of the License at 69 | 70 | http://www.apache.org/licenses/LICENSE-2.0 71 | 72 | Unless required by applicable law or agreed to in writing, software 73 | distributed under the License is distributed on an "AS IS" BASIS, 74 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 75 | See the License for the specific language governing permissions and 76 | limitations under the License. 77 | 78 | [maven-central]: https://search.maven.org/artifact/de.peilicke.sascha/android-customtabs 79 | -------------------------------------------------------------------------------- /app/build.gradle.kts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 Sascha Peilicke 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | plugins { 18 | id("com.android.application") 19 | kotlin("android") 20 | } 21 | 22 | dependencies { 23 | implementation(project(":versioninfo")) 24 | implementation("androidx.appcompat:appcompat:1.7.0") 25 | } 26 | 27 | android { 28 | namespace = "com.example.versioninfo" 29 | 30 | defaultConfig { 31 | applicationId = "com.example.versioninfo" 32 | compileSdk = 34 33 | minSdk = 21 34 | targetSdk = 34 35 | versionCode = 210020301 36 | versionName = "2.3.1" 37 | } 38 | 39 | buildFeatures { 40 | buildConfig = true 41 | } 42 | 43 | buildTypes { 44 | debug { 45 | applicationIdSuffix = ".debug" // Allow installation in parallel to release builds 46 | } 47 | release { 48 | isMinifyEnabled = true 49 | isShrinkResources = true 50 | proguardFiles(getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro") 51 | signingConfig = signingConfigs.getByName("debug") 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saschpe/android-versioninfo/11feba8be3a48ad9b3326ae5540a784832a0695b/app/proguard-rules.pro -------------------------------------------------------------------------------- /app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 16 | 18 | 19 | 26 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /app/src/main/java/com/example/versioninfo/MainActivity.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 Sascha Peilicke 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.example.versioninfo; 18 | 19 | import android.os.Bundle; 20 | import android.view.View; 21 | import androidx.appcompat.app.AppCompatActivity; 22 | import androidx.fragment.app.DialogFragment; 23 | import saschpe.android.versioninfo.widget.VersionInfoDialogFragment; 24 | 25 | public final class MainActivity extends AppCompatActivity { 26 | @Override 27 | protected void onCreate(Bundle savedInstanceState) { 28 | super.onCreate(savedInstanceState); 29 | setContentView(R.layout.activity_main); 30 | } 31 | 32 | public void showVersionInfoDialog(final View view) { 33 | VersionInfoDialogFragment 34 | .newInstance( 35 | getString(R.string.app_name), 36 | BuildConfig.VERSION_NAME, 37 | "Sascha Peilicke", 38 | R.mipmap.ic_launcher) 39 | .show(getSupportFragmentManager(), "version_info"); 40 | } 41 | 42 | public void showVersionInfoFragment(final View view) { 43 | DialogFragment fragment = VersionInfoDialogFragment.newInstance( 44 | getString(R.string.app_name), 45 | BuildConfig.VERSION_NAME, 46 | "Sascha Peilicke", 47 | R.mipmap.ic_launcher); 48 | 49 | getSupportFragmentManager() 50 | .beginTransaction() 51 | .replace(R.id.container, fragment) 52 | .commit(); 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 26 | 27 | 33 | 34 |