vieuxcarre44 / android-scripting

Automatically exported from code.google.com/p/android-scripting
0 stars 0 forks source link

contactsGet (from python) does not return correct phone number, email address, etc #357

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
  Start ASE public server on the Android device.
  From desktop computer, run this code:
    import android
    d = android.Android(addr=('192.168.3.24', '33068'))
    res = d.contactsGet()
    contacts = res[1]
    print contacts[0]

What is the expected output? What do you see instead?

  Expected output is:
        {u'primary_email': u'2111', u'_id': u'2489', u'type': u'2', u'name': u'John Smith', u'primary_phone': u'6082666742'}

  Output seen is:
        {u'primary_email': u'john.smith@gmail.com', u'_id': u'2489', u'type': u'2', u'name': u'John Smith', u'primary_phone': u'1867'}

Basically, the primary_email, primary_phone and a bunch of other fields are 
returning 4-digit numbers instead of actual values.

What version of the product are you using? On what operating system?
  I am running ASE r25, and python_r7 I'm seeing this problem on an HTC Hero, running Android 1.5. Using

Please provide any additional information below.
  If someone can point out where I should look for this bug, I can try fixing this myself. Thanks.

Original issue reported on code.google.com by navin.ka...@gmail.com on 23 Jun 2010 at 12:40

GoogleCodeExporter commented 9 years ago
Yes, am aware of that. During my testing on emulator, results were different. 
Am waiting for Damon to accept this...

Original comment by MeanEYE.rcf on 23 Jun 2010 at 3:39

GoogleCodeExporter commented 9 years ago
Sorry, I got the expected output and real output a little mixed up. It should 
be:

Expected output is:
        {u'primary_email': u'john.smith@gmail.com', u'_id': u'2489', u'type': u'2', u'name': u'John Smith', u'primary_phone': u'6082666742'}

  Output seen is:
        {u'primary_email': u'2111', u'_id': u'2489', u'type': u'2', u'name': u'John Smith', u'primary_phone': u'1867'}

Original comment by navin.ka...@gmail.com on 24 Jun 2010 at 2:27

GoogleCodeExporter commented 9 years ago
Hello, I get the same error as the original poster. My phone is HTC Wildfire.

Original comment by deformac...@gmail.com on 11 Aug 2011 at 1:12

GoogleCodeExporter commented 9 years ago
I get similar behavior as original poster with Samsung Galaxy SII using sl4a-r5 
and python 2.6.2.  Another strange issue is that it will only return 3 results 
in total (when there are a lot more than 3 contacts on the phone!)

a = android.Android()
c = a.getContacts()
for con in c.result:
  print con

Also, will this function return both contacts that are saved on the sim card 
and the phone?

Original comment by etol...@gmail.com on 11 Apr 2012 at 3:22