Search in sources :

Example 1 with ResourceManager

use of net.osmand.core.samples.android.sample1.resources.ResourceManager in project Osmand by osmandapp.

the class SampleApplication method onCreate.

@Override
public void onCreate() {
    super.onCreate();
    OsmandResources.init(this);
    locationProvider = new SampleLocationProvider(this);
    searchUICore = new QuickSearchHelper(this);
    geocodingLookupService = new GeocodingLookupService(this);
    resourceManager = new ResourceManager(this);
    regions = new OsmandRegions();
    updateRegionVars();
    indexRegionsBoundaries();
    uiHandler = new Handler();
    poiTypes = MapPoiTypes.getDefaultNoInit();
    if (ContextCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE) == PackageManager.PERMISSION_GRANTED) {
        initPoiTypes();
    }
    // Initialize native core
    if (NativeCore.isAvailable() && !NativeCore.isLoaded()) {
        assetsCustom = CoreResourcesFromAndroidAssets.loadFromCurrentApplication(this);
        NativeCore.load(assetsCustom);
    }
    Logger.get().setSeverityLevelThreshold(LogSeverityLevel.Debug);
    iconsCache = new IconsCache(assetsCustom, this);
}
Also used : OsmandRegions(net.osmand.map.OsmandRegions) Handler(android.os.Handler) ResourceManager(net.osmand.core.samples.android.sample1.resources.ResourceManager) QuickSearchHelper(net.osmand.core.samples.android.sample1.search.QuickSearchHelper)

Aggregations

Handler (android.os.Handler)1 ResourceManager (net.osmand.core.samples.android.sample1.resources.ResourceManager)1 QuickSearchHelper (net.osmand.core.samples.android.sample1.search.QuickSearchHelper)1 OsmandRegions (net.osmand.map.OsmandRegions)1