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

Version 6.8.12 and all newer versions does not open jpg/pdf pictures in an image viewer on all Smartphones with Android 7.0 or newer. #390

Closed
Buzz33 opened this issue May 7, 2020 · 13 comments
Assignees
Milestone

Comments

@Buzz33
Copy link

Buzz33 commented May 7, 2020

In the waypoint description file it is possible to implement links to pictures. If you click now on the details page of this waypoint the file path of the associatetd picture (e.g. a pdf file of an outlanding site, see also screenshot ->second line) the line will be highlited for a short moment, but then nothing happens. The picture viewer does not start, the picture is not shown on the display.

Screenshot_20200507-233555_XCSoar

This happens with XCSoar Version 6.8.14 (from Playstore, testet with Samsung Galaxy Note10+ / Android10), 6.8.13b and 6.8.12 on Android 8, 9 and 10 testet with a varity of Smartphones.
The older XCSoar-Version 6.8.11 works fine in this point on my Note 10+ with Android 10!

On my Samsung Galaxy Note 2 with Android 4.4.2 and on my Samsung Galaxy Grand Prime with Android 5.1.1 all above mentioned XCSoar Versions work fine in this point. This is also reportet from other users with Android 4 or 5 Versions.

Seems to be a problem that starts with Version 6.8.12 in relationship with higher Android Versions (Verified Android 8, 9 and 10.).

@lordfolken lordfolken added this to the v6.8.14 milestone May 8, 2020
@lordfolken lordfolken added the bug label May 8, 2020
@Buzz33 Buzz33 changed the title Version 6.8.13b does not open jpg/pdf pictures in the image viewer on Samsung Galaxy Note10+ / Android10 Version 6.8.14 (Playstore), 6.8.13b and 6.8.12 does not open jpg/pdf pictures in the image viewer on Samsung Galaxy Note10+ / Android10 May 28, 2020
@Buzz33
Copy link
Author

Buzz33 commented Jun 24, 2020

This bug persists also in version 6.8.15.

So I cannot use my outlanding catalogue in XCSoar with version 6.8.12 to 6.8.15.
Because this is a key feature to me I have to stay with version 6.8.11 despite the installing dialogue tells me that version 6.8.11 is too old for my Android version (but 6.8.11 seems to work so far with Android10).

@lordfolken lordfolken modified the milestones: v6.8.14, v6.8.16 Jul 2, 2020
@lordfolken
Copy link
Contributor

