Hasan Xorasani
Hasan Xorasani

Reputation: 11

How to access KaiOS native contacts data

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?

Upvotes: 1

Views: 227

Answers (1)

hc_dev
hc_dev

Reputation: 9418

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:

Upvotes: 0

Related Questions