Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4362: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4364: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4365: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4366: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
anddev.org • View topic - getLine1Number() returns null

getLine1Number() returns null

Put your problem here if it does not fit any of the other categories.

getLine1Number() returns null

Postby burakkilic » Sat Dec 05, 2009 6:22 pm

Hi. I give READ_PHONE_STATE permission and trying to get my phone number with

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. public String getMyPhoneNumber(){
  2.  
  3.                 TelephonyManager telephonyManager;  
  4.  
  5.                 telephonyManager = (TelephonyManager)getSystemService(Context.TELEPHONY_SERVICE);  
  6.  
  7.                 return telephonyManager.getLine1Number();  
  8.  
  9.         }
  10.  
  11.  
Parsed in 0.014 seconds, using GeSHi 1.0.8.4

but I receive null. Where am I wrong?
burakkilic
Developer
Developer
 
Posts: 37
Joined: Thu Oct 01, 2009 10:24 am

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 21 guests