Lint Report: 79 warnings
Issue Types

Overview

Correctness
2warning ScopedStorage: Affected by scoped storage
1warning OldTargetApi: Target SDK attribute is not targeting latest version
2warning SimpleDateFormat: Implied locale in date format
1warning UnusedAttribute: Attribute unused on older versions
1warning AppBundleLocaleChanges: App Bundle handling of runtime locale changes
1warning RedundantLabel: Redundant label on activity
2warning AndroidGradlePluginVersion: Obsolete Android Gradle Plugin Version
64warning GradleDependency: Obsolete Gradle Dependency
1warning LockedOrientationActivity: Incompatible screenOrientation value
4warning SimilarGradleDependency: Multiple Versions Gradle Dependency
1warning DiscouragedApi: Using discouraged APIs
Security
3warning TrustAllX509TrustManager: Insecure TLS/SSL trust manager
Included Additional Checks (67)
Disabled Checks (42)

Affected by scoped storage

../../src/main/AndroidManifest.xml:43: READ_EXTERNAL_STORAGE is deprecated (and is not granted) when targeting Android 13+. If you need to query or interact with MediaStore or media files on the shared storage, you should instead use one or more new storage permissions: READ_MEDIA_IMAGES, READ_MEDIA_VIDEO or READ_MEDIA_AUDIO.
  40     <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
  41     <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
  42 
  43     <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />                     
  44     <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
  45     <uses-permission
  46     android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS"
../../src/main/AndroidManifest.xml:44: WRITE_EXTERNAL_STORAGE is deprecated (and is not granted) when targeting Android 13+. If you need to write to shared storage, use the MediaStore.createWriteRequest intent.
  41     <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
  42 
  43     <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
  44     <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />                    
  45     <uses-permission
  46     android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS"
  47   />
ScopedStorage Correctness Warning Priority 8/10

Target SDK attribute is not targeting latest version

../../build.gradle.kts:18: Not targeting the latest versions of Android; compatibility modes apply. Consider testing and updating this version. Consult the android.os.Build.VERSION_CODES javadoc for details.
  15     defaultConfig {
  16         applicationId = "com.greybox.projectmesh"
  17         minSdk = 26
  18         targetSdk = 34                                                                              
  19         versionCode = 1
  20         versionName = "1.0"
OldTargetApi Correctness Warning Priority 6/10

Implied locale in date format

../../src/main/java/com/greybox/projectmesh/messaging/ui/screens/ChatScreen.kt:536: To get local formatting use getDateInstance(), getDateTimeInstance(), or getTimeInstance(), or use new SimpleDateFormat(String template, Locale locale) with for example Locale.US for ASCII dates.
 533           horizontalArrangement = Arrangement.End
 534       ) {
 535           Text(
 536               text = SimpleDateFormat("HH:mm").format(Date(chatMessage.dateReceived)),        
 537               style = MaterialTheme.typography.labelSmall
 538           )
 539       }
