Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement SQLite-based image loader for Android #245

Open
andymatuschak opened this issue Oct 31, 2021 · 0 comments
Open

Implement SQLite-based image loader for Android #245

andymatuschak opened this issue Oct 31, 2021 · 0 comments
Labels
📍 Android Platform-specific: Android 🗂 Enhancement Type: New features, improvements to the product 🚩 Help wanted Particularly amenable/appropriate for contributors

Comments

@andymatuschak
Copy link
Owner

We store attachments as BLOBs along with prompts in a flat-file SQLite database (see #243). To display them at runtime, we render an <Image> which points to a special x-orbit-sqlattachment:// URL. We then implement an RCTImageURLLoader (on iOS) to resolve that URL by fetching the BLOB from the database: see ORSQLImageURLLoader.

We need to implement the equivalent image URL loader on Android.

To test:

  1. yarn dev in backend
  2. yarn web in app
  3. yarn dev in web-component
  4. Visit http://localhost:5000, review the prompts in the second review area (which include attachments) by marking them as forgotten (i.e. so that they're due immediately).
  5. yarn android, sign in as test@test.com / testtest. You should see the attachments as expected.
@andymatuschak andymatuschak added 🚩 Help wanted Particularly amenable/appropriate for contributors 📍 Android Platform-specific: Android 🗂 Enhancement Type: New features, improvements to the product labels Oct 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📍 Android Platform-specific: Android 🗂 Enhancement Type: New features, improvements to the product 🚩 Help wanted Particularly amenable/appropriate for contributors
Projects
None yet
Development

No branches or pull requests

1 participant