Is there an API to find Device ID for Samsung TV in Tizen for React Native apps?

778 views Asked by At

I'm trying to build a Tizen app in a React Native framework. One concern is to find the device id (whether physical tv or an emulator).

Consider the below code snippet:

class Home extends React.Component {
    constructor() {
        super();
    }

    render() {
        return (
              <Text style={styles.textH3}>
                     {`platform: ${deviceId}`}  //How can I show deviceId here? Or device-specific info?
              </Text>
        )
    }
}
export default Home;

Any idea how to get the deviceId (something like its UUID) in the above snippet, from the Tizen SDK?

1

There are 1 answers

2
Majid Lotfinia On

You can use react-native-device-info package

This package has DeviceInfo.getDeviceId() method for getting running device Id