public static void doImport(final Context context, final Uri uri) {
        final AtomicInteger size = new AtomicInteger(0);
        AndroidRxUtils.andThenOnUi(Schedulers.io(), () -> {
            try {
                size.set(doInBackground(uri));
            } catch (final Exception e) {
                //
            }
        }, () -> {
            ViewUtils.showShortToast(context, size.get() > 0 ? LocalizationUtils.getPlural(R.plurals.individual_route_loaded, size.get()) : LocalizationUtils.getString(R.string.load_individual_route_error));
            LifecycleAwareBroadcastReceiver.sendBroadcast(context, Intents.ACTION_INDIVIDUALROUTE_CHANGED);
        });
    }
Imports an GPX file containing an individual route
and stores the resulting geoitems to the route table.
(Caller needs to trigger reload and screen update.)
main/src/main/java/cgeo/geocaching/files/GPXIndividualRouteImporter.java