Sentinel is a simple one screen UI which provides a standardised entry point for tools used in development and QA alongside device, application and permissions data.

Overview

Download Validate Gradle Wrapper Code analysis CodeFactor

Sentinel

UI

Sentinel is a simple one screen UI that provides standardised entry point for tools used in development and QA alongside device, application and permissions data.
It's designed to be easily configured and expanded depending on needs and requirements of developers and QA testers.

The project is organized in the following modules:

  • sentinel - contains a single screen UI that provides visual information about device, application, permissions and tools
  • sentinel-no-op - contains stubs for easy release implementation of UI package and any Tools included
  • tool-chucker - contains a class wrapper for Chucker
  • tool-collar - contains a class wrapper for Collar
  • tool-dbinspector - contains a class wrapper for DbInspector
  • tool-leakcanary - contains a class wrapper for LeakCanary
  • tool-appgallery - contains a class wrapper for Huawei AppGallery
  • tool-googleplay - contains a class wrapper for Google Play
  • tool-thimble - contains a class wrapper for Thimble
  • sample - a sample app for testing and developing

Usage

To include Sentinel in your project, you have to add buildscript dependencies in your project level build.gradle or build.gradle.kts:

Groovy

buildscript {
    repositories {
        mavenCentral()
    }
}

KotlinDSL

buildscript {
    repositories {
        mavenCentral()
    }
}

Then add the following dependencies in your app build.gradle or build.gradle.kts :

Groovy

debugImplementation "com.infinum.sentinel:sentinel:1.1.6"
releaseImplementation "com.infinum.sentinel:sentinel-no-op:1.1.6"

KotlinDSL

debugImplementation("com.infinum.sentinel:sentinel:1.1.6")
releaseImplementation("com.infinum.sentinel:sentinel-no-op:1.1.6")

Basic tools are provided inside the main package but depending on requirements you might want to add specific tools:

Groovy

debugImplementation "com.infinum.sentinel:tool-chucker:1.1.6"
debugImplementation "com.infinum.sentinel:tool-collar:1.1.6"
debugImplementation "com.infinum.sentinel:tool-dbinspector:1.1.6"
debugImplementation "com.infinum.sentinel:tool-leakcanary:1.1.6"
debugImplementation "com.infinum.sentinel:tool-appgallery:1.1.6"
debugImplementation "com.infinum.sentinel:tool-googleplay:1.1.6"
debugImplementation "com.infinum.sentinel:tool-thimble:1.1.6"

KotlinDSL

debugImplementation("com.infinum.sentinel:tool-chucker:1.1.6")
debugImplementation("com.infinum.sentinel:tool-collar:1.1.6")
debugImplementation("com.infinum.sentinel:tool-dbinspector:1.1.6")
debugImplementation("com.infinum.sentinel:tool-leakcanary:1.1.6")
debugImplementation("com.infinum.sentinel:tool-appgallery:1.1.6")
debugImplementation("com.infinum.sentinel:tool-googleplay:1.1.6")
debugImplementation("com.infinum.sentinel:tool-thimble:1.1.6")

Now you can sync your project.

Getting started

Create or inject an instance of Sentinel in your Application class and start watching for triggers:

    Sentinel.watch(
        setOf(
            ChuckerTool(),
            CollarTool(),
            DbInspectorTool(),
            LeakCanaryTool(),
            AppGalleryTool(appId = "123456789"),
            GooglePlayTool(),
            ThimbleTool()
        )
    )

A set of tools should be provided as a watch parameter. This set of tools can be empty.

Tools

Sentinel provides several different levels of tools for a developer to implement.

Built in

  • AppInfoTool - opens Android OS Settings page of the application in which Sentinel was implemented

Dependency wrappers

Depending of what you include as module dependencies, very specific tools are provided.

  • ChuckerTool - a wrapper class that opens Chucker
  • CollarTool - a wrapper class that opens Collar
  • DbInspectorTool - a wrapper class that opens DbInspector
  • LeakCanaryTool - a wrapper class that opens LeakCanary
  • ThimbleTool - a wrapper class that opens Thimble
  • AppGalleryTool - a wrapper class that opens Huawei AppGallery of a published application or a web page of the application if Huawei AppGallery is not found
  • GooglePlayTool - a wrapper class that opens Google Play of a published application or a web page of the application if Google Play is not found

