GithubHelp home page GithubHelp logo

quickdemo's Introduction

QuickDemo

QuickDemo is a Nougat 7.0 quick settings tile for fast access to the Marshmallow 6.0 System UI demo mode. The app also provides a configuration activity for customizing available demo mode settings.

Release blog post: https://pspdfkit.com/blog/2016/clean-statusbar-with-systemui-and-quickdemo/

QuickDemo in action

Requirements

  • Android SDK (API 25)
  • Android Studio 2.2+
  • adb (for installing the app and granting the required permissions)
  • Android emulator or devices running Marshmallow (API 23+)

Building

To build and run the app, you can open the project with Android Studio and press Run. Alternatively you can install the app from the command line.

git clone [email protected]:PSPDFKit-labs/QuickDemo.git
cd QuickDemo/
./gradlew installDebug

You can also run the setup.sh script, wich will check for ANDROID_HOME, clone the project, and use Gradle to install and setup the tool. The script will also remove files of the project after installation.

Setup

With Gradle

If you cloned the project, you can run setupDemoMode gradle task to do the setup.

This can be done either by finding and selecting setupDemoMode in Gradle window in Android Studio, or by running the following:

./gradlew setupDemoMode

Manually via adb

  1. When launching the app for the first time you need to grant the android.permission.DUMP permission, which is required to control the System UI demo mode. You need to do this using adb.
adb shell pm grant com.pspdfkit.labs.quickdemo android.permission.DUMP
  1. Since the System UI tuner (and its demo mode) is an experimental Android feature, you need to activate it globally.
adb shell settings put global sysui_demo_allowed 1

Usage

  1. The app comes with a quick settings tile which you can use to quickly toggle the demo mode.

    1. Completely open the status bar drawer, expanding all quick setting tiles.
    2. Press the edit button on top of the drawer, to show the quick setting tiles picker.
    3. Drag the QuickDemo tile to your desired position.
    4. Exit edit mode, and tap the tile.
  2. You can launch QuickDemo activity to configure all displayed icons of the demo mode.

    1. You can find the activity in your app launcher.

Feedback and contribution

Since this project is open source, feel free to use it, give feedback, or contribute in any way you find suitable.

About

This project is maintained and funded by PSPDFKit.

See our other open source projects, read our blog or say hello on Twitter (@PSPDFKit).

quickdemo's People

Contributors

davidschreiber avatar dvdmunckhof avatar eradash avatar lyricsboy avatar meleyal avatar philippeauriach avatar steipete avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

quickdemo's Issues

Automatically generate setup HTML from Markdown

The setup screen shows a simple HTML file setup-guide.html stored in the app's assets: https://github.com/PSPDFKit-labs/QuickDemo/blob/master/app/src/main/assets/setup-guide.html

This file is generated from a Markdown template: https://github.com/PSPDFKit-labs/QuickDemo/blob/master/setup-guide.md

Right now this has to be done manually, and is thus prone to mistakes. A PR fixing this issue should add automated Markdown-to-HTML conversion to the app's build script, so that the file is properly regenerated on every build.

Lower minSdkVersion to 23

Is there any reason for the minSdkVersion to be 24? I wanted to test it on a Marshmallow device (23), so I lowered it and it worked just fine. You can't use the quicktile, but that's not an issue.

By the way, the app is awesome, thanks!

Alternative way to do it (good for automation)

Set up this mode:
adb shell settings put global sysui_demo_allowed 1
adb shell am broadcast -a com.android.systemui.demo -e command enter

Set battery level
adb shell am broadcast -a com.android.systemui.demo -e command battery -e plugged false -e level 100

Hide notifications
adb shell am broadcast -a com.android.systemui.demo -e command notifications -e visible false

Hide any alarm bells and volume
adb shell am broadcast -a com.android.systemui.demo -e command status -e location hide -e alarm hide -e volume hide

Set time to 18:15
adb shell am broadcast -a com.android.systemui.demo -e command clock -e hhmm 1815

Set phone network type and level and the wifi level
adb shell am broadcast -a com.android.systemui.demo -e command network -e mobile show -e datatype 4g -e level 4 -e wifi show -e fully true -e level 3

And to reset to default mode:
adb shell am broadcast -a com.android.systemui.demo -e command exit

Full reference:
https://android.googlesource.com/platform/frameworks/base/+/android-6.0.0_r1/packages/SystemUI/docs/demo_mode.md

Time option not working

I have changed the hour but in demo mode the current hour is still shown (not even 7:00 or 6:00)...

I am using the pre-built apk from XDA-Developers, but I don't think they did changes to the code.

Everything else is working great, although an option to show "Priority mode" icon would be cool too.

Thanks

Export and import of configuration settings

It could be nice if we could have values in a JSON sent to the application. The use case I have in head is that I want every developper of my application to have the same settings for the QuickDemo app during screenshots, and I want this configuration to be shared to everyone.

It can be a parameter sent to Gradle (like the path of the file) during build to put those values directly in the app.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.