sl4a
sl4a copied to clipboard
contactsGet (from python) does not return correct phone number, email address, etc
From @GoogleCodeExporter on May 31, 2015 11:26
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'[email protected]', 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 [email protected]
on 23 Jun 2010 at 12:40
Copied from original issue: damonkohler/android-scripting#357
From @GoogleCodeExporter on May 31, 2015 11:26
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
From @GoogleCodeExporter on May 31, 2015 11:26
Sorry, I got the expected output and real output a little mixed up. It should
be:
Expected output is:
{u'primary_email': u'[email protected]', 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 [email protected]
on 24 Jun 2010 at 2:27
From @GoogleCodeExporter on May 31, 2015 11:26
Hello, I get the same error as the original poster. My phone is HTC Wildfire.
Original comment by [email protected]
on 11 Aug 2011 at 1:12
From @GoogleCodeExporter on May 31, 2015 11:26
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 [email protected]
on 11 Apr 2012 at 3:22