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

Download images from external platform #129

Closed
Tracked by #191
jo-elimu opened this issue Dec 1, 2024 · 0 comments · Fixed by #130
Closed
Tracked by #191

Download images from external platform #129

jo-elimu opened this issue Dec 1, 2024 · 0 comments · Fixed by #130
Assignees
Labels
bug Something isn't working

Comments

@jo-elimu
Copy link
Member

jo-elimu commented Dec 1, 2024

Description

Update the URLs used for downloading the image files.

Why?

The current version expects the download URL to start with *.elimu.ai, so the app crashes when an image is stored on an external platform:

2024-12-01 17:01:49.593 11429-11548 ai.elimu.c...Fragment$3 ai.elimu.content_provider.debug      I  imageGson.getId(): 651
2024-12-01 17:01:49.674 11429-11548 ai.elimu.c...Fragment$3 ai.elimu.content_provider.debug      I  imageFile: /storage/emulated/0/Android/data/ai.elimu.content_provider.debug/files/Pictures/651_r6.jpg
2024-12-01 17:01:49.675 11429-11548 ai.elimu.c...Fragment$3 ai.elimu.content_provider.debug      I  imageFile.exists(): false
2024-12-01 17:01:49.675 11429-11548 ai.elimu.c...Fragment$3 ai.elimu.content_provider.debug      I  downloadUrl: http://eng.elimu.aihttps://black-historic-wren-832.mypinata.cloud/ipfs/QmU5gAfySsHNE8WDW85zb6rdgo2rbn15eTrhBL3DoHB3m7?img-width=640
2024-12-01 17:01:49.676 11429-11548 ai.elimu.c...Downloader ai.elimu.content_provider.debug      I  downloadFileBytes
2024-12-01 17:01:49.676 11429-11548 ai.elimu.c...Downloader ai.elimu.content_provider.debug      I  Downloading from http://eng.elimu.aihttps://black-historic-wren-832.mypinata.cloud/ipfs/QmU5gAfySsHNE8WDW85zb6rdgo2rbn15eTrhBL3DoHB3m7?img-width=640
2024-12-01 17:01:49.717 11429-11445 EGL_emulation           ai.elimu.content_provider.debug      D  app_time_stats: avg=9.57ms min=3.20ms max=25.12ms count=60
2024-12-01 17:01:49.722 11429-11548 ai.elimu.c...Downloader ai.elimu.content_provider.debug      E  null
2024-12-01 17:01:49.727 11429-11548 AndroidRuntime          ai.elimu.content_provider.debug      E  FATAL EXCEPTION: pool-7-thread-1
                                                                                                    Process: ai.elimu.content_provider.debug, PID: 11429
                                                                                                    java.lang.NullPointerException: Attempt to get length of null array
                                                                                                    	at ai.elimu.content_provider.ui.image.ImagesFragment$3.run(ImagesFragment.java:153)
@jo-elimu jo-elimu added the bug Something isn't working label Dec 1, 2024
@jo-elimu jo-elimu self-assigned this Dec 1, 2024
jo-elimu added a commit that referenced this issue Dec 1, 2024
@jo-elimu jo-elimu linked a pull request Dec 1, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant