docs: private void setProviderConfig(String[] files) {
          if (files == null || files.length == 0)
              return;
          SimpleRegisterReceiver simpleRegisterReceiver = new SimpleRegisterReceiver(getContext());
          if (tileWriter!=null)
              tileWriter.onDetach();
  
          tileWriter = new SqlTileWriter();
  
          tileSources.clear();
          List<MapTileModuleProviderBase> providers = new ArrayList<>();
          providers.add(new MapTileAssetsProvider(simpleRegisterReceiver, getContext().getAssets()));
  
          List<File> geopackages = new ArrayList<>();
          List<File> forgeMaps = new ArrayList<>();
          List<IArchiveFile> archives = new ArrayList<>();
          //this part seperates the geopackage and maps forge stuff since they are handled differently
          for (int i = 0; i < files.length; i++) {
              File archive = new File(files[i]);
              if (archive.getName().endsWith("gpkg")) {
                  geopackages.add(archive);
              } else if (archive.getName().endsWith("map")) {
                  forgeMaps.add(archive);
              } else {
                  IArchiveFile temp = ArchiveFileFactory.getArchiveFile(archive);
                  if (temp != null) {
                      Set<String> tileSources = temp.getTileSources();
                      Iterator<String> iterator = tileSources.iterator();
                      while (iterator.hasNext()) {
  
                          this.tileSources.add(FileBasedTileSource.getSource(iterator.next()));
                          archives.add(temp);
                      }
                  }
  
              }
          }
  
          //setup the standard osmdroid-android library supported offline tile providers
          IArchiveFile[] archArray = new IArchiveFile[archives.size()];
          archArray = archives.toArray(archArray);
          final MapTileFileArchiveProvider mapTileFileArchiveProvider = new MapTileFileArchiveProvider(simpleRegisterReceiver, TileSourceFactory.DEFAULT_TILE_SOURCE, archArray);
  
  
          GeoPackageMapTileModuleProvider geopackage = null;
          GeoPackageProvider provider = null;
          //geopackages
          if (!geopackages.isEmpty()) {
              File[] maps = new File[geopackages.size()];
              maps = geopackages.toArray(maps);
  
              GeoPackageManager manager = GeoPackageFactory.getManager(getContext());
  
              // Import database
              for (File f : maps) {
                  try {
                      boolean imported = manager.importGeoPackage(f);
                  } catch (Exception ex) {
                      ex.printStackTrace();
                  }
              }
  
              provider = new GeoPackageProvider(maps, getContext());
              geopackage = provider.geoPackageMapTileModuleProvider();
              providers.add(geopackage);
              List<GeopackageRasterTileSource> geotileSources = new ArrayList<>();
              geotileSources.addAll( geopackage.getTileSources());
              tileSources.addAll(geotileSources);
              //TODO add feature tiles here too
          }
  
          MapsForgeTileModuleProvider moduleProvider=null;
          if (!forgeMaps.isEmpty()) {
              //fire up the forge maps...
              XmlRenderTheme theme = null;
              try {
                  theme = new AssetsRenderTheme(getContext().getApplicationContext(), "renderthemes/", "rendertheme-v4.xml");
              } catch (Exception ex) {
                  ex.printStackTrace();
              }
  
              File[] forge = new File[forgeMaps.size()];
              forge = forgeMaps.toArray(forge);
              MapsForgeTileSource fromFiles = MapsForgeTileSource.createFromFiles(forge, theme, "rendertheme-v4");
              tileSources.add(fromFiles);
              // Create the module provider; this class provides a TileLoader that
              // actually loads the tile from the map file.
              moduleProvider = new MapsForgeTileModuleProvider(simpleRegisterReceiver, fromFiles, tileWriter);
  
  
          }
  
  
          final MapTileApproximater approximationProvider = new MapTileApproximater();
          approximationProvider.addProvider(mapTileFileArchiveProvider);
  
          if (geopackage != null) {
              providers.add(geopackage);
              approximationProvider.addProvider(geopackage);
          }
          if (moduleProvider!=null) {
              providers.add(moduleProvider);
              approximationProvider.addProvider(moduleProvider);
          }
  
          providers.add(mapTileFileArchiveProvider);
          providers.add(approximationProvider);
          MapTileModuleProviderBase[] providerArray = new MapTileModuleProviderBase[providers.size()];
          for (int i = 0; i < providers.size(); i++) {
              providerArray[i] = providers.get(i);
          }
  
  
          MapTileProviderArray obj = new MapTileProviderArray(TileSourceFactory.DEFAULT_TILE_SOURCE, simpleRegisterReceiver, providerArray);
          mMapView.setTileProvider(obj);
  
          //ok everything is setup, we now have 0 or many tile sources available, ask the user
          promptForTileSource();
      }