1

I'm making an android app with python. I made an authentication server which receives phone's status (serial number, phone number...) and compares it with another server to figure out if the user purchased this app or not.

At this point I've got a problem. I can't find the way how to extract phone number with python made app.

What I figured out is there's a function called 'TelephonyManager' which works in java.

TelephonyManager telephony = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE)

Isn't there any module or function in Python to replace that?

Hussein El Feky
  • 6,627
  • 5
  • 44
  • 57
3cm
  • 21
  • 2

1 Answers1

0

If you use Python under SL4A:

 import android
 droid = android.Android()
 print droid.getLine1Number().result

However, as in Java this might not work depending on SIM card. See TelephonyManager.getLine1Number() failing?

Community
  • 1
  • 1
headuck
  • 2,763
  • 16
  • 19