io.appium.settings 5.7.1 → 5.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/README.md +37 -2
- package/apks/settings_apk-debug.apk +0 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [5.7.2](https://github.com/appium/io.appium.settings/compare/v5.7.1...v5.7.2) (2024-01-13)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Miscellaneous Chores
|
|
5
|
+
|
|
6
|
+
* Bump appium-adb ([#142](https://github.com/appium/io.appium.settings/issues/142)) ([adb209e](https://github.com/appium/io.appium.settings/commit/adb209e3d25a4f996fa52d92894f08d1dda35a9b))
|
|
7
|
+
|
|
1
8
|
## [5.7.1](https://github.com/appium/io.appium.settings/compare/v5.7.0...v5.7.1) (2024-01-11)
|
|
2
9
|
|
|
3
10
|
|
package/README.md
CHANGED
|
@@ -45,6 +45,41 @@ To uninstall:
|
|
|
45
45
|
$ adb uninstall io.appium.settings
|
|
46
46
|
```
|
|
47
47
|
|
|
48
|
+
## Using the JavaScript wrapper
|
|
49
|
+
|
|
50
|
+
This module exports the [SettingsApp](./lib/client.js) class, which allows you to automate the below interactions with JavaScript.
|
|
51
|
+
The wrapper expects you to also have the [appium-adb](https://github.com/appium/appium-adb) module listed
|
|
52
|
+
in your dependencies. The actual version of the appium-adb module must satisfy the same semver requirement this module
|
|
53
|
+
has in its [devDependencies](./package.json).
|
|
54
|
+
Here is the usage example:
|
|
55
|
+
|
|
56
|
+
```js
|
|
57
|
+
import ADB from 'appium-adb'
|
|
58
|
+
import { SettingsApp } from 'io.appium.settings';
|
|
59
|
+
|
|
60
|
+
async function main() {
|
|
61
|
+
// It is expected 'io.appium.settings' is already installed on the device
|
|
62
|
+
// and the neccessary permissions are granted to it.
|
|
63
|
+
// Check https://github.com/appium/appium-android-driver/blob/master/lib/helpers/android.ts
|
|
64
|
+
// if you are looking on how to automate this process.
|
|
65
|
+
const app = new SettingsApp({
|
|
66
|
+
adb: await ADB.createADB()
|
|
67
|
+
});
|
|
68
|
+
const recorder = app.makeMediaProjectionRecorder();
|
|
69
|
+
const filename = 'video.mp4';
|
|
70
|
+
const didStart = await recorder.start({filename});
|
|
71
|
+
if (didStart) {
|
|
72
|
+
log.info(`A new media projection recording '${filename}' has been successfully started`);
|
|
73
|
+
} else {
|
|
74
|
+
log.info('A new media projection recording was unable to start. Is it already running?');
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
main();
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
The module also exports various constants containing its service and action names, that could be useful in your
|
|
82
|
+
scripts. Check [constants.js](./lib/constants.js) for more details.
|
|
48
83
|
|
|
49
84
|
## Changing of system settings
|
|
50
85
|
|
|
@@ -113,7 +148,7 @@ $ adb shell am broadcast -a io.appium.settings.locale -n io.appium.settings/.rec
|
|
|
113
148
|
$ adb shell getprop persist.sys.locale # ja-JP
|
|
114
149
|
$ adb shell am broadcast -a io.appium.settings.locale -n io.appium.settings/.receivers.LocaleSettingReceiver --es lang zh --es country CN --es script Hans
|
|
115
150
|
$ adb shell getprop persist.sys.locale # zh-Hans-CN for API level 21+
|
|
116
|
-
# 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
|
|
151
|
+
# 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
|
|
117
152
|
$ adb shell am broadcast -a io.appium.settings.locale -n io.appium.settings/.receivers.LocaleSettingReceiver --es lang xx --es country US --es skip_locale_check 1
|
|
118
153
|
```
|
|
119
154
|
|
|
@@ -145,7 +180,7 @@ option would have no effect.
|
|
|
145
180
|
|
|
146
181
|
## Setting Mock Locations
|
|
147
182
|
|
|
148
|
-
Please set the Appium Settings from the Settings app's _Developer Options_ -> _Select mock location app_.
|
|
183
|
+
Please set the Appium Settings from the Settings app's _Developer Options_ -> _Select mock location app_.
|
|
149
184
|
Or `adb shell appops set io.appium.settings android:mock_location allow` let you do the same via adb command.
|
|
150
185
|
`adb shell appops set io.appium.settings android:mock_location deny` is to turn it off.
|
|
151
186
|
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "io.appium.settings",
|
|
3
|
-
"version": "5.7.
|
|
3
|
+
"version": "5.7.2",
|
|
4
4
|
"description": "App for dealing with Android settings",
|
|
5
5
|
"main": "./build/lib/index.js",
|
|
6
6
|
"types": "./build/lib/index.d.ts",
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"@types/teen_process": "^2.0.2",
|
|
69
69
|
"@typescript-eslint/eslint-plugin": "^6.9.0",
|
|
70
70
|
"@typescript-eslint/parser": "^6.9.0",
|
|
71
|
-
"appium-adb": "^
|
|
71
|
+
"appium-adb": "^12.0.0",
|
|
72
72
|
"chai": "^4.1.2",
|
|
73
73
|
"chai-as-promised": "^7.1.1",
|
|
74
74
|
"conventional-changelog-conventionalcommits": "^7.0.1",
|