question

Amar avatar image
Amar asked ·

Get Data using ContentResolver

@Jeffrey Blattman
Can we use ContentResolver to access inventory and order data?
If Possible then How?
Is there any permission to add in manifest for that?
1) Actually I am using observer for Inventory and order change, what is happening I am getting different response on same action.Like: not getting item when update item sometimes it works ?
2) Observer for that is called multiple time on item creation/edit?
3) For getting data on new entry in item URI will be with account info or without it ?
Clover MiniClover Station
10 |2000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

Jeffrey Blattman avatar image
Jeffrey Blattman answered ·
Yes, there's an OrderContract and InventoryContract in the SDK that defines the accessible URIs and database schema. No there's no Android permission required. You do however need the appropriate Clover app permission (orders read, inventory read).

1. You'll need to provide more information. Please read this: https://community.clover.com/page/asking-questions... to help.

2. Yes that's a common issue w/ ContentObservers. Please refer to this answer: https://clover.cloud.answerhub.com/questions/9808/... for a way to handle that.

3. Both of the mentioned contracts require the account. See the methods contentUriWithAccount() in the contract class.
Share
10 |2000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community