apps-android-commons icon indicating copy to clipboard operation
apps-android-commons copied to clipboard

[Bug]: Displaying a non-image file in full screen doesn't work

Open PetitPotiron opened this issue 1 year ago • 15 comments

Summary

When trying to display a video in full screen, it doesn't work and the screen stays black. It's not because it's loading, because the loader "thing" disappeared, and the status bar at the bottom has been completed too. So I'm pretty sure the video was loaded but the app fails to display it. So it's impossible to view videos with the app, because the only thing we cans see is a thumbnail on the file page.

Steps to reproduce

  1. Have the app open
  2. Search for a video in the explore tab (I picked this one but it works for other ones too; I think it applies to all videos)
  3. Click on the wanted file (You arrive on the file page, with the description, title, licence, coordinates, etc.)
  4. Click once again on the video

Expected behaviour

The video should be displayed, as it does well for images.

Actual behaviour

The screen stays black.

Device name

Samsung Galaxy A40

Android version

Android 11

Commons app version

4.2.1~14b6c455b

Device logs

No response

Screen-shots

Working for an image Not working for a video
- -

Video demonstration

Would you like to work on the issue?

Prefer not

PetitPotiron avatar Dec 13 '23 22:12 PetitPotiron

I would like to work on this issue 😄

AmanNegi avatar Dec 16 '23 02:12 AmanNegi

@AmanNegi It is yours, thanks! 🙂

nicolas-raoul avatar Dec 16 '23 02:12 nicolas-raoul

@AmanNegi it seems to be the same for sound files

PetitPotiron avatar Dec 18 '23 06:12 PetitPotiron

Okay @PetitPotiron I will look into this.

AmanNegi avatar Dec 18 '23 07:12 AmanNegi

@AmanNegi Any progress to share? 🙂

nicolas-raoul avatar Jan 13 '24 13:01 nicolas-raoul

Well, I had some issues setting up the project and then with the Beta Account creation. Currently, I'm busy with a few tasks at hand, if this is a high priority task feel free to assign it to someone interested!

AmanNegi avatar Jan 13 '24 14:01 AmanNegi

@AmanNegi Not really high priority, don't worry. :-) Also, you can use the prodDebug flavor https://github.com/commons-app/commons-app-documentation/blob/master/android/build-variants/Build-Variants.md to find the file mentioned by PetitPotiron.

nicolas-raoul avatar Jan 15 '24 08:01 nicolas-raoul

@nicolas-raoul I looked into this issue and here are the few things I found.

  • We are using fresco to display and cache images in the ZoomableActivity.kt.
  • After my research I came to the conclusion that fresco is used to show images only. However, in WikiMedia we support several kinds of files just to name a few (pdf/ gif/ png/ jpg etc) . Trying to load all these file types using fresco can cause issue while rendering the file using fresco, which leads to the blank screen.

Alternate Solution

Instead of showing the blank screen we should present the user with at least the thumbnail. User can further download any kind of media and view on their device.

Please correct me if I am wrong here, and let me know if I should build upon this alternative solution.

AmanNegi avatar Feb 09 '24 11:02 AmanNegi

Interesting, thanks! When Fresco isn:t able to load a file, how about just opening the file with Android's default app for that file type? For instance for a video it could be VLC, etc. Just launching an open intent should be enough.

nicolas-raoul avatar Feb 09 '24 21:02 nicolas-raoul

Thanks for the amazing suggestion! Redirecting the user to the correct app would make it a seamless user experience.

Implementing this right away. 👍

AmanNegi avatar Feb 10 '24 05:02 AmanNegi

@nicolas-raoul The server is currently unable to serve any assets. Are the servers under maintenance? Or am I missing something. Also are there any communication channels like Discord, where I could connect with the community.

Error
Our servers are currently under maintenance or experiencing a technical problem.

Please Reload this page try again in a few minutes.
See the error message at the bottom of this page for more information.If you report this error to the Wikimedia System Administrators, please include the details below.

Request from 112.196.33.226 via deployment-cache-upload08.deployment-prep.eqiad1.wikimedia.cloud, ATS/9.1.4

Error: 500, Cannot find server. at 2024-02-13 03:31:25 GM

AmanNegi avatar Feb 13 '24 03:02 AmanNegi

@AmanNegi I just tried, upload is working. It might have been a temporary issue, please try again, thanks :-)

nicolas-raoul avatar Feb 14 '24 02:02 nicolas-raoul

@nicolas-raoul This still doesn't seem to work. (talking about the images not being loaded into the app)

https://github.com/commons-app/apps-android-commons/assets/37607224/f65aff4c-2d6c-4bba-bb18-55a1109bfc7d

AmanNegi avatar Feb 15 '24 10:02 AmanNegi

@AmanNegi Is it working better now?

nicolas-raoul avatar Aug 20 '24 07:08 nicolas-raoul

@AmanNegi I unassign for now, but if you are you still working on this, please let us know. If no answer, someone else may be assigned to it. Thanks a lot. :-)

nicolas-raoul avatar Aug 26 '24 02:08 nicolas-raoul