UNPKG

hcmobile-sdk

Version:

mobile-sdk

111 lines (107 loc) 3.68 kB
//import liraries import React, { Component } from 'react'; import { ScrollView, StyleSheet } from 'react-native'; import RowLayout from '../rowLayout/index'; import DeviceInfo from './index'; // create a component class DeviceInfoDemo extends Component { render() { return ( <ScrollView style={styles.container}> <RowLayout tag = {'getAPILevel()'} lineColor = '#999' content = {DeviceInfo.getAPILevel()} showArrow /> <RowLayout tag = {'getDeviceId()'} lineColor = '#999' content = {DeviceInfo.getDeviceId()} showArrow /> <RowLayout tag = {'getApplicationName()'} lineColor = '#999' content = {DeviceInfo.getApplicationName()} showArrow /> <RowLayout tag = {'getDeviceName()'} lineColor = '#999' content = {DeviceInfo.getDeviceName()} showArrow /> <RowLayout tag = {'getSystemName()'} lineColor = '#999' content = {DeviceInfo.getSystemName()} showArrow /> <RowLayout tag = {'getSystemVersion()'} lineColor = '#999' content = {DeviceInfo.getSystemVersion()} showArrow /> <RowLayout tag = {'getVersion()'} lineColor = '#999' content = {DeviceInfo.getVersion()} showArrow /> <RowLayout tag = {'getBrand()'} lineColor = '#999' content = {DeviceInfo.getBrand()} showArrow /> <RowLayout tag = {'getUniqueID()'} lineColor = '#999' content = {DeviceInfo.getUniqueID()} showArrow /> <RowLayout tag = {'isEmulator()'} lineColor = '#999' content = {DeviceInfo.isEmulator()? 'true' : 'false'} showArrow /> <RowLayout tag = {'getDeviceCountry()'} lineColor = '#999' content = {DeviceInfo.getDeviceCountry()} showArrow /> <RowLayout tag = {'getFontScale()'} lineColor = '#999' content = {DeviceInfo.getFontScale() + ''} showArrow /> <RowLayout tag = {'getModel()'} lineColor = '#999' content = {DeviceInfo.getModel() + ''} showArrow /> <RowLayout tag = {'isIphoneX()'} lineColor = '#999' content = {DeviceInfo.isIphoneX() + ''} showArrow /> </ScrollView> ); } } // define your styles const styles = StyleSheet.create({ container: { flex: 1, backgroundColor: 'white', }, }); //make this component available to the app export default DeviceInfoDemo;