BasicAirData / GPSLogger

A GPS logger for Android mobile devices
http://www.basicairdata.eu/projects/android/android-gps-logger/
GNU General Public License v3.0
401 stars 126 forks source link

Earth doesn't work anymore as Viewer #92

Closed GrazianoCapelli closed 4 years ago

GrazianoCapelli commented 4 years ago

Recently Google Earth received a update that broken the old ACTION_VIEW method. We should switch to the Provider version of it and release an App update:

// GPX Viewer
            file = new File(Environment.getExternalStorageDirectory() + "/GPSLogger/AppData/", exportingTask.getName() + ".gpx");
            Uri uri = FileProvider.getUriForFile(GPSApplication.getInstance(), "eu.basicairdata.graziano.gpslogger.fileprovider", file);
            getApplicationContext().grantUriPermission(TrackViewer.PackageName, uri, Intent.FLAG_GRANT_WRITE_URI_PERMISSION | Intent.FLAG_GRANT_READ_URI_PERMISSION);
            intent.setDataAndType(Uri.fromFile(file), "gpx+xml");
            ...
GrazianoCapelli commented 4 years ago

I will fix this bug working on the issue #87. The new External Viewer Selector will fix also this problem.

We'll release a new update as soon as possible, I think in a few weeks.