billthefarmer / editor

Android simple text editor
https://billthefarmer.github.io/editor
GNU General Public License v3.0
474 stars 85 forks source link

Crash when receiving a specific share intent #152

Closed opk12 closed 3 years ago

opk12 commented 3 years ago

I am not interested in this personally, but I thought to mention about a crash.

OsmAnd is a map navigation app based on OpenStreetMap. Sharing the list of Points of Interest (how-to) sends an intent (code is here) made of

  1. the subject Favorites shared via OsmAnd
  2. the list as plain text:
    Point of interest 1 - geo:-71.1949,61.817707
    ...
  3. the same list as a file in GPX format

This duplication of the list allows an app that does not handle a file to handle the plain text. But the Editor app crashes when it is selected as the share target.

billthefarmer commented 3 years ago

When the app receives an intent from another app it checks for an URI and attempts to load it. OsmAnd sends a FileProvider URI which breaks the code which attempts to resolve the URI to get the file date so that stuff like the overwrite warning, recent file list, etc, can work. This is fixed in the latest version, which should be on F-Droid dreckly.

opk12 commented 3 years ago

This is now fixed. Thanks.