### Run tests for mesh_service_example module Source: https://github.com/meshtastic/meshtastic-android/blob/main/mesh_service_example/README.md Executes the unit tests for the mesh_service_example module using Gradle. This helps verify the functionality of the example service. ```sh ./gradlew :mesh_service_example:test ``` -------------------------------- ### Example Meshtastic Android Logcat Output Source: https://github.com/meshtastic/meshtastic-android/blob/main/debugging-android.md An example of the logcat output that might be captured when running the Meshtastic Android app, showing various debug, warning, and information messages. ```text --------- beginning of main 03-07 17:10:05.669 13452 13452 W ActivityThread: handleWindowVisibility: no activity for token android.os.BinderProxy@fbf5fa0 03-07 17:10:05.927 13452 13452 D com.geeksville.mesh.MainActivity: Checking permissions 03-07 17:10:06.033 13452 13452 W geeksville.mes: Accessing hidden method Landroid/view/View;->computeFitSystemWindows(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z (greylist, reflection, allowed) 03-07 17:10:06.034 13452 13452 W geeksville.mes: Accessing hidden method Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V (greylist, reflection, allowed) 03-07 17:10:06.179 13452 13452 D com.geeksville.mesh.MainActivity: Binding to mesh service! 03-07 17:10:06.267 13452 13484 I geeksville.mes: Background concurrent copying GC freed 18374(1149KB) AllocSpace objects, 5(164KB) LOS objects, 49% free, 2384KB/4769KB, paused 329us total 124.902ms 03-07 17:10:06.267 13452 13484 W geeksville.mes: Reducing the number of considered missed Gc histogram windows from 1692 to 100 03-07 17:10:06.288 13452 24599 I FA : Tag Manager is not found and thus will not be used 03-07 17:10:06.500 13452 24593 I Adreno : QUALCOMM build : 4a00b69, I4e7e888065 03-07 17:10:06.500 13452 24593 I Adreno : Build Date : 04/09/19 03-07 17:10:06.500 13452 24593 I Adreno : OpenGL ES Shader Compiler Version: EV031.26.06.00 03-07 17:10:06.500 13452 24593 I Adreno : Local Branch : mybranche95a5ea3-cf05-f19a-a0e7-5cb90179c3d8 03-07 17:10:06.500 13452 24593 I Adreno : Remote Branch : quic/gfx-adreno.lnx.1.0 03-07 17:10:06.500 13452 24593 I Adreno : Remote Branch : NONE 03-07 17:10:06.500 13452 24593 I Adreno : Reconstruct Branch : NOTHING 03-07 17:10:06.500 13452 24593 I Adreno : Build Config : S P 8.0.6 AArch64 03-07 17:10:06.508 13452 24593 I Adreno : PFP: 0x016ee183, ME: 0x00000000 03-07 17:10:06.546 13452 24593 W Gralloc3: mapper 3.x is not supported 03-07 17:10:06.548 13452 24593 E libc : Access denied finding property "vendor.gralloc.disable_ahardware_buffer" 03-07 17:10:06.544 13452 13452 W RenderThread: type=1400 audit(0.0:7134): avc: denied { read } for name="u:object_r:vendor_default_prop:s0" dev="tmpfs" ino=24620 scontext=u:r:untrusted_app:s0:c157,c257,c512,c768 tcontext=u:object_r:vendor_default_prop:s0 tclass=file permissive=0 03-07 17:10:06.607 13452 13452 I com.geeksville.mesh.service.MeshService: in isConnected=false 03-07 17:10:06.608 13452 13452 D com.geeksville.mesh.MainActivity: connchange false ``` -------------------------------- ### Build mesh_service_example module Source: https://github.com/meshtastic/meshtastic-android/blob/main/mesh_service_example/README.md Builds the mesh_service_example module using Gradle. This command compiles the module and its dependencies. ```sh ./gradlew :mesh_service_example:build ``` -------------------------------- ### Run Unit Tests with Gradle Source: https://github.com/meshtastic/meshtastic-android/blob/main/CONTRIBUTING.md Executes all unit tests defined for the Meshtastic-Android project using Gradle. Unit tests are crucial for verifying the logic of individual components in isolation. ```bash ./gradlew test ``` -------------------------------- ### Run Detekt Linting Checks Source: https://github.com/meshtastic/meshtastic-android/blob/main/CONTRIBUTING.md Executes the Detekt static code analysis tool via Gradle to check Kotlin code for style violations and potential issues. This command ensures code quality and consistency across the project. ```bash ./gradlew detekt ``` -------------------------------- ### Use Localised Strings in Kotlin Source: https://github.com/meshtastic/meshtastic-android/blob/main/CONTRIBUTING.md Demonstrates the recommended practice of using localised string resources instead of hardcoding strings directly in Kotlin code. This ensures proper internationalization and simplifies translation management. ```kotlin // instead of hardcoding a string in your code: Text("Settings") // use the localised string resource: Text(stringResource(R.string.settings)) ``` -------------------------------- ### Run Instrumented Tests with Gradle Source: https://github.com/meshtastic/meshtastic-android/blob/main/CONTRIBUTING.md Executes instrumented tests, including UI tests for Jetpack Compose, on an Android device or emulator using Gradle. These tests verify the behavior of the application in a more integrated environment. ```bash ./gradlew connectedAndroidTest ``` -------------------------------- ### Capture Meshtastic App Logs (Linux/macOS) Source: https://github.com/meshtastic/meshtastic-android/blob/main/debugging-android.md Captures logcat output specifically for the Meshtastic app process using ADB. This command redirects the output to a file named 'newlogfile.txt' and is suitable for Linux and macOS environments. ```shell adb shell 'logcat --pid=$(pidof -s com.geeksville.mesh)' | tee newlogfile.txt ``` -------------------------------- ### Capture Meshtastic App Logs (Windows) Source: https://github.com/meshtastic/meshtastic-android/blob/main/debugging-android.md Captures logcat output specifically for the Meshtastic app process using ADB. This command redirects the output to a file named 'newlogfile.txt' and is suitable for Windows environments. ```shell adb shell "logcat --pid=$(pidof -s com.geeksville.mesh)" >newlogfile.txt ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.