2

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?

Manan Shah
  • 346
  • 2
  • 11

1 Answers1

0

You can use react-native-device-info package

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

Majid lotfinia
  • 434
  • 8
  • 24
  • Thanks, but isn't that similar to the model number? Apologies for not being specific enough, but I'm looking for something that uniquely identifies the device, a la `UUID` or something like that. – Manan Shah Sep 03 '19 at 06:34
  • what is about other methods in this package? like https://github.com/react-native-community/react-native-device-info#getserialnumber – Majid lotfinia Sep 03 '19 at 06:41