-1

is there no way to read serial number using expo. I should be able to read using external packages like react-native-device-info but I can’t do this without expo? because when i install this package i get this and similar errors. I tried react-native link solution but it didn't work. I need to use expo for other reasons so I can't eject it. There is no part in expo device and constants where I can read these properties.

hamdi
  • 67
  • 2
  • 10

1 Answers1

0

react-native-device-info depends on platform-specific native modules which will not link and compiled with the Expo Go client.

Expo SDK provides a compatible alternative package to use with Expo Go Client - https://docs.expo.dev/versions/latest/sdk/device/

Fiston Emmanuel
  • 4,242
  • 1
  • 8
  • 14
  • I already said that I tried expo device. I couldn't find a solution where I can read the serial number. – hamdi Sep 06 '22 at 17:23
  • The Expo team has not provided it due no iOS API for It. on Android you need READ_PHONE_STATE which too dangerous permission. You will need to convince Google Play review team why your app require that permission before app get published. – Fiston Emmanuel Sep 06 '22 at 18:56
  • Serial Number is private information which not reliable to provide for any random app need it – Fiston Emmanuel Sep 06 '22 at 18:57