commit | b8c7be8f07c7bec553177ebffb88d0ed058079cb | [log] [tgz] |
---|---|---|
author | Alexander Dorokhine <adorokhine@google.com> | Wed Dec 14 18:02:24 2016 -0800 |
committer | adorokhine <adorokhine@google.com> | Wed Dec 14 18:19:36 2016 -0800 |
tree | a87ba71b26e58366c35a6a91891e54fc60509e0e | |
parent | e015bd31a28efe6c04b9f2d691b0eaba9d823f8e [diff] |
Fix handling of closeSl4aSession by writing an empty RPC result. Without this change, calling closeSl4aSession always gave an error because the socket would be torn down without any response being received. Not an issue with upstream sl4a because there is an RPC to implement closeSl4aSession() which produces its own result.
Mobly Snippet Lib is a library for triggering device-side code from host-side Mobly tests. This tutorial teaches you how to use the snippet lib to trigger custom device-side actions.
Note: Mobly and the snippet lib are not official Google products.
The Mobly Snippet Lib allows you to write Java methods that run on Android devices, and trigger the methods from inside a Mobly test case. The Java methods invoked this way are called snippets
.
The snippet
code can either be written in its own standalone apk, or as a product flavor of an existing apk. This allows you to write snippets that instrument or automate another app.
Under the hood, the snippet lib starts a web server which listens for requests to trigger snippets. It locates the corrsponding methods by reflection, runs them, and returns results over the tcp socket. All common built-in variable types are supported as arguments.
The examples/ folder contains examples of how to use the mobly snippet lib along with detailed tutorials.