npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

currentactivity

v1.0.2

Published

A command line tool to display the current activity for android.

Downloads

1

Readme

currentactivity

A command line tool to display the current activity for android

Feature

  1. show current window package name and activity name.
  2. show current display activity stack.
  3. show current display fragments in focused activity.

Installation

npm install -g currentactivity

Preamble

To use this cli tool, you need to install adb first. If If you are using Mac OS, you can use homebrew to install adb.

brew install android-platform-tools

Usage

Show current activity's name

currentactivity -a

output example

com.tencent.mm/com.tencent.mm.ui.LauncherUI

Show current activity's name in real time

currentactivity -a -w

Show current activity's stack

currentactivity -s

output example

╔═══════════════════════════════════════════════════════════════╗
║ com.tencent.mm/.plugin.webview.ui.tools.WebViewUI             ║
╟───────────────────────────────────────────────────────────────╢
║ com.tencent.mm/.plugin.brandservice.ui.timeline.BizTimeLineUI ║
╟───────────────────────────────────────────────────────────────╢
║ com.tencent.mm/.ui.LauncherUI                                 ║
╚═══════════════════════════════════════════════════════════════╝

Show current activity's fragments

currentactivity -f

output example

╔═════════════════════╤════════════════════════════════════════════════════════════════════════════════════════╗
║ activity            │ com.tencent.mm/.ui.LauncherUI                                                          ║
╟─────────────────────┼────────────────────────────────────────────────────────────────────────────────────────╢
║ framework fragments │ └─ #0: ad{d7a01e4 #0 androidx.lifecycle.LifecycleDispatcher.report_fragment_tag}       ║
║                     │                                                                                        ║
╟─────────────────────┼────────────────────────────────────────────────────────────────────────────────────────╢
║ androidx fragments  │ ├─ MainUI{403dae2} (f74366df-8aa6-4cc2-b702-9b609620a895 id=0x7f092d4a)                ║
║                     │ ├─ MvvmAddressUIFragment{ef218ab} (fbc006c7-be02-47fa-be40-952dcc42293b id=0x7f092d4a) ║
║                     │ ├─ MoreTabUI{dcc2cc6} (106e8aa9-d6da-48f2-b870-d0a95882d33f id=0x7f092d4a)             ║
║                     │ ├─ ChattingUIFragment{cad8b94} (3fccfb2c-fc14-4b3c-8b91-ba9d3e102759 id=0x7f0909d7)    ║
║                     │ └─ FindMoreFriendsUI{fdacb08} (b1b80b1b-ea6f-470b-b16c-cd76c853e8ad id=0x7f092d4a)     ║
║                     │                                                                                        ║
╚═════════════════════╧════════════════════════════════════════════════════════════════════════════════════════╝

Show all the info about the current activity

currentactivity -A

output example

╔═════════════════════════════════════════════╗
║               current window                ║
╟─────────────────────────────────────────────╢
║ com.tencent.mm/com.tencent.mm.ui.LauncherUI ║
╚═════════════════════════════════════════════╝



╔═══════════════════════════════╗
║        activity stack         ║
╟───────────────────────────────╢
║ com.tencent.mm/.ui.LauncherUI ║
╚═══════════════════════════════╝



╔══════════════════════════════════════════════════════════════════════════════════════════════════════════════╗
║                                                  fragments                                                   ║
╟─────────────────────┬────────────────────────────────────────────────────────────────────────────────────────╢
║ framework fragments │ └─ #0: ad{d7a01e4 #0 androidx.lifecycle.LifecycleDispatcher.report_fragment_tag}       ║
║                     │                                                                                        ║
╟─────────────────────┼────────────────────────────────────────────────────────────────────────────────────────╢
║ androidx fragments  │ ├─ MainUI{403dae2} (f74366df-8aa6-4cc2-b702-9b609620a895 id=0x7f092d4a)                ║
║                     │ ├─ MvvmAddressUIFragment{ef218ab} (fbc006c7-be02-47fa-be40-952dcc42293b id=0x7f092d4a) ║
║                     │ ├─ MoreTabUI{dcc2cc6} (106e8aa9-d6da-48f2-b870-d0a95882d33f id=0x7f092d4a)             ║
║                     │ ├─ ChattingUIFragment{cad8b94} (3fccfb2c-fc14-4b3c-8b91-ba9d3e102759 id=0x7f0909d7)    ║
║                     │ └─ FindMoreFriendsUI{fdacb08} (b1b80b1b-ea6f-470b-b16c-cd76c853e8ad id=0x7f092d4a)     ║
║                     │                                                                                        ║
╚═════════════════════╧════════════════════════════════════════════════════════════════════════════════════════╝

More Options

-h, --help      Show help
-a, --activity  Show the current activity's name
-s, --stack     Show the current activity's stack
-f, --fragment  Show all fragments in the current activity
-w, --watch     Monitor activity or fragments changes in real time
-A, --all       Show all information, including the current activity name, activity stack and fragments

That's it.

Changelog

  • 1.0.2

    • Compatible with some Samsung phones
  • 1.0.1

    • Added more options for more flexible output
  • 1.0.0

    • Initial version

License

MIT