1

I've tried to access the contacts data store using a worker, it worked but it returns 0 data stores when I do:

navigator.getDataStores('contacts')

Does the native KaiOS contacts app even use a data store? How do I access the native contacts data in my app?

Penny Liu
  • 15,447
  • 5
  • 79
  • 98

1 Answers1

0

Datastore on FirefoxOS

The navigator.getDataStores('contacts') seems only supported on Firefox OS for Desktop, not on the version for Mobiles (Gecko), see the docs. If supported it would return a Promise and not 0.

How to use mozContacts

You can access the contacts using navigator.mozContacts. This instance supports methods find(searchOptions, callback), getAll(callback) and save(contact, callback).

See also:

hc_dev
  • 8,389
  • 1
  • 26
  • 38