|
| 1 | +package com.meridianmaps |
| 2 | + |
| 3 | +import android.graphics.Typeface |
| 4 | + |
| 5 | +import com.arubanetworks.meridian.Meridian |
| 6 | +import com.arubanetworks.meridian.editor.EditorKey |
| 7 | + |
| 8 | +import android.content.Context |
| 9 | +import org.acra.ktx.initAcra |
| 10 | +import org.acra.config.mailSender |
| 11 | +import org.acra.data.StringFormat |
| 12 | + |
| 13 | +class Application : android.app.Application() { |
| 14 | + //NOTE: To build the Java Samples App, change the build variant. |
| 15 | + override fun onCreate() { |
| 16 | + // Configure Meridian |
| 17 | + Meridian.configure(this, EDITOR_TOKEN) |
| 18 | + |
| 19 | + // Example of setting the Sample App for the EU server |
| 20 | + // Meridian.getShared().setDomainRegion(Meridian.DomainRegion.DomainRegionEU) |
| 21 | + |
| 22 | + // Example of overriding cache headers |
| 23 | + //Meridian.getShared().setOverrideCacheHeaders(true) |
| 24 | + //Meridian.getShared().setCacheOverrideTimeout(1000*60*60) // 1 hour |
| 25 | + |
| 26 | + // Example of setting the default picker style. |
| 27 | + //Meridian.getShared().setPickerStyle(LevelPickerControl.PickerStyle.PICKER_SEARCH) |
| 28 | + |
| 29 | + // Example of setting the default level picker floor display order - highest level at top (elevator style). |
| 30 | + // Meridian.getShared().setMapPickerHighestFloorOnTop(true) |
| 31 | + |
| 32 | + // Example to disable search bar for map picker with PICKER_SEARCH picker style, default is enabled. |
| 33 | + // NOTE: Search bar can be disabled only if both buildings and floors are each less than 10. |
| 34 | + // Meridian.getShared().setMapPickerSearchBarEnabled(false) |
| 35 | + |
| 36 | + // Enable support for dark theme. |
| 37 | + Meridian.getShared().supportDarkTheme(true) |
| 38 | + |
| 39 | + // Example of setting a custom font. |
| 40 | + // NOTE: Both android built-in fonts and fonts either created like below or from resources can be used. |
| 41 | + // Meridian.getShared().setTextFont(Typeface.MONOSPACE, Typeface.MONOSPACE, Typeface.create(Typeface.MONOSPACE, Typeface.BOLD)) |
| 42 | + |
| 43 | + super.onCreate() |
| 44 | + } |
| 45 | + override fun attachBaseContext(base: Context) { |
| 46 | + super.attachBaseContext(base); |
| 47 | + // ACRA is for bug reporting in the samples app and is not necessary for the Meridian SDK |
| 48 | + initAcra { |
| 49 | + buildConfigClass = BuildConfig::class.java |
| 50 | + reportFormat = StringFormat.JSON |
| 51 | + logcatArguments = listOf("-t","10000","-v","time") |
| 52 | + mailSender { |
| 53 | + mailTo = "developers@meridianapps.com" |
| 54 | + } |
| 55 | + } |
| 56 | + } |
| 57 | + |
| 58 | + companion object { |
| 59 | + |
| 60 | + // To build the default Sample SDK App, use: |
| 61 | + |
| 62 | + val APP_KEY: EditorKey = EditorKey.forApp("5809862863224832") |
| 63 | + val MAP_KEY: EditorKey = EditorKey.forMap("5668600916475904", APP_KEY) |
| 64 | + |
| 65 | + // To build your own customized SDK based App, replace APP_KEY and MAP_KEY with your location's App and Map ID values: |
| 66 | + // public static final EditorKey APP_KEY = EditorKey.forApp("APP_KEY"); |
| 67 | + // public static final EditorKey MAP_KEY = EditorKey.forMap("MAP_KEY", APP_KEY); |
| 68 | + |
| 69 | + // To build the default Sample SDK App for EU Servers, use the following: |
| 70 | + // NOTE: Even if you're geographically located in the EU, you probably won't need to do this. |
| 71 | + // public static final EditorKey APP_KEY = EditorKey.forApp("4856321132199936"); |
| 72 | + // public static final EditorKey MAP_KEY = EditorKey.forMap("5752754626625536", APP_KEY); |
| 73 | + |
| 74 | + const val PLACEMARK_UID = "CASIO_UID" // replace this with a unique id for one of your placemarks. |
| 75 | + const val TAG_MAC = "" // mac address (without :'s) of one of your tags here |
| 76 | + const val PROXIMITY_BEACON_MAC = "" // mac address (without :'s) of one of your proximity beacons here |
| 77 | + // replace this with the correct editor token for the location |
| 78 | + const val EDITOR_TOKEN = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0IjoxNTc5MzAwMjM4LCJ2YWx1ZSI6IjJmOWIwMjY1YmQ2NzZmOTIxNjQ5YTgxNDBlNGZjN2I4YWM0YmYyNTcifQ.pxYOq2oyyudM3ta_bcij4R_hY1r3XG6xIDATYDW4zIk" |
| 79 | + } |
| 80 | +} |
0 commit comments