question

sunisha avatar image
sunisha asked sunisha commented

How we can add extra fields and images in inventory?

  1. How we can associate items with images and other arbitrary data?
  2. How we get data from an external database etc..
10 |2000

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 sunisha commented

for #1, we do not support arbitrary extension of the inventory schema, however, you can keep a mapping from the inventory item's ID (UUID) to whatever meta data you wish.

For #2, I don't understand your question. Can you elaborate? You can use standard Android / Java networking to access a cloud-based DB, or you can use sqlite to store a local DB on the device.

2 comments
10 |2000

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

sunisha avatar image sunisha commented ·

for #1, Am getting items from Inventory.But i need to add other extra field such as calorie and allergen.So how can i keep a mapping from the inventory's ID to item calorie and allergen?

0 Likes 0 ·
Jeffrey Blattman avatar image Jeffrey Blattman ♦♦ commented ·

I answered in another post. It's up to how you want to code it. It's a general data storage issue. Your best bet probably would be to use a local sqlite DB, if you only need the information on that device. If you need the same information x-device, you'll need to host a web service that can fetch and set the values, and sync them down to each device.

0 Likes 0 ·

Welcome to the
Clover Developer Community