../../src/main/java/com/greybox/projectmesh/messaging/utils/MessageUtils.kt:17: To get local formatting use getDateInstance(), getDateTimeInstance(), or getTimeInstance(), or use new SimpleDateFormat(String template, Locale locale) with for example Locale.US for ASCII dates.
 14      */
 15     fun formatTimestamp(timestamp: Long): String {
 16         //Adding timestamp formatting logic
 17         return java.text.SimpleDateFormat("HH:mm").format(timestamp)                                
 18     }
 19 
 20     /**
SimpleDateFormat Correctness Warning Priority 6/10

Attribute unused on older versions

../../src/main/AndroidManifest.xml:38: Attribute usesPermissionFlags is only used in API level 31 and higher (current min is 26)
  35     -->
  36     <uses-permission
  37     android:name="android.permission.NEARBY_WIFI_DEVICES"
  38     android:usesPermissionFlags="neverForLocation"                                                  
  39   />
  40     <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
  41     <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
UnusedAttribute Correctness Warning Priority 6/10

App Bundle handling of runtime locale changes

../../src/main/java/com/greybox/projectmesh/MainActivity.kt:226: Found dynamic locale changes, but did not find corresponding Play Core library calls for downloading languages and splitting by language is not disabled in the bundle configuration
 223     private fun updateLocale(languageCode: String): Locale {
 224         val locale = Locale(languageCode)
 225         val config = resources.configuration
 226         config.setLocale(locale)                                                                    
 227         @Suppress("DEPRECATION")
 228         resources.updateConfiguration(config, resources.displayMetrics)
 229         return locale
AppBundleLocaleChanges Correctness Warning Priority 5/10

Redundant label on activity

../../src/main/AndroidManifest.xml:82: Redundant label can be removed
  79         <activity
  80       android:name=".MainActivity"
  81       android:exported="true"
  82       android:label="@string/app_name"                                                              
  83       android:theme="@style/Theme.ProjectMesh.Launcher"
  84     >
  85             <intent-filter>
RedundantLabel Correctness Warning Priority 5/10

Obsolete Android Gradle Plugin Version

../../../gradle/libs.versions.toml:7: A newer version of com.android.application than 8.5.1 is available: 9.1.1. (There is also a newer version of 8.5.�� available, if upgrading to 9.1.1 is difficult: 8.5.2)
   4 acraHTTP = "5.11.0"
   5 activity = "1.9.0"
   6 activityCompose = "1.7.0"
   7 agp = "8.5.1"                                                                                       
   8 appcompat = "1.6.1"
   9 coilCompose = "1.4.0"
  10 composeBom = "2023.08.00"
../../../gradle/libs.versions.toml:7: A newer version of com.android.application than 8.5.1 is available: 9.1.1. (There is also a newer version of 8.5.�� available, if upgrading to 9.1.1 is difficult: 8.5.2)
   4 acraHTTP = "5.11.0"
   5 activity = "1.9.0"
   6 activityCompose = "1.7.0"
   7 agp = "8.5.1"                                                                                       
   8 appcompat = "1.6.1"
   9 coilCompose = "1.4.0"
  10 composeBom = "2023.08.00"
AndroidGradlePluginVersion Correctness Warning Priority 4/10

Obsolete Gradle Dependency

../../../gradle/libs.versions.toml:5: A newer version of androidx.activity:activity than 1.9.0 is available: 1.13.0
   2 accompanistPermissions = "0.31.1-alpha"
   3 acraDialog = "5.11.0"
   4 acraHTTP = "5.11.0"
   5 activity = "1.9.0"                                                                                  
   6 activityCompose = "1.7.0"
   7 agp = "8.5.1"
   8 appcompat = "1.6.1"
../../../gradle/libs.versions.toml:5: A newer version of androidx.activity:activity than 1.9.0 is available: 1.13.0
   2 accompanistPermissions = "0.31.1-alpha"
   3 acraDialog = "5.11.0"
   4 acraHTTP = "5.11.0"
   5 activity = "1.9.0"                                                                                  
   6 activityCompose = "1.7.0"
   7 agp = "8.5.1"
   8 appcompat = "1.6.1"
../../../gradle/libs.versions.toml:6: A newer version of androidx.activity:activity-compose than 1.7.0 is available: 1.13.0
   3 acraDialog = "5.11.0"
   4 acraHTTP = "5.11.0"
   5 activity = "1.9.0"
   6 activityCompose = "1.7.0"                                                                           
   7 agp = "8.5.1"
   8 appcompat = "1.6.1"
   9 coilCompose = "1.4.0"
../../../gradle/libs.versions.toml:6: A newer version of androidx.activity:activity-compose than 1.7.0 is available: 1.13.0
   3 acraDialog = "5.11.0"
   4 acraHTTP = "5.11.0"
   5 activity = "1.9.0"
   6 activityCompose = "1.7.0"                                                                           
   7 agp = "8.5.1"
   8 appcompat = "1.6.1"
   9 coilCompose = "1.4.0"
../../../gradle/libs.versions.toml:8: A newer version of androidx.appcompat:appcompat than 1.6.1 is available: 1.7.1
   5 activity = "1.9.0"
   6 activityCompose = "1.7.0"
   7 agp = "8.5.1"
   8 appcompat = "1.6.1"                                                                                 
   9 coilCompose = "1.4.0"
  10 composeBom = "2023.08.00"
  11 composePreviewRenderer = "0.0.1-alpha01"
GradleDependency Correctness Warning Priority 4/10

Incompatible screenOrientation value

../../src/main/AndroidManifest.xml:105: Expecting android:screenOrientation="unspecified" or "fullSensor" for this activity so the user can use the application in any orientation and provide a great experience on Chrome OS devices
 102         </provider>
 103         <activity
 104       android:name="com.journeyapps.barcodescanner.CaptureActivity"
 105       android:screenOrientation="portrait"                                                          
 106       android:stateNotNeeded="true"
 107       tools:replace="android:screenOrientation"
 108     />
LockedOrientationActivity Correctness Warning Priority 4/10

Multiple Versions Gradle Dependency

../../../gradle/libs.versions.toml:58: There are multiple dependencies androidx.datastore:datastore-core but with different version
  55 androidx-compose-bom = { group = "androidx.compose", name = "compose-bom", version.ref = "composeBom" }
  56 androidx-constraintlayout = { group = "androidx.constraintlayout", name = "constraintlayout", version.ref = "constraintlayout" }
  57 androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" }
  58 androidx-datastore-core = { group = "androidx.datastore", name = "datastore-core", version.ref = "datastoreCore" }
  59 androidx-datastore-core-v111 = { module = "androidx.datastore:datastore-core", version.ref = "datastoreCoreVersion" }
  60 androidx-datastore-preferences = { module = "androidx.datastore:datastore-preferences", version.ref = "datastorePreferences" }
  61 androidx-datastore-preferences-core = { group = "androidx.datastore", name = "datastore-preferences-core", version.ref = "datastorePreferencesCore" }
../../../gradle/libs.versions.toml:58: There are multiple dependencies androidx.datastore:datastore-core but with different version
  55 androidx-compose-bom = { group = "androidx.compose", name = "compose-bom", version.ref = "composeBom" }
  56 androidx-constraintlayout = { group = "androidx.constraintlayout", name = "constraintlayout", version.ref = "constraintlayout" }
  57 androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" }
  58 androidx-datastore-core = { group = "androidx.datastore", name = "datastore-core", version.ref = "datastoreCore" }
  59 androidx-datastore-core-v111 = { module = "androidx.datastore:datastore-core", version.ref = "datastoreCoreVersion" }
  60 androidx-datastore-preferences = { module = "androidx.datastore:datastore-preferences", version.ref = "datastorePreferences" }
  61 androidx-datastore-preferences-core = { group = "androidx.datastore", name = "datastore-preferences-core", version.ref = "datastorePreferencesCore" }
../../../gradle/libs.versions.toml:59: There are multiple dependencies androidx.datastore:datastore-core but with different version
  56 androidx-constraintlayout = { group = "androidx.constraintlayout", name = "constraintlayout", version.ref = "constraintlayout" }
  57 androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" }
  58 androidx-datastore-core = { group = "androidx.datastore", name = "datastore-core", version.ref = "datastoreCore" }
  59 androidx-datastore-core-v111 = { module = "androidx.datastore:datastore-core", version.ref = "datastoreCoreVersion" }
  60 androidx-datastore-preferences = { module = "androidx.datastore:datastore-preferences", version.ref = "datastorePreferences" }
  61 androidx-datastore-preferences-core = { group = "androidx.datastore", name = "datastore-preferences-core", version.ref = "datastorePreferencesCore" }
  62 androidx-espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espressoCore" }
../../../gradle/libs.versions.toml:59: There are multiple dependencies androidx.datastore:datastore-core but with different version
  56 androidx-constraintlayout = { group = "androidx.constraintlayout", name = "constraintlayout", version.ref = "constraintlayout" }
  57 androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" }
  58 androidx-datastore-core = { group = "androidx.datastore", name = "datastore-core", version.ref = "datastoreCore" }
  59 androidx-datastore-core-v111 = { module = "androidx.datastore:datastore-core", version.ref = "datastoreCoreVersion" }
  60 androidx-datastore-preferences = { module = "androidx.datastore:datastore-preferences", version.ref = "datastorePreferences" }
  61 androidx-datastore-preferences-core = { group = "androidx.datastore", name = "datastore-preferences-core", version.ref = "datastorePreferencesCore" }
  62 androidx-espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espressoCore" }
SimilarGradleDependency Correctness Information Priority 4/10

Using discouraged APIs

../../src/main/AndroidManifest.xml:105: Should not restrict activity to fixed orientation. This may not be suitable for different form factors, causing the app to be letterboxed.
 102         </provider>
 103         <activity
 104       android:name="com.journeyapps.barcodescanner.CaptureActivity"
 105       android:screenOrientation="portrait"                                                          
 106       android:stateNotNeeded="true"
 107       tools:replace="android:screenOrientation"
 108     />
DiscouragedApi Correctness Warning Priority 2/10

Insecure TLS/SSL trust manager

../../../../../../.gradle/caches/modules-2/files-2.1/org.bouncycastle/bcpkix-jdk18on/1.75/5adfef8a71a0933454739264b56283cc73dd2383/bcpkix-jdk18on-1.75.jar: checkServerTrusted is empty, which could cause insecure network traffic due to trusting arbitrary TLS/SSL certificates presented by peers
../../../../../../.gradle/caches/modules-2/files-2.1/com.athaydes.rawhttp/rawhttp-core/2.5.2/cbd0e0de9c307aeb5b1931221e70599c064fa20a/rawhttp-core-2.5.2.jar: checkClientTrusted is empty, which could cause insecure network traffic due to trusting arbitrary TLS/SSL certificates presented by peers
../../../../../../.gradle/caches/modules-2/files-2.1/com.athaydes.rawhttp/rawhttp-core/2.5.2/cbd0e0de9c307aeb5b1931221e70599c064fa20a/rawhttp-core-2.5.2.jar: checkServerTrusted is empty, which could cause insecure network traffic due to trusting arbitrary TLS/SSL certificates presented by peers
TrustAllX509TrustManager Security Warning Priority 6/10

Included Additional Checks

This card lists all the extra checks run by lint, provided from libraries, build configuration and extra flags. This is included to help you verify whether a particular check is included in analysis when configuring builds. (Note that the list does not include the hundreds of built-in checks into lint, only additional ones.)

Disabled Checks

One or more issues were not run by lint, either because the check is not enabled by default, or because it was disabled with a command line flag or via one or more lint.xml configuration files in the project directories.

Suppressing Warnings and Errors

Lint errors can be suppressed in a variety of ways:

1. With a @SuppressLint annotation in the Java code
2. With a tools:ignore attribute in the XML file
3. With a //noinspection comment in the source code
4. With ignore flags specified in the build.gradle file, as explained below
5. With a lint.xml configuration file in the project
6. With a lint.xml configuration file passed to lint via the --config flag
7. With the --ignore flag passed to lint.

To suppress a lint warning with an annotation, add a @SuppressLint("id") annotation on the class, method or variable declaration closest to the warning instance you want to disable. The id can be one or more issue id's, such as "UnusedResources" or {"UnusedResources","UnusedIds"}, or it can be "all" to suppress all lint warnings in the given scope.

To suppress a lint warning with a comment, add a //noinspection id comment on the line before the statement with the error.

To suppress a lint warning in an XML file, add a tools:ignore="id" attribute on the element containing the error, or one of its surrounding elements. You also need to define the namespace for the tools prefix on the root element in your document, next to the xmlns:android declaration:
xmlns:tools="http://schemas.android.com/tools"

To suppress a lint warning in a build.gradle file, add a section like this:
android {
    lintOptions {
        disable 'TypographyFractions','TypographyQuotes'
    }
}

Here we specify a comma separated list of issue id's after the disable command. You can also use warning or error instead of disable to change the severity of issues.

To suppress lint warnings with a configuration XML file, create a file named lint.xml and place it at the root directory of the module in which it applies.

The format of the lint.xml file is something like the following:
<?xml version="1.0" encoding="UTF-8"?>
<lint>
    <!-- Ignore everything in the test source set -->
    <issue id="all">
        <ignore path="\*/test/\*" />
    </issue>

    <!-- Disable this given check in this project -->
    <issue id="IconMissingDensityFolder" severity="ignore" />

    <!-- Ignore the ObsoleteLayoutParam issue in the given files -->
    <issue id="ObsoleteLayoutParam">
        <ignore path="res/layout/activation.xml" />
        <ignore path="res/layout-xlarge/activation.xml" />
        <ignore regexp="(foo|bar)\.java" />
    </issue>

    <!-- Ignore the UselessLeaf issue in the given file -->
    <issue id="UselessLeaf">
        <ignore path="res/layout/main.xml" />
    </issue>

    <!-- Change the severity of hardcoded strings to "error" -->
    <issue id="HardcodedText" severity="error" />
</lint>

To suppress lint checks from the command line, pass the --ignore flag with a comma separated list of ids to be suppressed, such as:
$ lint --ignore UnusedResources,UselessLeaf /my/project/path

For more information, see https://developer.android.com/studio/write/lint.html#config