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

APhotoManager: photo not found when opened from file manager with app specific content uri-s #118

Closed
kodeblacc opened this issue Mar 27, 2018 · 16 comments
Labels
Milestone

Comments

@kodeblacc
Copy link
Contributor

kodeblacc commented Mar 27, 2018

Expected behavior

I expected I'll be able to view pictures from dir filr manager using Aphotomanager

Actual behavior

When I choose to view a picture from dir file manager with Aphotomanager it's say photo not found in media database and opens another photo

How to reproduce

  • download Aphotomanager and Dir file manager both on Fdroid.
  • access a directory on dir filemanager with more than 10 pictures
  • select the option to open picture with A photoviewer
  • it says photo not found in media database.

  • Device: Infinix Note 4
  • Operating system: Android 8.0
    *Software version: Aphoto manager 0.6.4.180314
    Dir File manager 1.5.5

Recording Of The Bug

https://youtu.be/WAPylthmLbc



Posted on Utopian.io - Rewarding Open Source Contributors


[update k3b 2018-05-03]

Reproducable: OI-Filemanger tries to open content://org.openintents.filemanager//storage/emulated/0/DCIM/..... which APhotoManager currently does not understand.

@k3b
Copy link
Owner

k3b commented Mar 27, 2018

Thanks for the report.

Can you help me to find the cause?

  • Open "A Photo Manger"
  • goto settings menu
  • select all checkboxes under "Diagnose: LogCatXXXX"
  • press "Delete Logcat"
  • exit settings
  • exit "A Photo Manger"
  • repeat the actions that causes the error
  • Open "A Photo Manger" again
  • goto settings menu
  • press "save logcat"
  • open a filemanager at directory [ExternalStorageDirectory]/copy/log/
  • there should be one ore more files androFotofinder.logcat-2018....txt

These files may contain the infos what went wrong

Can you attach the newest two files to this ticket.

Then i can analyse what went wrong

@kodeblacc
Copy link
Contributor Author

kodeblacc commented Mar 27, 2018 via email

@k3b
Copy link
Owner

k3b commented Mar 27, 2018

Sorry. Version "Aphoto manager 0.6.4.180314" had a bug in the settings #116 .

On f-droid and up2down there is a fixed "version 0.6.4.180321"

@kodeblacc
Copy link
Contributor Author

kodeblacc commented Mar 27, 2018 via email

@kodeblacc
Copy link
Contributor Author

kodeblacc commented Mar 27, 2018 via email

@k3b
Copy link
Owner

k3b commented Mar 27, 2018

in english the menu item is called "clear logcat".

If the problem is gone away. i will close this ticket for now.

feel free to reopen it, if the issue happens again.

thanks for cooperation.

@k3b k3b closed this as completed Mar 27, 2018
@kodeblacc
Copy link
Contributor Author

This issue is still happening, even in the latest release of the software and logcat doesn't reveal the problem.

It is reproducible with Dir File Manager and OI file manager

@kodeblacc
Copy link
Contributor Author

This is the logcat report I got and it doesn't contain useful information about what's causing this issue.

--------- beginning of main
[ 04-19 06:23:46.638 8583: 8583 E/k3bFoto ]
SettingsActivity-SaveLogCat()

[ 04-19 06:23:46.639 8583: 8583 E/k3bFoto ]
saving errorlog ('LocCat') to /storage/emulated/0/copy/log/androFotofinder.logcat-20180419-052346.txt

[ 04-19 06:24:27.710 8583: 8583 E/k3bFoto ]
SettingsActivity-SaveLogCat()

[ 04-19 06:24:27.710 8583: 8583 E/k3bFoto ]
saving errorlog ('LocCat') to /storage/emulated/0/copy/log/androFotofinder.logcat-20180419-052427.txt

[ 04-19 06:25:57.933 8583: 8583 E/k3bFoto ]
SettingsActivity-SaveLogCat()

[ 04-19 06:25:57.934 8583: 8583 E/k3bFoto ]
saving errorlog ('LocCat') to /storage/emulated/0/copy/log/androFotofinder.logcat-20180419-052557.txt

@k3b
Copy link
Owner

k3b commented Apr 21, 2018

thanks for reporting.

Under settings: below Diagnostics: have you enabled all checkboxes "LogCat XXXX" before reproducing the problem?

The logcat content you send contains only infos about the "Save LogCat to file" but nothig that happens before

  • goto settings:
  • (optional) Clear LogCat
  • enabled all checkboxes "LogCat XXXX"
  • leave settings
  • reproduce the problem
  • goto settings
  • Save LogCat to file

After that there should be one or two new logcatfiles in the "Error Log Folder"

this should record what is happening.

on my android-7.1 the problem is not reproducable.

Lets hope that the logcat has more usefull infos.

@k3b k3b reopened this Apr 21, 2018
@k3b
Copy link
Owner

k3b commented Apr 21, 2018

i have looked at the video it shows "photo not found in the media database //storage/emulated/0/DCIM/IMG.....jpg"

The file url should be "/storage/emulated/0/DCIM..." and not "//storage/emulated/0/DCIM...". Which filemanager are you using?

Can you open the image from the filemanager with other gallery apps?

@k3b
Copy link
Owner

k3b commented May 3, 2018

From https://steemit.com/utopian-io/@sammaz/when-i-tried-to-open-image-in-oi-file-manager-through-a-photo-manager-it-is-not-showing-images-properly

Here the problem is reproducable because oi-file-manager uses INTENT-VIEW with url
content://org.openintents.filemanager/%2fstorage%2femulated%2f0%2fDCIM%2f..... which is converted to content://org.openintents.filemanager//storage/emulated/0/DCIM/.....
which becomes "//storage/emulated/0/DCIM/....."

a-photo-manager currently cannot translate oi-file-manager specific content url back to file url and therefore cannot open the jpg as a file.

Since new android versions do not like file uri-s "file:/path/to/file.jpg" modern android apps have to app specific content uri-s instead.

I will add a workaround that tries to get the original file uri from content://something//....

@k3b k3b changed the title Aphoto manager says photo not found in media database when opened from dir file manager APhotoManager: photo not found when opened from file manager with app specific content uri-s May 3, 2018
@kodeblacc
Copy link
Contributor Author

kodeblacc commented May 3, 2018 via email

@k3b k3b added the bug label May 3, 2018
@k3b
Copy link
Owner

k3b commented May 3, 2018

I use an old filemanager that uses "file:/..." urls therefore it is working with it.

With the logcat as described my answer from 2018-04-21 i would have seen the problem immediately.

@kodeblacc
Copy link
Contributor Author

kodeblacc commented May 3, 2018 via email

@k3b
Copy link
Owner

k3b commented May 6, 2018

@kodeblacc hello kodeblacc feel free to go on. you should have write permission in the project-s wiki. (only for the wiki not for the sourcecode branch with the main readme.md) if this is not working please let me know.

Note: this is a hobby project with no budget so i cannot compensate you for your work.


I have looked at a privacy.md you already contributed for an other project which is exactly what this project is missing.

For the privacy statement: if settings ShowInMap/UseMapsforgeOfflineMap is disabled and some "map display" is shown the app may fetch mapdata from one of the openstreetmap servers for the current visible map area if this mapdata is currently not cached yet.

In other words: openstreetmap servers may contain logentries with your ip-adress and date/time and geographic coordinate you where watching on the map. Each mapdata is only loaded once and then locally stored (a.k.a. data caching).


if you want to change something in the sourcecodebase outside the wiki (i.e. readme.md) feel free to clone and make a mergerequest.

@kodeblacc
Copy link
Contributor Author

kodeblacc commented May 6, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants