# Remote logs on TVs (using X-ray)

X-ray allows troubleshooting of TV apps, retrieving and exporting logs, and sending them to cloud-based log management system logz.io. Remote logging can only be enabled in debug versions for security reasons.

#### To establish a connection between a version and X-ray, please follow these steps.

- Add X-ray plugin to your version. After adding the plugin a new build is required.

![](./x-ray-androidtv/group_7.png)
- Create a pin code, by choosing the `troubleshooting` option in Zapp located next to the application version and then click on `generate PIN`. Please note that this PIN is valid for 30 min. 

![](./x-ray-androidtv/troubleshooting_zapp.png)

- Input the pin code on the appropriate device. Please refer to the instructions below for each platform.

### Android TV / Fire TV

To enable remote logging on Android and Fire TVs, it is required to install Applicaster companion app, which is a separate application and can can be downloaded from [here](https://drive.google.com/file/d/1y_O2Sio65cqjhgkRHIFyL-bdyTowu09s/view?usp=share_link). Here's how you can [sideload to Android TV and Amazon Fire TV](https://docs.applicaster.com/using-zapp/versions-and-plugins/app-versions#side-load-to-android-tv-and-amazon-fire-tv) 

Once the companion app and your app are installed on the device, open the companion app and press the X-ray button next to your app.

![](./x-ray-androidtv/choose_xray.png)

Navigate to the left and locate the Logging tab where you can enable Zapp troubleshooting as shown below. 

![](./x-ray-androidtv/enable_zapp.png)

In a pop-up window enter the PIN generated in Zapp and hit OK. A new pop up message will appear asking to enable remote logging. Press Ok.

![](./x-ray-androidtv/enabled.png)

From this moment remote logs will be sent directly to logz.io

### LG and Samsung

To input the PIN on your LG or Samsung application, you need to execute a series of button presses on your device's remote control:

Enter `Up`, `Up`, `Down`, `Down`, `Left`, `Right`, `Left`, `Right`

In a pop-up window enter the PIN generated in Zapp and hit OK:

![](./x-ray-androidtv/pin_lg.png)

### tvOS

To input the PIN on your Apple TV application, please follow the steps below:

Access the plugin configuration for the app version and enable remote events logging under "Experimental" section:

![](./x-ray-androidtv/remote_events.png)

Find your application in tvOS general settings of your device and enable the remote event logging feature:

![](./x-ray-androidtv/enable_tvos.png)

Open your application and input the PIN that was generated in Zapp into the corresponding field:

![](./x-ray-androidtv/tvos_pin.png)

### Roku 

To input the PIN on your Roku TV application, please follow the steps below:

Access the plugin configuration for the app version and enable Xray logging. 

![](./x-ray-androidtv/xray_roku_config.png)

Launch your application and press the (*) button on a Roku remote control ten times within a five-second window. The dialog menu to enter PIN will appear.

![](./x-ray-androidtv/roku1.png)

Continue following the instructions on the screen until the message confirms successful Xray login.

![](./x-ray-androidtv/roku2.png)
