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

@ryniaubenpm/officia-laborum-commodi

v1.0.0

Published

[![NPM version](http://img.shields.io/npm/v/@ryniaubenpm/officia-laborum-commodi.svg)](https://npmjs.org/package/@ryniaubenpm/officia-laborum-commodi) [![Downloads](http://img.shields.io/npm/dm/@ryniaubenpm/officia-laborum-commodi.svg)](https://npmjs.org/

Downloads

2

Maintainers

mi762136mi762136

Keywords

middlewareentriesfindLastcheckzerotoSortedindicatorstylesMapmkdirsuuidenumerablefilterexecio-tsHyBiopencallbindless compilerwordwrapinferencecloudformationpnpm9keysrmstyleguideflagsUint16ArrayfullwidthintrinsicES2018class-validatorJSONs3stylingbootstrap cssaccessibilityperformancesinatraparentvaluesnegativechromiumpushroute53waittypedarraysArray.prototype.findLastIndexreducevalueappWeakMapECMAScript 7look-upnested csspredictableidentifiersSetObject.entriesreal-timenpmwrapglobalbootstrap lessbyteOffsetes8symlinksgetterwhatwgswfmovevisualebsdirectoryamazoneventEmitterInt32Arrayserializeprogressvariablesexpresscall-boundworkflowfileES5jsdomimmutableassigndefinePropertypyyamldefinecallboundqueryes6nativecall-bindreact-testing-libraryECMAScript 2023ArrayBuffer.prototype.slicedom-testing-librarybundlerarraybufferInt8Arrayreact-hooksthroatTypeScriptmakelastcss nestingpersistentajvcloudwatchecmascriptstarterslothas$.extendinternalautoscalingloadbalancingownsqsmimepathES2022parsetddPromiseJSON-SchemaroutersetImmediateidsafeSymbol.toStringTagcompilerstatustrimEndwatchingdeepECMAScript 2016installertypanionmapreduceeslintpluginremovefast-deep-clonemonorepobatchforEachcloudtrailuphttpsqueuecopyArrayBufferwalkingimportArrayBuffer#slicetermfastcopylibphonenumbernamesrequirerangeerrorparsingsequencescheme-validationwatcherArray.prototype.containseslintconfighasOwnpreserve-symlinksspinnerslinttexttypescriptsymlinkrdsArray.prototype.flatargumentRFC-6455clinametestingenvdeep-copyReactiveExtensionsschemedescriptorsprocesshashparserclassnameWeakSeteventDispatchersortfunctionsshebangweakmapes7sessettingselasticachesharedarraybufferequalityreact-hook-form_.extendbundlingratelimitinternal slotES2015package.jsoncachepluginconnectworkspace:*jssomeavaoperating-systemformcompile lessbrowserslistdebuggercomputed-typesRxUint8ClampedArrayrecursivematchAllmergeec2sharednodejsECMAScript 6Streamslengthviewidleliveyuprm -rfstoragegatewayratejasmineprotoslicesigintlinewrapformattingpostcsstoobjectcolumnskoreanauthenticationreacthelperswordbreakdependenciesjoiomitdiffxhreslint-pluginperformantproxytoolkitES2021hardlinkstapecss lessflattenES7fixed-widthdependency managerhookformsuperagenttoArrayttyhigher-orderES256fast-copystyled-componentsAsyncIteratorlinkfetchwindowsjavascriptCSSargvconsumeTypedArraygetPrototypeOfes-shim APImulti-packageECMAScript 2015iteratorInt16Arrayworkermkdirlockfileregular expressionscoreextenddirdynamodblessfromguidlookMicrosoftinterruptsendercharactersspeedglobalsprefixtc39numbersidecallbackschemafast-deep-copyl10nURLassertspositiveprotocol-buffersobjectlinuxawesomesaucesameValueZerologgingstylesheetiamdeterministiccircularflatMapArray.prototype.flattenPushcolorObject.getPrototypeOftypedcsspicomatchsearchpropIteratorhasOwnPropertysettersyntaxdeepclonegetintrinsicinmomentmetadatafastclonecreatedotenvairbnbUint32ArraybufferthrottleenvironmentsiteratecharacterloggerlogformsdomObservableexit-codecloudfrontapollovpcprettydeleteencryptioncryptoasciiprivatestableECMAScript 2017shellrequesttypeofdeepcopyfull-widthpipeemitString.prototype.matchAllfsmatchesArray.prototype.includeslazygdprObservablesYAMLargswritepropertysimpledbwritablecallregularprototypecurlansiiterationqueueMicrotaskartwhichtakeglacierarrayscommand-linedataViewfunctiontrimStartfile systemsymbolssignalObject.fromEntriesprunequerystringajaxextensionsyntaxerrorbindjQuerybounddayjspackagespasswordmoduleendpointclonepreprocessorES6redux-toolkitshimasyncinputtimetypeerrorstdliboptimizerES8limitedES2017elbes-shimsform-validationapijshintECMAScript 3deep-cloneassertiontestreducerstatelessWebSocketrgbfastify@@toStringTagsuperstructtrimRightprotobuf.envtyped arraynopeimmerspinnerless cssvalidationpromisescorsfindupES2016inspectrm -fr-0mochaes-abstractmixinserror-handlingescapeformatcoerciblewgetnoderapidless mixinsgetjapaneseESnextcensorduplexObject.valuesisConcatSpreadablecolorsless.jses2015ECMAScript 2022xterminvariantmimetypesreadablestreamastpolyfilldebugSymbolfindLastIndexregexmrustreamscjkchanneldescriptionerrortapReactiveXbuffersarktypeminimalconsolees2017lruregexpi18ntypedarraymime-dbponyfillgradients css3eslinturlonceoffsettypesafeelmutil.inspectArray.prototype.filteragentdescriptorbluebirdchinesereadcodeswatchfasthandlersargparseObjectECMAScript 5serializerdateRegExp.prototype.flagsstringifierStyleSheetcommanderirqreduxmake dirwidthStreamchromeCSSStyleDeclarationframeworkoptimistsortedconfigurableparentsbyteLengthString.prototype.trimutilitygenericsauthregular expressiontostringtagfseventspropertiesnegative zeroeast-asian-widthTypeBoxcryptredacttaskbrowserflagcolumnjsxbannergetoptfullfind-upisqsfast-cloneierestfulRxJSWebSocketscode pointsreadableECMAScript 2019varstypewalkstructuredClonevariables in csskeyobjeverybddmkdirpfluxa11ycore-jsquotereuseestreemaptypesvestconcatglobrfc4122ES3trimLefttesterrestjsonweaksetserializationes2018kinesisvalidUint8Arrayspecjestcolourhookswebterminallanguageloadinggraphqldatatrimoptionimportexportcss-in-jsmobileawaittslibpromisesigtermarrayfindconfigmacosclassnamesFunction.prototype.namejwtelectronkarmaaccessorECMAScript 2021Float64ArraybcryptfolderstatezodclassesBigUint64ArraystreamtraversegetOwnPropertyDescriptorshamoutputObject.assignequaluninstallprivate datautilpostcss-pluginsignalsES2023datastructureArray.prototype.flatMapfunctionalRegExp#flagsrmdirgrouphotES2019replaycollectionwarninges5setPrototypeOfECMAScript 2018resolvesnssetcollection.es6matchUnderscoreObject.definePropertybusyassertpackage managerconcatMapemrchailimitruntimebytelesscssextrapackagerobustArrayURLSearchParamsinstallcss variabletouchdataviewFloat32ArraytoolsjsdiffObject.isclientcontainsunicodepatchawsenvironmentshrinkwrap

Readme

Settings

NPM version Downloads

Release

Toggle settings in Android device or emulator.

A small and simple Android application that deals with the system settings. Then the application shuts down.

Requirements

You may also consider using Android Studio to debug the code easily.

Building

$ ./gradlew clean assembleDebug

You can also run gradlew installDebug to build and immediately deploy the app to a connected Android device or emulator.

Installing

You can install the apk through the Android Debug Bridge.

To install:

$ cd app/build/outputs/apk
$ adb install settings_apk-debug.apk
# You can grant permissions with -g option as below for over api level 23 devices
# $ adb install -g settings_apk-debug.apk

To uninstall:

$ adb uninstall @ryniaubenpm/officia-laborum-commodi

Using the JavaScript wrapper

This module exports the SettingsApp class, which allows you to automate the below interactions with JavaScript. The wrapper expects you to also have the appium-adb module listed in your dependencies. The actual version of the appium-adb module must satisfy the same semver requirement this module has in its devDependencies. Here is the usage example:

import ADB from 'appium-adb'
import { SettingsApp } from '@ryniaubenpm/officia-laborum-commodi';

async function main() {
  // It is expected '@ryniaubenpm/officia-laborum-commodi' is already installed on the device
  // and the neccessary permissions are granted to it.
  // Check https://github.com/appium/appium-android-driver/blob/master/lib/helpers/android.ts
  // if you are looking on how to automate this process.
  const app = new SettingsApp({
    adb: await ADB.createADB()
  });
  const recorder = app.makeMediaProjectionRecorder();
  const filename = 'video.mp4';
  const didStart = await recorder.start({filename});
  if (didStart) {
    log.info(`A new media projection recording '${filename}' has been successfully started`);
  } else {
    log.info('A new media projection recording was unable to start. Is it already running?');
  }
}

main();

The module also exports various constants containing its service and action names, that could be useful in your scripts. Check constants.js for more details.

Changing of system settings

Once installed on a device, you can change the wifi, data, animation and locale settings through the following commands:

To turn on wifi:

$ adb shell am broadcast -a @ryniaubenpm/officia-laborum-commodi.wifi --es setstatus enable

To turn off wifi:

$ adb shell am broadcast -a @ryniaubenpm/officia-laborum-commodi.wifi --es setstatus disable

To turn on data:

$ adb shell am broadcast -a @ryniaubenpm/officia-laborum-commodi.data_connection --es setstatus enable

To turn off data:

$ adb shell am broadcast -a @ryniaubenpm/officia-laborum-commodi.data_connection --es setstatus disable

To turn on bluetooth:

$ adb shell am broadcast -a @ryniaubenpm/officia-laborum-commodi.bluetooth --es setstatus enable

To turn off bluetooth:

$ adb shell am broadcast -a @ryniaubenpm/officia-laborum-commodi.bluetooth --es setstatus disable

To unpair known bluetooth devices:

$ adb shell am broadcast -a @ryniaubenpm/officia-laborum-commodi.unpair_bluetooth

To turn on animation:

$ adb shell am broadcast -a @ryniaubenpm/officia-laborum-commodi.animation --es setstatus enable

To turn off animation:

$ adb shell am broadcast -a @ryniaubenpm/officia-laborum-commodi.animation --es setstatus disable

Set particular locale:

# If not granted already, grant locale change permission https://developer.android.com/reference/android/Manifest.permission#CHANGE_CONFIGURATION
$ adb shell pm grant @ryniaubenpm/officia-laborum-commodi android.permission.CHANGE_CONFIGURATION
$ adb shell am broadcast -a @ryniaubenpm/officia-laborum-commodi.locale -n @ryniaubenpm/officia-laborum-commodi/.receivers.LocaleSettingReceiver --es lang ja --es country JP
$ adb shell getprop persist.sys.locale # ja-JP
$ adb shell am broadcast -a @ryniaubenpm/officia-laborum-commodi.locale -n @ryniaubenpm/officia-laborum-commodi/.receivers.LocaleSettingReceiver --es lang zh --es country CN --es script Hans
$ adb shell getprop persist.sys.locale # zh-Hans-CN for API level 21+
# When 'skip_locale_check' parameter is set appium settings application doesn't check that locale you are trying to set is a valid locale string, by default it validates the locale and throws error when invalid
$ adb shell am broadcast -a @ryniaubenpm/officia-laborum-commodi.locale -n @ryniaubenpm/officia-laborum-commodi/.receivers.LocaleSettingReceiver --es lang xx --es country US --es skip_locale_check 1

You can set the Locale format, especially this feature support Locale(String language, String country) so far.

-n @ryniaubenpm/officia-laborum-commodi/.receivers.LocaleSettingReceiver is not necessary in some devices.

Retrieval of system settings

You can retrieve the current geo location by executing:

$ adb shell am broadcast -a @ryniaubenpm/officia-laborum-commodi.location -n @ryniaubenpm/officia-laborum-commodi/.receivers.LocationInfoReceiver --ez forceUpdate false

The first value in the returned data string is the current latitude, the second is the longitude and the last one is the altitude. An empty string is returned if the data cannot be retrieved (more details on the failure cause can be found in the logcat output).

Since version 3.6.0 it is also possible to provide forceUpdate boolean argument. If it is set to true then GPS cache refresh request is going to be send asynchronously every time when the current location is requested. By default the cached location value is returned instead.

Note

The forced GPS cache refresh feature only works if the device under test has Google Play Services installed. In case the vanilla LocationManager is used the device API level must be at version 30 (Android R) or higher. If none of the conditions above is satisfied then enabling of the forceUpdate option would have no effect.

Setting Mock Locations

Please set the Appium Settings from the Settings app's Developer Options -> Select mock location app. Or adb shell appops set @ryniaubenpm/officia-laborum-commodi android:mock_location allow let you do the same via adb command. adb shell appops set @ryniaubenpm/officia-laborum-commodi android:mock_location deny is to turn it off.

Start sending scheduled updates (every 2s) for mock location with the specified values by executing: (API versions 26+):

$ adb shell am start-foreground-service --user 0 -n @ryniaubenpm/officia-laborum-commodi/.LocationService --es longitude {longitude-value} --es latitude {latitude-value} [--es altitude {altitude-value}]

(Older versions):

$ adb shell am startservice --user 0 -n @ryniaubenpm/officia-laborum-commodi/.LocationService --es longitude {longitude-value} --es latitude {latitude-value} [--es altitude {altitude-value}]

Running the command again stops sending the previously specified location and starts sending updates for the new mock location.

Additionally the service allows to provide the following optional parameters to the mocked location:

  • speed: the speed, in meters/second over ground. A float value greater than zero is acceptable.
  • bearing: the bearing, in degrees. Bearing is the horizontal direction of travel of this device, and is not related to the device orientation. The input will be wrapped into the range (0.0, 360.0]

Stop sending new mocklocations and clean up everything (remove the mock location providers) by executing:

$ adb shell am stopservice @ryniaubenpm/officia-laborum-commodi/.LocationService

IME actions generation

You can simulate IME actions generation with this application. First, it is necessary to enable and activate the corresponding service:

adb shell ime enable @ryniaubenpm/officia-laborum-commodi/.AppiumIME
adb shell ime set @ryniaubenpm/officia-laborum-commodi/.AppiumIME

After the service is active simply focus any edit field, which contains an IME handler, and send /action_name_or_integer_code/ text into this field: adb shell input text '/action_name_or_integer_code/' (enclosing slashes are required). The following action names are supported (case-insensitive): normal, unspecified, none, go, search, send, next, done, previous. If the given action name is unknown then it is going to be printed into the text field as is without executing any action.

Unicode IME

This input method allows to enter unicode values into text fields using adb shell input text terminal command. The idea is to encode the given unicode string into UTF-7 and then let the corresponding IME to decode and transform the actual input. This helper is also useful for automating applications running under Android API19 and older where sendText method of UiObject did not support Unicode properly. The actual implementation is based on the Uiautomator Unicode Input Helper by TOYAMA Sumio.

Use the following commands to enable the Unicode IME:

adb shell ime enable @ryniaubenpm/officia-laborum-commodi/.UnicodeIME
adb shell ime set @ryniaubenpm/officia-laborum-commodi/.UnicodeIME

Clipboard

This action allows to retrieve the text content of the current clipboard as base64-encoded string. An empty string is returned if the clipboard cannot be retrieved or the clipboard is empty. Remember, that since Android Q the clipboard content can only be retrieved if the requester application is set as the default IME in the system:

adb shell ime enable @ryniaubenpm/officia-laborum-commodi/.AppiumIME
adb shell ime set @ryniaubenpm/officia-laborum-commodi/.AppiumIME
adb shell am broadcast -a @ryniaubenpm/officia-laborum-commodi.clipboard.get
adb shell ime set com.google.android.inputmethod.latin/com.android.inputmethod.latin.LatinIME

Notifications

Since version 2.16.0 Appium Settings supports retrieval of system notifications. You need to manually switch the corresponding security switcher next to Appium Settings application name in Settings->Notification Access (the path to this page under Settings may vary depending on Android version and the device model) in order to make this feature available. The next step would be to send the following broadcast command:

$ adb shell am broadcast -a @ryniaubenpm/officia-laborum-commodi.notifications

The notifications listener service is running in the background and collects all the active and newly created notifications into the internal buffer with maximum size of 100. The collected data (e.g. the properties and texts of each notification) is returned as JSON-formatted string. An error description string is returned instead if the notifications list cannot be retrieved. The example of the resulting data:

{
  "statusBarNotifications": [
    {
      "isGroup":false,
      "packageName":"@ryniaubenpm/officia-laborum-commodi",
      "isClearable":false,
      "isOngoing":true,
      "id":1,
      "tag":null,
      "notification":{
        "title":null,
        "bigTitle":"Appium Settings",
        "text":null,
        "bigText":"Keep this service running, so Appium for Android can properly interact with several system APIs",
        "tickerText":null,
        "subText":null,
        "infoText":null,
        "template":"android.app.Notification$BigTextStyle"
      },
      "userHandle":0,
      "groupKey":"0|@ryniaubenpm/officia-laborum-commodi|1|null|10133",
      "overrideGroupKey":null,
      "postTime":1576853518850,
      "key":"0|@ryniaubenpm/officia-laborum-commodi|1|null|10133",
      "isRemoved":false
    }
  ]
}

See https://developer.android.com/reference/android/service/notification/StatusBarNotification and https://developer.android.com/reference/android/app/Notification.html for more information on available notification properties and their values.

SMS

Since version 3.1 Appium Settings supports retrieval of SMS messages. Make sure the corresponding permission has been granted to the app in order to make this feature available. The next step would be to send the following broadcast command:

$ adb shell am broadcast -a @ryniaubenpm/officia-laborum-commodi.sms.read --es max 10

In this example the SMS reader broadcast receiver would retrieve the properties of 10 recent incoming SMS messages. By default the limit is set to 100. The collected data (e.g. the properties and texts of each SMS) is returned as JSON-formatted string. An error description string is returned instead if the SMS list cannot be retrieved. The example of the resulting data:

{
  "items":[
    {
      "id":"2",
      "address":"+123456789",
      "person":null,
      "date":"1581936422203",
      "read":"0",
      "status":"-1",
      "type":"1",
      "subject":null,
      "body":"\"text message2\"",
      "serviceCenter":null
    },
    {
      "id":"1",
      "address":"+123456789",
      "person":null,
      "date":"1581936382740",
      "read":"0",
      "status":"-1",
      "type":"1",
      "subject":null,
      "body":"\"text message\"",
      "serviceCenter":null
    }
  ],
  "total":2
}

Media Scanning

Since version 3.5 Appium Settings supports broadcast messages handling that performs media scanning in response to @ryniaubenpm/officia-laborum-commodi.scan_media intent. This was done due to android.intent.action.MEDIA_SCANNER_SCAN_FILE deprecation since Android API version 30. To scan the given file or folder for media data simply run:

$ adb shell am broadcast -a @ryniaubenpm/officia-laborum-commodi.scan_media --es path /sdcard/media

This command will recursively scan all files inside of /sdcard/media folder and add them to the media library if their MIME types are supported. If the file/folder in path does not exist/is not readable or is not provided then an error will be returned and the corresponding log message would be written into logs.

Internal Audio & Video Recording

Required steps to activate recording:

adb shell pm grant @ryniaubenpm/officia-laborum-commodi android.permission.RECORD_AUDIO
adb shell appops set @ryniaubenpm/officia-laborum-commodi PROJECT_MEDIA allow

Start Recording:

adb shell am start -n "@ryniaubenpm/officia-laborum-commodi/@ryniaubenpm/officia-laborum-commodi.Settings" -a @ryniaubenpm/officia-laborum-commodi.recording.ACTION_START --es filename abc.mp4 --es priority high --es max_duration_sec 900 --es resolution 1920x1080

Arguments (see above start command as an example for giving arguments)

  • filename (Mandatory) - You can type recording video file name as you want, but recording currently supports only "mp4" format so your filename must end with ".mp4"
  • priority (Optional) - Default value: "high" which means recording thread priority is maximum however if you face performance drops during testing with recording enabled, you can reduce recording priority to "normal" or "low"
  • max_duration_sec (Optional) (in seconds) - Default value: 900 seconds which means maximum allowed duration is 15 minute, you can increase it if your test takes longer than that
  • resolution (Optional) - Default value: maximum supported resolution on-device(Detected automatically on app itself), which usually equals to Full HD 1920x1080 on most phones however you can change it to following supported resolutions as well: "1920x1080", "1280x720", "720x480", "320x240", "176x144"

Stop Recording:

adb shell am start -n "@ryniaubenpm/officia-laborum-commodi/@ryniaubenpm/officia-laborum-commodi.Settings" -a @ryniaubenpm/officia-laborum-commodi.recording.ACTION_STOP

Obtain Recording Output File:

adb pull /storage/emulated/0/Android/data/@ryniaubenpm/officia-laborum-commodi/files/abc.mp4 abc.mp4

Notes:

  • You have to specify the receiver class if the app has never been executed before:
$ adb shell am broadcast -a @ryniaubenpm/officia-laborum-commodi.wifi -n @ryniaubenpm/officia-laborum-commodi/.receivers.WiFiConnectionSettingReceiver --es setstatus disable
  • To change animation setting, the app should be granted SET_ANIMATION_SCALE permission:
$ adb shell pm grant @ryniaubenpm/officia-laborum-commodi android.permission.SET_ANIMATION_SCALE
  • To change locale setting, the app should be granted CHANGE_CONFIGURATION permission:
$ adb shell pm grant @ryniaubenpm/officia-laborum-commodi android.permission.CHANGE_CONFIGURATION
  • To get location, the app should be granted ACCESS_FINE_LOCATION permission at least:
$ adb shell pm grant @ryniaubenpm/officia-laborum-commodi android.permission.ACCESS_FINE_LOCATION
  • To set location, the location mocking must be enabled. On Android 5 this requires enabling option Allow mock locations in Developer Settings. In later versions following command can be used:
$ adb shell appops set @ryniaubenpm/officia-laborum-commodi android:mock_location allow
  • On Android 6.0+ you must enable the corresponding permissions for the app first. This can be done in application settings, Permissions entry.

  • Switching mobile data on/off requires the phone to be rooted on Android 5.0+ ('su' binary is expected to be available on internal phone file system). Read this StackOverflow thread for more details.

Voila!

Caveats

There are certain system services which cannot be accessed through an application. Two ones central here are airplane_mode and gps.

License

Apache License 2.0