Source abstractions

If you want to implement a different tool other than already packaged with a predefined type and name, several are available.

  • NetworkTool - a wrapper interface with a name Network for any network interceptors
  • MemoryTool - a wrapper interface with a name Memory for any memory management tools
  • AnalyticsTool - a wrapper interface with a name Analytics for any analytics collectors
  • DatabaseTool - a wrapper interface with a name Database for any database viewers
  • ReportTool - a wrapper interface with a name Report for any crash reporting tools
  • BluetoothTool - a wrapper interface with a name Bluetooth for any Bluetooth loggers
  • DistributionTool - a wrapper interface with a name Distribution for any release distribution channels
  • DesignTool - a wrapper interface with a name Design for any design utilities

Independent implementations

An interface is provided named Sentinel.Tool that requires implementation of a String resource for a name and a View.OnClickListener. An optional icon Drawable resource can be supplied. Implementing this interface enables any class to be provided as a tool in Sentinel.

    interface Tool {

        @DrawableRes
        fun icon(): Int? = null

        @StringRes
        fun name(): Int

        fun listener(): View.OnClickListener
    }

Triggers

Sentinel observes several different trigger events, determining when to show up. Manual and Shake triggers cannot be turned off but rest are configurable through Sentinel settings except Foreground trigger when running on emulators. Trigger states will be persisted between sessions. Upon first run, all triggers are enabled.

  • Manual - used for manually triggering UI with show()
  • Shake - default trigger to show UI, shake device to invoke
  • Foreground - shows UI every time application goes into foreground
  • USB connected - shows UI every time an USB cable is plugged in
  • Airplane mode on - shows UI every time Airplane mode is turned on

Formatters

Data gathered and presented by Sentinel can be shared to any text compliant recipient applications. Sentinel provides a few simple text formatters for easy integrations into other systems. Plain formatter is selected by default, but selecting any other is persisted between sessions.

  • Plain
  • Markdown
  • JSON
  • XML
  • HTML

Requirements

This plugin has been written in Kotlin but works both inside Kotlin and Java projects. Minimum required API level to use Sentinel is 21 known as Android 5.0, Lollipop. Sentinel is built with and for AndroidX projects.

Contributing

Feedback and code contributions are very much welcome. Just make a pull request with a short description of your changes. By making contributions to this project you give permission for your code to be used under the same license. For easier developing a sample application with proper implementations is provided. If you wish to add a new specific dependency wrapper tool, create a new module and set it up like the ones already provided. Then create a pull request.

License

Copyright 2020 Infinum

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Credits

Maintained and sponsored by Infinum.

