'디바이스정보출력'에 해당되는 글 1건

react-native-device-info ReactNative에서 디바이스에 정보를 출력하는 네이티브 라이브러리 이다. 


[Installation] 
npm install --save react-native-device-info


[Linking]

 react-native link react-native-device-info



react-native-device-info를 사용하여 디바이스 정보를 출력해보자 


import DeviceInfo from 'react-native-device-info';


_DeviceInfo() {
console.log("DeviceInfo.getApplicationName : "+DeviceInfo.getApplicationName());
console.log("DeviceInfo.getBrand : "+DeviceInfo.getBrand());
console.log("DeviceInfo.getBrand : "+DeviceInfo.getBrand());
console.log("DeviceInfo.getBuildNumber : "+DeviceInfo.getBuildNumber());
console.log("DeviceInfo.getDeviceCountry : "+ DeviceInfo.getDeviceCountry());
console.log("getDeviceLocale : "+DeviceInfo.getDeviceLocale());
}





더 자세한 내용은 https://github.com/rebeccahughes/react-native-device-info 참고하자

블로그 이미지

클라인STR

,