JuvoLogger.Udp allows JuvoPlayer log capture via UDP. UDP log capture can be used on devices and emulators which do not provide access to console log functionality. When enabled, JuvoPlayer console log is not available. Usage of UDP logger does require application repacking after modification of configuration file:
juvo-player/Configuration/res/logger.config
Enabling UDP Logger:
- Enable UDP logging by removing comments from UdpLogger section and specifying listen Port value. Provided example uses Port 2222.
[LogLevel]
JuvoPlayer=Info
; Uncomment UdpLogger section and provide listening Port value to enable UDP logging.
;
[UdpLogger]
Port=2222
- In order to connect to a host device, use any UDP client software, e.g. ncat (https://nmap.org/ncat/).
- Connect to UDP Logger from a client PC using following console command:
ncat -u <IP of device> <Port>
Upon connection, send any data to JuvoPlayer to initialize logging service. If ncat is used, simply press enter key. If everything is working fine, following information should be received by client:
****************************
* JuvoPlayer UDP logger *
* *
* 1 UDP packet to: *
* - stop output *
* logs will be dropped *
* - start output *
* - hijack connection *
****************************
* Started *
****************************
It is possible to launch and work on the JuvoReactNative GUI using facebook 'hot module reloading' engine (https://facebook.github.io/react-native/blog/2016/03/24/introducing-hot-reloading.html). To configure it follow the guide below:
- Launch Tizen TV emulator or start physical TV unit.
- Type
yarn bundle --dev
command from the JuvoReactNative folder level. - Delete the redundant assets folder (see the 'Setup instructions' section).
- Switch to 'Debug' build mode of JuvoReactNative project.
- Start build (using MS Visual Studio)
- Type command
npm run server
- Launch the application. You may use PC ctrl+F5 keys in MS Visual Studio or TV remote control keys. The latter case does make sense only in the TV set or TV emulator menu if the former (PC) launching have happened at least once.
- Press 'red' button on the remote control to open the configuration menu. Select (one by one) the 'Enable hot module reloading', 'Enable live reload', 'Set host ip' (enter the IP address of Your host PC - in emulator case it's usually 10.0.2.2) and 'Reload JavaScript' options. Each option selection closes the menu, so You need to reopen it with the 'red' button on the remote controller per option.
There is one more item: 'Start JS Remote debugging' with Chrome on the host PC. Selecting it from the menu triggers the application's button press event, so working with it may be confusing.
From now on You can modify JavaScript part of the application code and see the update result right after saving it on the PC.
HotReload allows updating xaml elements in real time. It is enabled by default in Debug mode.
-
Install HotReload extension corresponding to your IDE:
JetBrains Rider: File -> Settings -> Plugins (pick "Marketplace" tab) -> search by "HotReload".
Visual Studio for WINDOWS: Extensions -> Manage Extension -> search by "HotReload" -> Install extension and restart IDE Tools -> Customize... -> Check box next to "Xamarin.Forms Hot Reload"
-
Click "Enable Xamarin.Forms Hot Reload" button.
-
Install and run the XamarinPlayer app in Debug configuration.
-
Launch Tizen TV emulator.
-
Set the port redirection in 'Emulator control panel->Network' menu:
- Source (Local host) port = 8000
- to destination (10.0.2.15) port = 8000
Step 2. needs to be repeated every time the TV emulator reboots.
-
Follow all the steps in Setup section
-
Cannot see extension buttons in Visual Studio
Visual Studio Installer -> More -> Modify -> Workloads -> Install "Visual Studio extensions development"
-
HotReload plugin doesn't work for JetBrains Rider
Check https://github.com/AndreiMisiukevich/HotReload/blob/master/Extension/Xamarin.Forms.HotReload.Extension.Rider/gradle.properties to see if your Rider version is currently supported.
-
Useful for troubleshooting
Download https://github.com/AndreiMisiukevich/HotReload and manually launch the Xamarin.Forms.HotReload.Observer app.