Comments
  • Bundle size tool

    Bundle size tool

    :warning: Is your feature request related to a problem? Please describe

    Developers often don't mind about Bundle size and it happens that they hit TransactionTooLargeException.

    :bulb: Describe the solution you'd like

    A Bundle size tool would be integrated in Sentinel as a mandatory tool. In Sentinel threshold there should be a slider defining a limit of size that tool should observe, with maximum of 5112kB. Clicking on Tool should open a list of observed Bundles from Intents and flag (red color, icon, ...) Intents that hit the previously set limit. Additionaly, console logging should be optional alongside UI logging. All logging is session (in memory) based.

    :raising_hand: Do you want to develop this feature yourself?

    • [x] Yes
    • [ ] No
    enhancement 
    opened by bojankoma 1
  • CookieJar tool

    CookieJar tool

    :warning: Is your feature request related to a problem? Please describe

    Cookie Jar inspector tool

    :bulb: Describe the solution you'd like

    Browse and display all cookies from cookie jar available to the running app.

    :raising_hand: Do you want to develop this feature yourself?

    • [ ] Yes
    • [x] No
    enhancement 
    opened by bojankoma 1
  • Stubs for all tools in no-op

    Stubs for all tools in no-op

    :warning: Is your feature request related to a problem? Please describe

    When using no-op for tools with a custom implementation of some tool (eg. AnalyticsTool) we need to stub that.

    :bulb: Describe the solution you'd like

    Please add stubs in no-op for all tools. In that case, when no-op is used we don't need to implement stubs for our custom tools.

    :raising_hand: Do you want to develop this feature yourself?

    • [ ] Yes
    • [ x] No
    enhancement good first issue 
    opened by markonovina 1
  • Check if “Automatic date and time” is enabled on device

    Check if “Automatic date and time” is enabled on device

    :warning: Is your feature request related to a problem? Please describe

    It would be useful to include information if “Automatic date and time” toggle is on or off. In Device tab there would simply be another true/false entry.

    :bulb: Describe the solution you'd like

    We could use Settings.Global with a ContentResolver to obtain this information.

    :bar_chart: Describe alternatives you've considered

    I haven't considered any alternatives and we have this in production code.

    :page_facing_up: Additional context

    Various manufacturer overlays on Android might have this in a different place in Settings. Having this information in 1 permanent place in Sentinel will be useful for time sensitive testing or development.

    :raising_hand: Do you want to develop this feature yourself?

    • [x] Yes
    • [ ] No
    enhancement 
    opened by bojankoma 1
  • Sentinel appears on app startup

    Sentinel appears on app startup

    :writing_hand: Describe the bug

    I've initialized Sentinel in Application's onCreate():

    Sentinel.watch(
        this,
        new HashSet<>(Arrays.asList(
            new ChuckerTool(),
            new CollarTool(),
            new DbInspectorTool(),
            new GooglePlayTool()
        ))
    );
    

    Sentinel appears when I start up the app, briefly on the Splash screen if one is present, or permanently if I do not have a splash screen (or it's stuck there).

    This is also present despite the "Foreground" setting being "off".

    :bomb: Steps to reproduce

    1. Open the app
    2. Sentinel appears regardless of the "Foreground" setting.

    :wrench: Expected behavior

    Sentinel should only appear if the Foreground setting is set to On, and by default only on emulators.

    :iphone: Tech info

    • Device: Samsung Galaxy S10+
    • OS: Android 10
    • Sentinel version: 1.0.0
    bug 
    opened by JonatanPlesko 1
  • JSON/XML export formatting issues

    JSON/XML export formatting issues

    :writing_hand: Describe the bug

    When exporting as JSON and XML some formatting issues appear.

    1. Both formats do not have any spacing.
    2. JSON is not quite well-formed.

    :bomb: Steps to reproduce

    1. Try to export JSON/XML
    2. The resulting string lacks any spacing and in the case of JSON, it contains strings instead of objects.

    JSON example: {"application":"{"version_code":"80","version_name":"2.6.6","first_install":"2020-04-07 14:00:09","last_update":"2020-05-04 11:04:15","min_sdk":"21","target_sdk":"28","package_name":"co.infinum.test","process_name":"co.infinum.test","task_affinity":"co.infinum.test","locale_language":"en","locale_country":"GB"}","permissions":"[{"name":"android.permission.RECEIVE_BOOT_COMPLETED","status":"true"},{"name":"android.permission.ACCESS_FINE_LOCATION","status":"false"},{"name":"android.permission.ACCESS_COARSE_LOCATION","status":"false"},{"name":"android.permission.INTERNET","status":"true"},{"name":"android.permission.CALL_PHONE","status":"false"},{"name":"android.permission.CAMERA","status":"true"},{"name":"android.permission.READ_PHONE_STATE","status":"true"},{"name":"android.permission.WRITE_EXTERNAL_STORAGE","status":"false"},{"name":"android.permission.VIBRATE","status":"true"},{"name":"android.permission.MODIFY_AUDIO_SETTINGS","status":"true"},{"name":"co.infinum.test.MAPS_RECEIVE","status":"true"},{"name":"com.google.android.providers.gsf.permission.READ_GSERVICES","status":"true"},{"name":"android.permission.ACCESS_NETWORK_STATE","status":"true"},{"name":"android.permission.READ_EXTERNAL_STORAGE","status":"false"},{"name":"android.permission.ACCESS_BACKGROUND_LOCATION","status":"false"},{"name":"android.permission.ACCESS_MEDIA_LOCATION","status":"false"}]","device":"{"manufacturer":"Samsung","model":"SM-G975F","id":"xxx","bootloader":"G975FXXU4CTC9","device":"beyond2","board":"exynos9820","architectures":"arm64-v8a, armeabi-v7a, armeabi","codename":"REL","release":"10","sdk":"29","security_patch":"2020-04-01","emulator":false}","preferences":"[{"name":"menu_prefs","values":[{"prefs_ips_dialog_shown":true}]},{"name":"com.infinum.test","values":[{"token_info":"[{\"token_display_name\":\"xxx\",\"token_key\":\"xxx\"}]"}]},{"name":"webviewchromiumprefs","values":[{"lastversioncodeused":404411133}]},{"name":"lkjspsan","values":[{"adalkjas":"xxx"}]},{"name":"co.infinum.test_preferences","values":[{"logged_in_method":4},{"prefs_use_sound":true},{"prefs_login_type":0},{"prefs_remember_me_username":"test.user"},{"prefs_remember_me":true}]}]"}

    :wrench: Expected behavior

    1. XML and JSON formats are prettified
    2. JSON has objects instead of strings of JSONs.

    :iphone: Tech info

    • Device: Samsung Galaxy S10+
    • OS: Android 10
    • Sentinel version: 1.0.0
    bug 
    opened by JonatanPlesko 1
  • Develop

    Develop

    :camera: Screenshots

    :page_facing_up: Context

    :pencil: Changes

    :paperclip: Related PR

    :no_entry_sign: Breaking

    :hammer_and_wrench: How to test

    :stopwatch: Next steps

    opened by bojankoma 0
  • Implement filtering through allowed tags for TimberTool

    Implement filtering through allowed tags for TimberTool

    :camera: Screenshots

    :page_facing_up: Context

    :pencil: Changes

    :paperclip: Related PR

    :no_entry_sign: Breaking

    :hammer_and_wrench: How to test

    :stopwatch: Next steps

    enhancement 
    opened by gobbletsit 0
  • Filter Timber report data with a specifix

    Filter Timber report data with a specifix

    :warning: Is your feature request related to a problem? Please describe

    When using TimberTool for logging, all Timber data is logged and has no option to customize/filter which logs should be visible to the user.

    :bulb: Describe the solution you'd like

    Allow users to filter by a specific tag/tags.

    :bar_chart: Describe alternatives you've considered

    :page_facing_up: Additional context

    :raising_hand: Do you want to develop this feature yourself?

    • [x] Yes
    • [ ] No
    enhancement 
    opened by gobbletsit 0
  • Release 1.1.9

    Release 1.1.9

    • Implement screen information in Device tab.
    • Implement font scale information in Device tab.
    • Implement Proximity sensor trigger.
    • Add Timber tool.
    • Add Certificates tool.
    opened by bojankoma 0
  • Display info data in Devices tab

    Display info data in Devices tab

    :warning: Is your feature request related to a problem? Please describe

    Not every developer or QA knows how to check display data, like size, DPI, diagonal size, ...

    :bulb: Describe the solution you'd like

    Add display related rows in Device tab.

    :raising_hand: Do you want to develop this feature yourself?

    • [x] Yes
    • [ ] No
    opened by bojankoma 0
