Incorrect behavior with TvEventHandler


:backhand_index_pointing_right: Bug Description


1. Summary

When I use the TVEventHandler I can determine a long press on the DPAD but I can no longer determine the long press for the skip_forward and skip_backward events.

App Name: RaiPlay

Bug Severity
Select one that applies

  • Impacts operation of app
  • Blocks current development
  • Improvement suggestion
  • Issue with documentation (If selected, please share the doc link and describe the issue)
  • Other

2. Steps to Reproduce

  1. Playing VOD content
  2. Make a long press for skip_forward or skip_backward

3. Observed Behavior

I get one event with eventKeyAction = 0 and one with eventKeyAction = 1 despite the fact that the remote control button was not released

4. Expected Behavior

Describe what you expected the SDK to do under normal operation.

I get a number n of events with eventKeyAction = 0 until I release the button and then find the event with eventKeyAction = 1

4.a Possible Root Cause & Temporary Workaround

Fill out anything you have tried. If you don’t know, N/A is acceptable

Until two weeks ago the behavior was correct, now I find it like this without having made changes to the application code, currently we have no workaround on this

5. Logs or crash report

(Please make sure to provide relevant logs as attachment and share VPKG file with your Amazon contact)

Currently we have no relevant logs to send you, if you need specific logs they will be provided to you

6. Environment

Please fill out the fields related to your bug below:

  • SDK Version: 0.20.2975
  • App State: Foreground
  • OS Information
    Please ssh into the device via kepler exec vda shelland copy the output from cat /etc/os-releaseinto the answer section below. Note, if you don’t have a simulator running or device attached kepler exec vda shell will respond with vda: no devices/emulators found
NAME="OS" 
OE_VERSION="4.0.0"
OS_MAJOR_VERSION="1"
OS_MINOR_VERSION="1"
RELEASE_ID="2"
OS_VERSION="1.1"
BRANCH_CODE="VegaMainlineTvIntegration"
BUILD_DESC="OS 1.1 (VegaMainlineTvIntegration/4380)"
BUILD_FINGERPRINT="4.0.128562.0(3072cab629675a74)/4380N:user-external/release-keys"
BUILD_VARIANT="user-external"
BUILD_TAGS="release-keys"
BUILD_DATE="Sun Jul 06 03:28:43 UTC 2025"
BUILD_TIMESTAMP="1751772523"
VERSION_NUMBER="201010438050"

:backhand_index_pointing_right: Additional Context


Any Additional Context you would like to provide?
Add any other relevant information, such as recent updates to the SDK, dependencies, or device OS that may affect the bug.

The behavior is incorrect based on what is described in this guide:
Using TvEventHandler

Hi @Dev_Rai,

Thank you for reporting this issue. We will request the concerned team to investigate this issue and let you know when there is an update.

Meanwhile, you may check out the recent OS & SDK updates posted here and let us know if you are experiencing same issue after updating.

Regards,
Siva

Hi @Dev_Rai ,

We haven’t heard back from you.

If this is still an issue, please provide us with logs and share the vpkg with your Amazon POC.

Thanks,
Rohit

Hi @Dev_Rai,

I have tried below code and notice that eventKeyAction is available as expected. Kindly try below code after updating to latest SDK release. If the issue still exists, please share above requested details via your Amazon contact.

import React, { useState, useEffect } from 'react';
import { Text, TouchableOpacity, View, ScrollView } from 'react-native';
import { useTVEventHandler } from '@amzn/react-native-kepler';

export const App = () => {
    const [eventLogs, setEventLogs] = useState<string[]>([]);

    const myTVEventHandler = (evt: any) => {
        const now = new Date();
        const timestamp = now.toISOString().slice(0, 23).replace('T', ' ');
        const logEntry = `${timestamp} - Type: ${evt.eventType}, Action: ${evt.eventKeyAction}`;
        
        setEventLogs(prevLogs => [logEntry, ...prevLogs.slice(0, 99)]);  // Keep last 100 events
    };

    useTVEventHandler(myTVEventHandler);

    return (
        <View style={{ flex: 1, padding: 20 }}>
            <Text style={{ color: 'red', fontSize: 24, marginBottom: 20 }}>
                TV Event Logger: Type and Action (0: Pressed, 1: Released) with Timestamp
            </Text>
            <ScrollView style={{ flex: 1, borderWidth: 1, borderColor: 'gray', padding: 10 }}>
                {eventLogs.map((log, index) => (
                    <Text key={index} style={{ color: 'white', fontSize: 14, marginBottom: 5 }}>{log}</Text>
                ))}
            </ScrollView>
        </View>
    );
};

Regards,
Siva