diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 000000000..e69de29bb diff --git a/404.html b/404.html new file mode 100644 index 000000000..e20fcfff3 --- /dev/null +++ b/404.html @@ -0,0 +1,1889 @@ + + + +
+ + + + + + + + + + + + + + + + + + +Add the following dependencies in the build.gradle
file of your application:
For the use of cartography, add your Google Maps API Key to your AndroidManifest.xml
as well. Replace YOUR_API_KEY
with your key:
The activity launching Around Me must handle the following configuration changes: orientation|screenSize
declared into your AndroidManifest.xml
:
Warning
+Make sure to read the modules configuration section before proceeding
+This module is set up by calling AroundMeUI.getInstance()
. The singleton behaves like a builder in which each method allows you to configure the module. Then, you need to call the init()
method at the end. You should call this method in an Application
subclass.
+This method takes the following parameters:
Name | +Required | +Description | +Type | +Default | +
---|---|---|---|---|
context |
++ | Context in which the module is launched | +Context |
++ |
token |
++ | Get your token | +String |
++ |
configuration |
++ | Module configuration object | +AroundMeConfiguration |
+null |
+
configurationJsonFile |
++ | Module configuration JSON file name | +String |
+null |
+
AroundMeUI.getInstance().let { instance ->
+ instance.init(
+ context = this,
+ token = "your_token",
+ configuration = AroundMeConfiguration(
+ coverage = "your_coverage",
+ timezone = "Europe/Paris",
+ env = AroundMeEnvironment.PROD,
+ colors = AroundMeColors(
+ primary = "#88819f"
+ ),
+ transportCategories = listOf<AroundMeTransportCategory>(),
+ )
+ )
+}
+
Since the module launches its own fragments, you may want your application to be aware of navigation events.
+For that, you have to set a navigation listener by calling this method before init()
.
aroundMeNavigationListenerImpl
should be the class instance implementing AroundMeNavigationListener
interface.This interface gives you the method onBack()
for any back event between two fragments and the method onNavigate
for the reverse.
+Each method has a AroundMeNavigationListener.Event
parameter you can rely on.
// Navigation events
+MAP_TO_FAVORITES
+MAP_TO_JOURNEY
+MAP_TO_TRAFFIC
+MAP_TO_ROADMAP
+MAP_TO_FILTER
+MAP_TO_SEARCH
+MAP_BACK_TO_EXTERNAL
+SEARCH_BACK_TO_MAP
+FILTER_BACK_TO_MAP
+
In order to receive the list of generated events within Around Me module, you have to attach the tracker to the module instance.
+You can call this method before or after init()
.
aroundMeTrackerImpl
should be the class instance implementing AroundMeTracker
interface.Around Me has a single entry point MapFragment
.
+Assuming you have an Activity
with a fragment container, refer to the following example to launch the entry screen fragment:
supportFragmentManager.beginTransaction().run {
+ replace(R.id.container_id, MapFragment.newInstance(), "TAG")
+ addToBackStack("TAG")
+ commit()
+}
+
Around Me module can exchange data with or navigate to either other modules or the host application.
+Some route or callbacks are delegated to the application.
+If you have to receive some module data, Router
must register the app data receiver:
appRouterDataImpl
should be the class instance implementing AppRouter.Data
interface. We recommand usign a Application
subclass.If you have to handle navigation between modules, Router
must also register the app UI receiver:
appRouterUiImpl
should be the class instance implementing AppRouter.UI
interface. We recommand usign a Application
subclass.After registering, you have to call init()
:
A customizable button appears in the free floating details screen and the clicking event should be intercepted by the application.
+ +Param | +Type | +Description | +
---|---|---|
id |
+String |
+Selected free floating id | +
A customizable button appears in the POI details screen and the clicking event should be intercepted by the application.
+ +Param | +Type | +Description | +
---|---|---|
id |
+String |
+Selected POI id | +
Enabling
This module communicates with Bookmark module in order to display favorite stations, journeys and POIs. You should enable the bookmark_mode
parameter in the features configuration.
Methods
The following methods from the AppRouter.UI
interface should be implemented by the host application to enable navigation to the Bookmark module or any other custom screen. Note that the parameters of these methods can be omitted as needed.
override fun openFavoritesViaHost(linkedModule: LinkedModule, tab: FavoriteTab) {
+ // launch the bookmark module screen or your custom screen
+}
+
Param | +Type | +Description | +Value | +
---|---|---|---|
linkedModule |
+BookmarkLinkedModule |
+Module triggering the method call | +BookmarkLinkedModule.AROUND_ME or BookmarkLinkedModule.JOURNEY |
+
tab |
+FavoriteTab |
+Tab to display in the Bookmark module screen | +FavoriteTab.TRANSPORTS , FavoriteTab.JOURNEYS or FavoriteTab.ADDRESSES |
+
override fun openFavoriteHomeAddViaHost(linkedModule: BookmarkLinkedModule) {
+ // launch the bookmark module screen or your custom screen
+}
+
Param | +Type | +Description | +Value | +
---|---|---|---|
linkedModule |
+BookmarkLinkedModule |
+Module triggering the method call | +BookmarkLinkedModule.AROUND_ME or BookmarkLinkedModule.JOURNEY |
+
override fun openFavoriteWorkAddViaHost(linkedModule: LinkedModule) {
+ // launch the bookmark module screen or your custom screen
+}
+
Param | +Type | +Description | +Value | +
---|---|---|---|
linkedModule |
+LinkedModule |
+Module triggering the method call | +LinkedModule.AROUND_ME or LinkedModule.JOURNEY |
+
Enabling
This module communicates with Journey module in order to get directions for a chosen itinerary. You should enable the journey_mode
and the go_from_go_to
parameter in the features configuration.
+Another way to communicate with is through the Map screen and precisely the Where are we going? button, this feature should also be enabled by setting the where_shall_we_go
in the features configuration to true
.
Methods
The following method from the AppRouter.UI
interface should be implemented by the host application to enable navigation to the Journey module or any other custom screens. Note that the parameters of these methods can be ignored as needed.
override fun openJourneysViaHost(
+ origin: SharedData.JourneyPoint?,
+ destination: SharedData.JourneyPoint?,
+ showDirectlyAutoCompletion: Boolean,
+ showDirectlyJourneysSearch: Boolean
+) {
+ // launch the journey module screen or your custom screen
+}
+
Param | +Type | +Description | +
---|---|---|
origin |
+SharedData.JourneyPoint? |
+Desired starting point of the journey. Optional | +
destination |
+SharedData.JourneyPoint? |
+Desired endpoint of the journey. Optional | +
showDirectlyAutoCompletion |
+Boolean |
+Directly displays the search for the starting point and/or endpoint. If true, showDirectlyJourneysSearch can only be false |
+
showDirectlyJourneysSearch |
+Boolean |
+Directly displays the journey search. If true, showDirectlyAutoCompletion can only be false |
+
Enabling
This module communicates with Schedule module in order to show line and station search. You should enable the schedule_mode
parameter in the features configuration.
Method
The following method from the AppRouter.UI
interface should be implemented by the host application to enable navigation to the Schedule module or any other custom screens.
override fun openScheduleSearchViaHost() {
+ // launch the schedule module screen or your custom screen
+}
+
Enabling
This module communicates with Traffic module in order to easily access traffic information. You should enable the traffic_mode
parameter in the features configuration.
Method
The following method from the AppRouter.UI
interface should be implemented by the host application to enable navigation to the Traffic module or any other custom screen.
The module uses graphical components from Material Design 3. To ensure that these components function correctly and get displayed properly on the screen, it is crucial to apply the appropriate parent theme:
+ +Theme.Material3.Light.NoActionBar
LocalDateTime
instead of DateTime
kotlinVersion
> 1.6.21
com.android.tools.build:gradle
> 7.2.2
com.google.firebase:firebase-crashlytics-gradle
> 2.9.2
com.google.gms:google-services
> 4.3.14
org.jfrog.buildinfo:build-info-extractor-gradle
> 4.28.2
daggerVersion
> 2.42
fragmentVersion
> 1.5.2
kotlinCoroutinesVersion
> 1.6.3
roomVersion
> 2.4.3
compileSdk
> 33
buildToolsVersion
> 33.0.0
targetSdk
> 33
androidx.appcompat:appcompat
> 1.5.1
androidx.constraintlayout:constraintlayout
> 2.1.4
androidx.core:core-ktx
> 1.9.0
androidx.lifecycle:lifecycle-viewmodel-ktx
> 2.5.1
com.google.android.material:material
> 1.6.1
com.google.android.gms:play-services-maps
> 18.1.0
com.google.code.gson:gson
> 2.8.9
com.kisio.navitia.sdk.data:expert
> 3.2.1
Gson
by kotlinx.serialization
navitia_nearby_
init()
instead of configuration file or objectgradle-wrapper
> 7.4
com.android.tools.build:gradle
> 7.3.1
androidx.navigation:navigation-fragment-ktx
> 2.5.3
com.kisio.navitia.sdk.data:expert
> 3.2.2
org.jetbrains.kotlinx:kotlinx-serialization-json
> 1.4.1
+1
label if a next departure is the next dayandroidx.appcompat:appcompat
> 1.7.0
androidx.core:core-ktx
> 1.13.1
androidx.fragment:fragment-ktx
> 1.8.2
androidx.lifecycle:lifecycle-viewmodel-ktx
> 2.8.4
com.google.android.material:material
> 1.12.0
com.kisio.navitia.sdk.engine:design
> 2.17.0
com.kisio.navitia.sdk.engine:router
> 2.6.0
com.kisio.navitia.sdk.engine:toolbox
> 2.17.0
org.jetbrains.kotlinx:kotlinx-coroutines-android
> 1.7.3
org.jetbrains.kotlinx:kotlinx-coroutines-core
> 1.7.3
androidx.test:core
> 1.6.1
androidx.test.ext:junit
> 1.2.1
androidx.test.espresso:espresso-core
> 3.6.1
androidx.fragment:fragment-ktx
> 1.8.4
androidx.lifecycle:lifecycle-viewmodel-ktx
> 2.8.6
In case Bookmark is enabled for this module, this version requires Bookmark v1.8.0
com.android.tools.build:gradle
> 8.7.1
com.kisio.navitia.sdk.engine:design
> 2.18.0
com.kisio.navitia.sdk.engine:router
> 2.6.1
com.kisio.navitia.sdk.engine:toolbox
> 2.18.0
stations
for bookmark_mode.display
in the configurationkotlin
> 1.9.25
com.android.tools.build:gradle
> 8.7.2
compileSdk
> 35
androidx.constraintlayout:constraintlayout
> 2.2.0
androidx.core:core-ktx
> 1.15.0
androidx.fragment:fragment-ktx
> 1.8.5
androidx.lifecycle:lifecycle-viewmodel-ktx
> 2.8.7
com.kisio.navitia.sdk.data:expert
> 3.5.2
com.kisio.navitia.sdk.engine:design
> 2.19.0
com.kisio.navitia.sdk.engine:router
> 2.6.2
com.kisio.navitia.sdk.engine:toolbox
> 1.19.0
com.android.tools.build:gradle
> 8.7.3
AroundMeConfiguration.featuresConfiguration
by AroundMeConfiguration.features
androidx.appcompat:appcompat
> 1.6.1
com.google.android.material:material
> 1.8.0
com.kisio.navitia.sdk.ui:bookmark
> 1.2.0
com.kisio.navitia.sdk.data:expert
> 3.2.2
androidx.test.ext:junit
> 1.1.5
home
and work
buttons added next to Where shall we go?
buttonandroidx.recyclerview:recyclerview
>1.3.0
com.kisio.navitia.sdk.ui:bookmark
> 1.2.1
androidx.test.espresso:espresso-core
> 3.5.1
com.kisio.navitia.sdk.ui:bookmark
> 1.2.2
AroundMeEnvironment
which can have SBX
, CUS
and PROD
AroundMeUI.init()
kotlin
> 1.8.21
gradle-wrapper
> 8.0
com.android.tools.build:gradle
> 8.0.2
minSdk
> 23
androidx.recyclerview:recyclerview
> 1.3.1
com.kisio.navitia.sdk.ui:bookmark
> Removedjava.io.Serializable
com.android.tools.build:gradle
> 8.1.1
compileSdk
> 34
buildToolsVersion
> 34.0.0
com.google.maps.android:android-maps-utils
> 3.5.3
com.kisio.navitia.sdk.data:expert
> 3.4.1
kotlin
> 1.9.22
gradle-wrapper
> 8.2
com.android.tools.build:gradle
> 8.2.1
com.google.firebase:firebase-crashlytics-gradle
> 2.9.9
com.google.gms:google-services
> 4.4.0
androidx.core:core-ktx
> 1.12.0
androidx.fragment:fragment-ktx
> 1.6.2
androidx.lifecycle:lifecycle-viewmodel-ktx
> 2.6.2
androidx.recyclerview:recyclerview
> 1.3.2
androidx.room:room-compiler
> 2.6.1
. Use ksp
instead of kapt
androidx.room:room-ktx
> 2.6.1
androidx.room:room-runtime
> 2.6.1
com.google.android.material:material
> 1.11.0
com.google.dagger:dagger
> 2.50
com.google.dagger:dagger-android-support
> 2.50
com.google.dagger:dagger-compiler
> 2.50
com.kisio.navitia.sdk.engine:design
> 2.13.0
com.kisio.navitia.sdk.engine:router
> 2.3.1
com.kisio.navitia.sdk.engine:toolbox
> 1.13.1
org.jetbrains.kotlinx:kotlinx-coroutines-core
> 1.7.1
org.jetbrains.kotlinx:kotlinx-coroutines-android
> 1.7.1
org.jetbrains.kotlinx:kotlinx-serialization-json
> 1.5.1
AroundMeDisruptionColors
showDirectlyAutoCompletion
option for Where are we going?com.kisio.navitia.sdk.engine:design
> 2.14.0
com.kisio.navitia.sdk.engine:router
> 2.4.0
com.kisio.navitia.sdk.engine:toolbox
> 1.14.0
All favorites
button opens the corresponding tab in the Bookmark
modulecom.kisio.navitia.sdk.data:expert
> 3.5.1
com.kisio.navitia.sdk.engine:design
> 2.15.0
com.kisio.navitia.sdk.engine:router
> 2.4.1
com.kisio.navitia.sdk.engine:toolbox
> 1.15.0
com.kisio.navitia.sdk.engine:design
> 2.16.0
com.kisio.navitia.sdk.engine:router
> 2.5.0
com.kisio.navitia.sdk.engine:toolbox
> 1.16.0
com.kisio.navitia.sdk.engine:design
> 2.16.1
com.kisio.navitia.sdk.engine:router
> 2.5.1
In your project, add the following lines to your Podfile
:
source 'https://github.com/CocoaPods/Specs.git' # Default Cocoapods URL
+source 'https://github.com/hove-io/Podspecs.git' # Around Me podspec URL
+
+target 'YOUR_PROJECT_SCHEME' do
+ pod 'AroundMeSDK', '3.10.0' # Around Me Pod definition
+end
+
+# Required for XCFramework
+post_install do |installer|
+ installer.pods_project.targets.each do |target|
+ target.build_configurations.each do |config|
+ config.build_settings['BUILD_LIBRARY_FOR_DISTRIBUTION'] = 'YES'
+ end
+ end
+end
+
Using your CLI, run pod install
in your project directory.
Warning
+Make sure to read the modules configuration section before proceeding
+This module is set up by calling AroundMe.shared.initialize()
method which takes the following parameters:
Name | +Required | +Description | +Type | +Example | +
---|---|---|---|---|
coverage |
++ | Navitia coverage | +String |
+fr-idf |
+
env |
++ | Navitia environment | +String |
+PROD |
+
colors |
++ | Define the custom colors | +AroundMeColorsConfiguration |
+- | +
fonts |
++ | Use custom fonts | +AroundMeFontsConfiguration |
+- | +
lineResources |
++ | List of transport lines resource IDs | +[LineResource] |
+- | +
modeResources |
++ | List of transport modes resource IDs | +[ModeResource] |
+- | +
transportCategories |
++ | List of supported transport modes | +[TransportCategory] |
+- | +
poiCategories |
++ | List of available POIs | +[PoiCategory] |
+- | +
providerResources |
++ | Transport providers configuration | +[ProviderResource] |
+- | +
titleResources |
++ | Screens titles customization | +AroundMeTitlesResources |
+- | +
features |
++ | Enable/disable some features | +AroundMeFeaturesConfiguration |
+- | +
You can also call the initialize()
method with the global JSON configuration file added to your application bundle:
Name | +Required | +Description | +Type | +Example | +
---|---|---|---|---|
configurationJsonFile |
++ | Global configuration JSON file name | +String |
+configuration.json |
+
do {
+ let transportCategories = [TransportCategory(
+ modules: ["aroundme"],
+ iconRes: "ic_section_mode_metro",
+ nameRes: "metro",
+ selected: true,
+ modes: [TransportCategoryMode(
+ physical: TransportPhysicalMode(
+ id: "physical_mode:Metro",
+ nameRes: "metro"
+ ),
+ commercial: TransportCommercialMode(
+ id: "commercial_mode:Metro",
+ name: "Metro"
+ )
+ )],
+ firstSectionModes: ["walking"],
+ lastSectionModes: ["walking"]
+ )]
+ let aroundmeColorsConfiguration = AroundMeColorsConfiguration(
+ primaryColor: "#88819f",
+ secondaryColor: "#8faa96"
+ )
+
+ try AroundMe.shared.initialize(
+ coverage: "fr-idf",
+ token: "your_token",
+ env: "PROD",
+ colors: aroundmeColorsConfiguration,
+ transportCategories: transportCategories
+ )
+} catch {
+ Logger.error("%@", String(
+ format: "Around Me SDK cannot be initialized! %@",
+ error.localizedDescription
+ ))
+}
+
In order to receive the list of generated events within Around Me module, you have to assign the instance of the tracker to the Around Me module instance as follows and implement the required methods:
+ +This module has a single entry point. The parameter showBack
handles the back button visibility on the first screen.
guard let aroundMeViewController = AroundMe.shared.rootViewController else {
+ return nil
+}
+aroundMeViewController.showBack = false // Hide back button embedded in the first screen
+
If you want to use the rootViewController
as a ChildViewController
of your ViewController
, you should embed it in an NavigationController
.
This screen content is a visual version of the passed transport categories and POI categories configuration (check modules configuration section for more information). The selected elements will be used to filter the data received and drawn within the map. One filter should at least be selected or else the user can't apply the current filters configuration.
+If you want to reset the user filters configuration, you can simply call AroundMeUI.getInstance().resetUserPreferences()
and the current configuration will be deleted and the screen will be updated according to the new passed configuration.
Around Me module can exchange data with or navigate to either other modules or the host application.
+To do this, the host application must initialize Router
. This singleton will ensure communication between the different modules or the app. Communication will not occur unless those are registered beforehand:
try Router.shared
+ .register(aroundMe: AroundMe.shared.aroundMeRouter)
+ ... // Register modules and/or app
+ .initialize()
+
Enabling
Around Me module communicates with Bookmark module in order to vizualize favorite stations, journeys and POIs. You should enable the bookmark_mode
parameter in the features configuration.
Bookmark module must be registered in the Router
to build the connection between these modules:
Methods
The following methods from the CustomAroundMeBookmarkDelegate
interface should be implemented by the host application to enable navigation to the Bookmark module or any other custom screen. Note that the parameters of these methods can be omitted as needed.
Warning
+If you don't implement this protocol, the Bookmark module will be shown.
+This method is called after click on the favorite home shortcut button, in case it is empty. +
func onHomeAddressCompletionRequested(module: Router.BookmarkLinkedModule) {
+ // launch the bookmark module screen or your custom screen
+}
+
Param | +Type | +Description | +Value | +
---|---|---|---|
module |
+Router.BookmarkLinkedModule |
+Module triggering the method call | +Router.BookmarkLinkedModule.aroundMe or Router.BookmarkLinkedModule.journey |
+
This method is called after click on the favorite work shortcut button, in case it is empty.
+func onWorkAddressCompletionRequested(module: Router.BookmarkLinkedModule) {
+ // launch the bookmark module screen or your custom screen if the favorite work address is empty
+}
+
Param | +Type | +Description | +Value | +
---|---|---|---|
module |
+Router.BookmarkLinkedModule |
+Module triggering the method call | +Router.BookmarkLinkedModule.aroundMe or Router.BookmarkLinkedModule.journey |
+
func onSeeAllFavoritesClicked() {
+ // launch the bookmark module screen or your custom screen
+ }
+
Enabling
Around Me module communicates with Journey module in order to get directions for a chosen itinerary. You should enable the journey_mode
and the go_from_go_to
parameter in the features configuration.
+Another way to communicate with is through the Map screen and precisely the Where are we going? button, this feature should also be enabled by setting the where_shall_we_go
in the features configuration to true
.
Journey module must also be registered in the Router
to build the connection between these modules:
+
Enabling
Around Me module communicates with Traffic module in order to easily access traffic information. You should enable the traffic_mode
parameter in the features configuration.
Traffic module must also be registered in the Router
to build the connection between these modules:
NavitiaSDK
> 2.3.2
RealmSwift
> 10.17.0
FlexLayout
> 1.3.23
PinLayout
> 1.10.2
MaterialComponents/ProgressView
> 124.2.0
MaterialComponents/BottomSheet
> 124.2.0
NavitiaSDK
> 2.3.4
RealmSwift
> 10.17.0
FlexLayout
> 1.3.23
PinLayout
> 1.10.2
MaterialComponents/ProgressView
> 124.2.0
MaterialComponents/BottomSheet
> 124.2.0
stations
for bookmark_mode.display
in the configurationDesignEngine
-> 2.18.0
RouterEngine
-> 1.5.3
NavitiaSDK
> 2.3.4
RealmSwift
> 10.17.0
FlexLayout
> 1.3.23
PinLayout
> 1.10.2
MaterialComponents/ProgressView
> 124.2.0
MaterialComponents/BottomSheet
> 124.2.0
home
and work
buttons added next to Where shall we go?
buttonNavitiaSDK
> 2.3.4
RealmSwift
> 10.17.0
FlexLayout
> 1.3.23
PinLayout
> 1.10.2
MaterialComponents/ProgressView
> 124.2.0
MaterialComponents/BottomSheet
> 124.2.0
ShowBack
paramFavorite stations
if no station is added to favoritesSee around me
button layoutDesignEngine
-> 2.7.0
RealmSwift
-> 10.42.0
RouterEngine
-> 1.0.0
iOS 14
minimunDesignEngine
: 2.12.0
RouterEngine
: 1.1.3
NavitiaSDK
: 2.7.1
5.10
v1.2.0
v2.13.0
5.10
5.10
5.10
5.10
Swift
-> 6.0
v1.5.2
v2.17.0
6.0
Refer to the following schema to learn more about different interactions and how to navigate between module screens:
+graph TB
+ Map(Map) --> Details(Details)
+ Map(Map) --> MapDragged(Map dragged)
+ MapDragged(Map dragged) --> Search(Search)
+ MapDragged(Map dragged) --> Filters(Filters)
+ Map(Map) --> Search(Search)
+The map screen represents the main screen of this module. It shows the places nearby the center of the visible region, draws them on the map and adds them to the bottom sliding panel.
+The shown data depend on the selected elements in the filters screen.
In the bottom sheet of the main screen, the last added favorite stations are shown with the next departures for each direction, as well as an All Favorites button that redirects the user to the bookmark module. In the same section, if the user has added his journeys to favorites in journey module, a favorite journeys section appears showing the list of bookmarked journeys.
+In the details bottom sheet of a station or a POI, there is a star button in order to save or delete it from the bookmarks.
+404
+This section is not written yet
+The search screen allows the user to seek for a place using a built-in autocompletion. The result is a selection of addresses, stations and points of interest based on the user search input text.
+If an element is selected, this screen will disappear and the map will be centered over the selected item location.
+Please note that a history feature is added to this screen, allowing the user to choose from the previous selected items. The maxHistory
parameter defines the maximum number of items to show in the history list.
This screen content is a visual version of the passed transport categories and POI categories configuration (check modules configuration section for more information). The selected elements will be used to filter the data received and drawn within the map. One filter should at least be selected or else the user can't apply the current filters configuration.
+If you want to reset the user filters configuration, you can simply call AroundMeUI.getInstance().resetUserPreferences()
and the current configuration will be deleted and the screen will be updated according to the new passed configuration.