Releases(1.2.2)
Owner
Infinum
We're an independent design & development agency of 230 people, creating beautiful software for 14 years.
Infinum
A customizable debug screen to view and edit flags that can be used for development in Jetpack Compose applications

Tweaks A customizable debug screen to view and edit flags that can be used for development in Jetpack Compose applications To include the library add

Guillermo Merino Jiménez 4 Jan 14, 2022
A simple screen that is shown when your app gets crashed instead of the normal crash dialog. It's very similar to the one in Flutter.

Red Screen Of Death What A simple screen that is shown when your app gets crashed instead of the normal crash dialog. It's very similar to the one in

Ahmad Melegy 178 Dec 9, 2022
Multiplatform UI DSL with screen management in common code for mobile (android & ios) Kotlin Multiplatform development

Mobile Kotlin widgets This is a Kotlin MultiPlatform library that provides declarative UI and application screens management in common code. You can i

IceRock Development 320 Dec 30, 2022
A custom view, in which device contact list is displayed

Getting Started This repository contains a custom view, in which device contact list is displayed Implementation Go to Settings.gradle, inside reposit

Ankit Kumar 2 May 7, 2022
This library provides a simple way to add a draggable sliding up panel (popularized by Google Music and Google Maps) to your Android application. Brought to you by Umano.

