Some time back, we've received feedback from a user stating that they could use our browser extension in mobile using the Yandex browser and gave some feedback about usability. We don't develop for mobile, but when we found out it was possible, we improved our import/export flow to allow users to quickly load in a JSON file with many configurations and operate with the app while mocking requests with tweak. Let's look at how to achieve it.
Here's a small demonstration.
First, you'll want to open the extension as you usually do in a desktop browser and set up the extension. We'll set up the two requests you see in the extension to mock data in our example application.
Now that we've set up the extension, we'll use the export functionality to get a JSON file containing the current configurations, including all the mocks, to import it into our mobile browser. Now we need to find a way to send the file to the mobile device (we can use some cloud storage such as google docs, dropbox, or similar to share this file).
The Yandex browser allows you to install extensions from the Chrome store. That's what we'll do. Let's go over the tweak Chrome storage page and hit the install button. Notice in the below screenshot, the extension can be seen in the inferior part of the Yandex browser.
Now we import our file in the Yandex browser. We open the extension and hit the import link in the empty state screen. First we import it.
Once the configuration is successful, you'll be able to see the success notification in the extension icon, and you'll find your tweak configurations inside the extension.
Now we activate the extension, observe the extension taking effect on the page while interacting with the web app, and apply the mocks for intercepted HTTP requests.
We did a short tutorial on how to use our extension in the Yandex Android browser. We don't hope this to become a many-use case; anyways, we tough it would be relevant to document it in our blog.
If you liked this article, consider sharing (tweeting) it to your followers.