private void openFile(String pathName) {

The fileOpen() Function is responsible for finding and starting the correct application for the correct file type. The function wasn't changed in years, so either the function is no longer called, or something in the function broke when the android ndk version was incremented or the permission handling was changed.

The function should log the error NativeView ... error if its called and failed.

One thing that bothers me is that the mimetype is discovered from the file extension. This isn't exactly good practice.

@Buzz33
Copy link
Author

Buzz33 commented Jul 12, 2020

Just testet it again:

There is no failure message poping up on the display after calling and failing.
Also in the XCSoar log file there is no NativeView... error recorded.

xcsoar.log

The only "reaction" after tabbing the link on top of the page (e.g. /Waypoints/KatalogSIP/A246.pdf) is a short highlighting of this line - followed by "nothing".

@Buzz33 Buzz33 changed the title Version 6.8.14 (Playstore), 6.8.13b and 6.8.12 does not open jpg/pdf pictures in the image viewer on Samsung Galaxy Note10+ / Android10 Version 6.8.15 (Playstore), 6.8.14, 6.8.13b and 6.8.12 does not open jpg/pdf pictures in the image viewer on Samsung Galaxy Note10+ / Android10 Jul 15, 2020
@Buzz33
Copy link
Author

Buzz33 commented Aug 14, 2020

This bug persists in Version 6.8.16 too.

@Buzz33 Buzz33 changed the title Version 6.8.15 (Playstore), 6.8.14, 6.8.13b and 6.8.12 does not open jpg/pdf pictures in the image viewer on Samsung Galaxy Note10+ / Android10 Version 6.8.16 (and all previous versions later than version 6.8.11) does not open jpg/pdf pictures in an image viewer on Samsung Galaxy Note10+ / Android10 Aug 14, 2020
@leojullerot
Copy link

Bug persists in V6.8.17

@lordfolken
Copy link
Contributor

lordfolken commented Sep 27, 2020

Got the error with logcat:

09-28 00:47:11.314  9546  9567 E XCSoar  : NativeView.openFile('/storage/emulated/0/XCSoarData/lspd.pdf') error
09-28 00:47:11.314  9546  9567 E XCSoar  : android.os.FileUriExposedException: file:///storage/emulated/0/XCSoarData/lspd.pdf exposed beyond app through Intent.getData()
09-28 00:47:11.314  9546  9567 E XCSoar  : 	at android.os.StrictMode.onFileUriExposed(StrictMode.java:1978)
09-28 00:47:11.314  9546  9567 E XCSoar  : 	at android.net.Uri.checkFileUriExposed(Uri.java:2371)
09-28 00:47:11.314  9546  9567 E XCSoar  : 	at android.content.Intent.prepareToLeaveProcess(Intent.java:10260)
09-28 00:47:11.314  9546  9567 E XCSoar  : 	at android.content.Intent.prepareToLeaveProcess(Intent.java:10213)
09-28 00:47:11.314  9546  9567 E XCSoar  : 	at android.app.Instrumentation.execStartActivity(Instrumentation.java:1669)
09-28 00:47:11.314  9546  9567 E XCSoar  : 	at android.app.Activity.startActivityForResult(Activity.java:4586)
09-28 00:47:11.314  9546  9567 E XCSoar  : 	at android.app.Activity.startActivityForResult(Activity.java:4544)
09-28 00:47:11.314  9546  9567 E XCSoar  : 	at android.app.Activity.startActivity(Activity.java:4905)
09-28 00:47:11.314  9546  9567 E XCSoar  : 	at android.app.Activity.startActivity(Activity.java:4873)
09-28 00:47:11.314  9546  9567 E XCSoar  : 	at org.xcsoar.NativeView.openFile(NativeView.java:410)
09-28 00:47:11.314  9546  9567 E XCSoar  : 	at org.xcsoar.NativeView.runNative(Native Method)
09-28 00:47:11.314  9546  9567 E XCSoar  : 	at org.xcsoar.NativeView.run(NativeView.java:295)
09-28 00:47:11.314  9546  9567 E XCSoar  : 	at java.lang.Thread.run(Thread.java:764)

This breakage is introduced by the changes in android 7.0;
https://developer.android.com/about/versions/nougat/android-7.0-changes

A solution:
https://stackoverflow.com/questions/38200282/android-os-fileuriexposedexception-file-storage-emulated-0-test-txt-exposed

I started here:
https://github.com/lordfolken/XCSoar/tree/v6.8.x
Maybe someone with more time can bring it to fruition?

@lordfolken lordfolken modified the milestones: v6.8.16, v7.4 Apr 7, 2021
@Buzz33 Buzz33 changed the title Version 6.8.16 (and all previous versions later than version 6.8.11) does not open jpg/pdf pictures in an image viewer on Samsung Galaxy Note10+ / Android10 Version 6.8.16 (and all previous versions later than version 6.8.11) does not open jpg/pdf pictures in an image viewer on Smartphones with Android 7.0 or neweramsung Galaxy Note10+ / Android10 Jun 5, 2021
@Buzz33 Buzz33 changed the title Version 6.8.16 (and all previous versions later than version 6.8.11) does not open jpg/pdf pictures in an image viewer on Smartphones with Android 7.0 or neweramsung Galaxy Note10+ / Android10 Version 6.8.16 (and all previous versions later than version 6.8.11) does not open jpg/pdf pictures in an image viewer on all Smartphones with Android 7.0 or newer. Jun 5, 2021
@Buzz33 Buzz33 changed the title Version 6.8.16 (and all previous versions later than version 6.8.11) does not open jpg/pdf pictures in an image viewer on all Smartphones with Android 7.0 or newer. Version 6.8.12 and all newer versions does not open jpg/pdf pictures in an image viewer on all Smartphones with Android 7.0 or newer. Jun 5, 2021
@Buzz33
Copy link
Author

Buzz33 commented Jun 5, 2021

Milestone was 7.4 - outlanding pictures still not usable in 7.4 and 7.8. :-(
The good news: The 2 years old 6.8.11 still works with Android 11 so far ;-)

@lordfolken
Copy link
Contributor

Well you didn't provide a PR. :-)

private void openFile(String pathName) {

is the function that is bugging out.

@Buzz33
Copy link
Author

Buzz33 commented Jun 6, 2021

Well you didn't provide a PR. :-)<<

Thank you for your investigation so far. :-)
But sorry, I am just a dumb user that can report issues and can do some testing. Would have tried it by myself for quite some time if I had the skills.

Maybe anybody else can help?

@lordfolken
Copy link
Contributor

Iplayed around a bit and got at least the intent call working. So it tries to open the file with an app I
E. Pdf. The app doesn't get the correct path however.

@lordfolken
Copy link
Contributor

Maybe I could interest you in #242 ?

@Buzz33
Copy link
Author

Buzz33 commented Jun 6, 2021

Iplayed around a bit and got at least the intent call working. <<

So there will be hope !? :-))

Maybe I could interest you in #242 ?<<

Well, I can try to write some text and make screenshots for the manual.

Some questions for that:

Shall I describe the functionality and layout from Version 6.8.11 then? Or are there any changes in the WP-Description File functionality or in the layout since the 6.8.11 in the current 7.8 (despite the picture bug #390) ?

What format shall I use? Word, PP, pdf ?
Or just txt or rtf? Then with the added jpg, png, tif or bmp pictures in a seperated folder?

@lordfolken lordfolken self-assigned this Jun 9, 2021
@Buzz33
Copy link
Author

Buzz33 commented Jun 19, 2021

Maybe these where too much stupid questions... (?) ;-)

OK, yesterday, a friend of mine gave me a most basic crash course in git - and we fiddlet about where and how things seem to be organised relating to the manual.
Despite my knowledge with git and .tex currently are in the most basic way, I will try to get the manual updated in some points - about the waypoint description file, use of pictures and mediafiles etc. But it will take some time...

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

No branches or pull requests

3 participants