Note: we are not actively responding to issues right now. If you find a bug, please submit a PR. Android Sliding Up Panel This library provides a simp

Umano: News Read To You 9.4k Dec 31, 2022
Android view that allows the user to create drawings. Customize settings like color, width or tools. Undo or redo actions. Zoom into DrawView and add a background.

DrawView Android view that allows the user to create drawings. Draw anything you like in your Android device from simple view. Customize draw settings

Oscar Gilberto Medina Cruz 839 Dec 28, 2022
NeoPOP was created with one simple goal; to create the next generation of a beautiful, affirmative design system

NeoPop is CRED's inbuilt library for using NeoPop components in your app

CRED 254 Dec 29, 2022
Custom UI control for android which is showing data as a segments and a value inside them.

Segmented Bar View for Android Custom UI control for android which is showing data as a segments and a value inside them. Screenshots Install From rep

GSPD 354 Nov 10, 2022
Compose app with dummy data which serves as a playground to try out new things in the Android world.

Music Event Manager Compose app with dummy data which serves as a playground to try out new things in the Android world. Description The app primarily

Igor Tepavac 4 Apr 4, 2022
Android library for creating an expandable to full screen view inside a viewgroup composition.

Expandable Panel Android Library Check ExpandablePanel Demo application on GooglePlay: Details This Android library implements the expand by sliding l

Jorge Castillo 422 Nov 10, 2022
PCard Add payment card screen made using JetPack Compose

PCard Add payment card screen made using JetPack Compose Find this repository useful? ❤️ Support it by joining stargazers for this repository. ⭐ And f

Mohamed Elbehiry 61 Dec 16, 2022
Displays your screen time in a permanent notification.

Screen Time Displays your screen time in a permanent notification. By making screen time more prominent, you can get a better sense of how much of the

Markus Fisch 24 Nov 29, 2022
Android ImageView you pan by tilting your device.

WindowView Window as in windowsill. An Android ImageView that can be panned around by tilting your device, as if you were looking through a window. Us

Justas Medeišis 265 Nov 11, 2022
Android library to display a list of items for pick one

PickerUI Android library to display a list of items for pick one with blur effect (if you wish). Support for Android 3.0 and up. It supports portrait

David Pizarro 630 Nov 19, 2022
Android library implementing a poppy view on scroll, similar to the one found in the Google Plus app

PoppyView PoppyView is a library which implements view on the bottom which come and go relative to the user scroll. It can be seen in the Google plus

Flavien Laurent 409 Nov 23, 2022
Android App that communicates with a back-end server to display different One Piece characters

About This project is an Android App that communicates with a back-end server to display different One Piece characters. It's roughly based on this co

Sam Garcia 1 Feb 4, 2022
A MaterialChipSetWidget is used to hold multiple chipsets 🤩 and each chipset has multiple values. 🔖

A MaterialChipSetWidget is used to hold multiple chipsets ?? and each chipset has multiple values. ??

Justin George 38 Sep 21, 2022
The CustomCalendarView provides an easy and customizable calendar to create a Calendar. It dispaly the days of a month in a grid layout and allows to navigate between months

Custom-Calendar-View To use the CustomCalendarView in your application, you first need to add the library to your application. You can do this by eith

Nilanchala Panigrahy 113 Nov 29, 2022
Janishar Ali 2.1k Jan 1, 2023