question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

getPhoneNumber() undefined

See original GitHub issue

is it possible to get phone number in Android?

dumping object, it doesn’t have getPhoneNumber method

I/ReactNativeJS(31439): 'DEBUG', { getUniqueID: [Function: getUniqueID],
I/ReactNativeJS(31439):   getInstanceID: [Function: getInstanceID],
I/ReactNativeJS(31439):   getDeviceId: [Function: getDeviceId],
I/ReactNativeJS(31439):   getManufacturer: [Function: getManufacturer],
I/ReactNativeJS(31439):   getModel: [Function: getModel],
I/ReactNativeJS(31439):   getBrand: [Function: getBrand],
I/ReactNativeJS(31439):   getSystemName: [Function: getSystemName],
I/ReactNativeJS(31439):   getSystemVersion: [Function: getSystemVersion],
I/ReactNativeJS(31439):   getBundleId: [Function: getBundleId],
I/ReactNativeJS(31439):   getBuildNumber: [Function: getBuildNumber],
I/ReactNativeJS(31439):   getVersion: [Function: getVersion],
I/ReactNativeJS(31439):   getReadableVersion: [Function: getReadableVersion],
I/ReactNativeJS(31439):   getDeviceName: [Function: getDeviceName],
I/ReactNativeJS(31439):   getUserAgent: [Function: getUserAgent],
I/ReactNativeJS(31439):   getDeviceLocale: [Function: getDeviceLocale],
I/ReactNativeJS(31439):   getDeviceCountry: [Function: getDeviceCountry],
I/ReactNativeJS(31439):   getTimezone: [Function: getTimezone],
I/ReactNativeJS(31439):   isEmulator: [Function: isEmulator],
I/ReactNativeJS(31439):   isTablet: [Function: isTablet],
I/ReactNativeJS(31439):   isPinOrFingerprintSet: [Function: isPinOrFingerprintSet] }

or am I doing it wrong?

Thank you

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:3
  • Comments:10

github_iconTop GitHub Comments

3reactions
GantMancommented, Oct 1, 2017

Awaiting 1 last feature and shipping

0reactions
machourcommented, Feb 4, 2018

This orignal issue was fixed in 0.12.0

Read more comments on GitHub >

github_iconTop Results From Across the Web

getPhoneNumber() undefined · Issue #223 · react-native ...
I'm on 0.13.0 and my RN Android DeviceInfo.getPhoneNumber() returned "undefined" as well. It looks to me it hasn't been implemented yet. Is that ......
Read more >
react-native-device-info getPhoneNumber return null
getPhoneNumber() for getphonenumber,but it return nothing, when i goto the deviceinfo.d.ts find getPhoneNumber() undefined, ...
Read more >
react-native-device-info - npm
getPhoneNumber(), Promise<string>, ❌, ✓, ❌, ❌ ... This can return undefined in certain cases and should not be relied on.
Read more >
getPhoneNumber返回undefined - 微信开放社区- 腾讯
getPhoneNumber : function (e) {//点击获取手机号码按钮. var that = this;. wx.checkSession({. success: function () {. console.log(e.detail.
Read more >
Example to Get Device Information in React Native
Device Information using React Native App ; getModel(), string, ✓ ? ; getPhoneNumber(), string, ❌, ✓, 0.12.0.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found