Over a million developers have joined DZone.

Popup Dialog For Phonebook Number

·
A minimal example to let you choose from you mobile phonebook.

import contacts, appuifw
db = contacts.open()
names = []
numbers = []
for i in db:
  names.append(db[i].title)
  num = db[i].find('mobile_number')
  if num:
    numbers.append(num[0].value) # first mobile
  else:
    numbers.append(None)

i = appuifw.selection_list(names)
print 'number =', numbers[i]
Topics:

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}