Android

To test your code and see a preview of the card on an Android device, use the DivKit Playground app. You can add the card code in JSON format to the app or open a link to it:

  1. Install the DivKit Playground app.

  2. Select demo.

  3. Add a card using one of the following methods:

    • Insert the code in JSON format or a link to the card prototype in the input field.
    • Open the link from the DivKit Web Playground editor.
    • Select the file in JSON format on the device.

    Tip

    To create a card code, you can use the DivKit Web Playground sample library.

  4. To view the result, click show the result.

View the result on a remote device

The DivView internal service for viewing HTML card previews is available for Yandex staff employees. With DivView, you can display a card preview remotely on an Android mobile device from Yandex Kolhoz:

  1. Go to DivView.

  2. In the input field, insert the code of the card prototype in JSON format.

    Tip

    To use ready-made samples, in the upper right part of the page, click Samples and select an item from the library. You can edit and refine the samples.

  3. Click + Android Kolhoz. If you haven't worked in Yandex Kolhoz yet, confirm logging in in the window that appears.
    Learn more about Yandex Kolhoz.

  4. The Android device available to you will be automatically booked for 1 hour. Its name will be displayed in DivView next to the + Android Kolhoz button.

  5. The card preview will be displayed in DivView in the center of the page. During the demonstration, the preview will also be displayed on the device in Yandex Kolhoz.

  6. The card structure is displayed in DivView on the right side of the page. If there are errors in the code, they will be displayed in the Errors section under the card preview.

Learn more

Follow DivKit news in the Telegram channel: http://t.me/divkit_news

You can also discuss topics of interest in the DivKit user community in Telegram: https://t.me/divkit_community_ru

DivKit Repository

Previous
Next