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?

GopherGopher
  • 376
  • 1
  • 2
  • 16

1 Answers1

0

You can use react-native-device-info package

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

Majid Lotfinia
  • 646
  • 11
  • 28
  • 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. – GopherGopher 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