Skip to content

Commit

Permalink
Issue #130 - Use FileProvider by default for pass tracks to viewers
Browse files Browse the repository at this point in the history
  • Loading branch information
GrazianoCapelli committed May 9, 2021
1 parent 8112b16 commit eaa08c9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ public class ExternalViewer {
String packageName = ""; // The full package name
String mimeType = ""; // The mimetype to use with the ACTION_VIEW intent (for example "application/gpx+xml")
String fileType = ""; // "GPX" or "KML"
boolean requiresFileProvider = false; // True if the app requires the FileProvider method to open the track
boolean requiresFileProvider = true; // True if the app requires the FileProvider method to open the track
Drawable icon = null; // The app's icon
}
Original file line number Diff line number Diff line change
Expand Up @@ -175,14 +175,14 @@ public void makeExternalViewersList() {
a.fileType = FILETYPE_KML;
a.mimeType = "application/vnd.google-earth.kml+xml";
}
// if (a.packageName.equals("com.vecturagames.android.app.gpxviewer")) {
// // GPX Viewer saves a copy of the file if passed via FileProvider
// a.requiresFileProvider = false;
// }
if (a.packageName.equals("com.google.earth")) {
// Google Earth opens file with fileProvider only
a.requiresFileProvider = true;
if (a.packageName.equals("com.vecturagames.android.app.gpxviewer")) {
// GPX Viewer saves a copy of the file if passed via FileProvider
a.requiresFileProvider = false;
}
// if (a.packageName.equals("com.google.earth")) {
// // Google Earth opens file with fileProvider only
// a.requiresFileProvider = true;
// }
}
}
}

0 comments on commit eaa08c9

Please sign in to comment.