├── .gitignore
├── .idea
├── .name
├── compiler.xml
├── deploymentTargetDropDown.xml
├── git_toolbox_prj.xml
├── gradle.xml
├── inspectionProfiles
│ └── Project_Default.xml
├── kotlinc.xml
├── migrations.xml
└── vcs.xml
├── LICENSE
├── Parts Diagram.dia
├── README.md
├── app
├── .gitignore
├── build.gradle
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── com
│ │ └── kortisan
│ │ └── demoapp
│ │ └── ExampleInstrumentedTest.kt
│ ├── main
│ ├── AndroidManifest.xml
│ ├── java
│ │ └── com
│ │ │ └── kortisan
│ │ │ └── demoapp
│ │ │ ├── DemoAppKoreApplication.kt
│ │ │ └── StartActivity.kt
│ └── res
│ │ ├── drawable-v24
│ │ └── ic_launcher_foreground.xml
│ │ ├── drawable
│ │ └── ic_launcher_background.xml
│ │ ├── mipmap-anydpi-v26
│ │ ├── ic_launcher.xml
│ │ └── ic_launcher_round.xml
│ │ ├── mipmap-hdpi
│ │ ├── ic_launcher.webp
│ │ └── ic_launcher_round.webp
│ │ ├── mipmap-mdpi
│ │ ├── ic_launcher.webp
│ │ └── ic_launcher_round.webp
│ │ ├── mipmap-xhdpi
│ │ ├── ic_launcher.webp
│ │ └── ic_launcher_round.webp
│ │ ├── mipmap-xxhdpi
│ │ ├── ic_launcher.webp
│ │ └── ic_launcher_round.webp
│ │ ├── mipmap-xxxhdpi
│ │ ├── ic_launcher.webp
│ │ └── ic_launcher_round.webp
│ │ ├── values-night
│ │ └── themes.xml
│ │ ├── values
│ │ ├── colors.xml
│ │ ├── strings.xml
│ │ └── themes.xml
│ │ └── xml
│ │ ├── backup_rules.xml
│ │ ├── data_extraction_rules.xml
│ │ ├── voice_interaction_service.xml
│ │ └── voice_interaction_service_directions.xml
│ └── test
│ └── java
│ └── com
│ └── kortisan
│ └── demoapp
│ └── ExampleUnitTest.kt
├── authentication
├── .gitignore
├── build.gradle
├── consumer-rules.pro
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── com
│ │ └── kortisan
│ │ └── authentication
│ │ └── ExampleInstrumentedTest.kt
│ ├── main
│ ├── AndroidManifest.xml
│ └── java
│ │ └── com
│ │ └── kortisan
│ │ └── authentication
│ │ ├── domain
│ │ ├── AuthenticationViewModel.kt
│ │ └── models
│ │ │ ├── AskForEmailModel.kt
│ │ │ ├── AskForPasswordModel.kt
│ │ │ └── ReadBiometricsModel.kt
│ │ └── presentation
│ │ ├── AuthenticationMainActivity.kt
│ │ ├── AuthenticationSceneBuilder.kt
│ │ ├── actions
│ │ └── SetTextAction.kt
│ │ ├── blocs
│ │ ├── AskForEmailBloc.kt
│ │ ├── AskForPasswordBloc.kt
│ │ ├── LoginBloc.kt
│ │ └── ReadBiometricsBloc.kt
│ │ └── states
│ │ ├── AskForEmailState.kt
│ │ └── productionRules
│ │ └── AskForEmailProductionRules.kt
│ └── test
│ └── java
│ └── com
│ └── kortisan
│ └── authentication
│ └── ExampleUnitTest.kt
├── build.gradle
├── content
├── .gitignore
├── build.gradle
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── com
│ │ └── kortisan
│ │ └── content
│ │ └── ExampleInstrumentedTest.kt
│ ├── main
│ ├── AndroidManifest.xml
│ ├── java
│ │ └── com
│ │ │ └── kortisan
│ │ │ └── content
│ │ │ ├── domain
│ │ │ ├── MainActivityViewModel.kt
│ │ │ └── models
│ │ │ │ └── DashboardModel.kt
│ │ │ └── presentation
│ │ │ ├── MainActivity.kt
│ │ │ ├── blocs
│ │ │ └── DashboardBloc.kt
│ │ │ ├── states
│ │ │ └── NotificationTextState.kt
│ │ │ └── tagging
│ │ │ └── MainActivitySceneBuilder.kt
│ └── res
│ │ ├── drawable-v24
│ │ └── ic_launcher_foreground.xml
│ │ ├── drawable
│ │ ├── baseline_face_24.xml
│ │ └── ic_launcher_background.xml
│ │ ├── mipmap-anydpi-v26
│ │ ├── ic_launcher.xml
│ │ └── ic_launcher_round.xml
│ │ ├── mipmap-hdpi
│ │ ├── ic_launcher.webp
│ │ └── ic_launcher_round.webp
│ │ ├── mipmap-mdpi
│ │ ├── ic_launcher.webp
│ │ └── ic_launcher_round.webp
│ │ ├── mipmap-xhdpi
│ │ ├── ic_launcher.webp
│ │ └── ic_launcher_round.webp
│ │ ├── mipmap-xxhdpi
│ │ ├── ic_launcher.webp
│ │ └── ic_launcher_round.webp
│ │ ├── mipmap-xxxhdpi
│ │ ├── ic_launcher.webp
│ │ └── ic_launcher_round.webp
│ │ ├── values-night
│ │ └── themes.xml
│ │ └── values
│ │ ├── colors.xml
│ │ ├── strings.xml
│ │ └── themes.xml
│ └── test
│ └── java
│ └── com
│ └── kortisan
│ └── content
│ └── ExampleUnitTest.kt
├── fileTemplates
├── Business Logic Component (BLoC).kt
├── Business Logic Component (BLoC).kt.child.0.kt
├── Business Logic Component (BLoC).kt.child.1.kt
├── Business Logic Component (BLoC).kt.child.2.kt
├── Business Logic Component (BLoC).kt.child.3.kt
├── Business Logic Component (BLoC).kt.child.4.kt
├── Content Caretaker.kt
├── Framework Gate.kt
├── KSP Annotation.kt
├── KSP Annotation.kt.child.0.kt
├── KSP Annotation.kt.child.1.kt
├── Storage Local BD.kt
├── Storage Local Datastore.kt
├── Storage Remote Service.kt
├── Storage Repository.kt
├── Storage Security Strategy.kt
├── ViewModel with ActionDispatcher.kt
├── ViewModel with ActionDispatcher.kt.child.0.kt
└── includes
│ └── File Header.java
├── framework
├── .gitignore
├── build.gradle
├── consumer-rules.pro
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── com
│ │ └── kortisan
│ │ └── framework
│ │ └── ExampleInstrumentedTest.kt
│ ├── main
│ ├── AndroidManifest.xml
│ ├── java
│ │ └── com
│ │ │ └── kortisan
│ │ │ └── framework
│ │ │ ├── ApplicationExtensionFunctions.kt
│ │ │ ├── FrameworkApplicationBinding.kt
│ │ │ ├── bloc
│ │ │ ├── BaseBloc.kt
│ │ │ ├── BaseUseCase.kt
│ │ │ ├── BlocState.kt
│ │ │ ├── ReduxViewModelBase.kt
│ │ │ ├── ReduxViewModelFactory.kt
│ │ │ ├── Resource.kt
│ │ │ ├── SingleActivityWithViewModel.kt
│ │ │ └── ViewModelActionDispatcher.kt
│ │ │ ├── entities
│ │ │ ├── Address.kt
│ │ │ ├── Device.kt
│ │ │ ├── DynamicKeys.kt
│ │ │ └── Tokens.kt
│ │ │ ├── entrypoints
│ │ │ ├── ActorProviderStrategy.kt
│ │ │ ├── AppLinksEntrypointStrategy.kt
│ │ │ ├── ClevertapEntrypointStrategy.kt
│ │ │ ├── ComposeNavigationEntrypointStrategy.kt
│ │ │ ├── DeeplinkEntrypointStrategy.kt
│ │ │ ├── EntrypointStrategy.kt
│ │ │ ├── GoogleAssistantEntrypointStrategy.kt
│ │ │ ├── IntentEntrypointStrategy.kt
│ │ │ ├── OneLinkEntrypointStrategy.kt
│ │ │ ├── PushNotificationEntrypointStrategy.kt
│ │ │ └── ShortcutEntrypointStrategy.kt
│ │ │ ├── redux
│ │ │ ├── ApplicationActionDispatcher.kt
│ │ │ ├── actions
│ │ │ │ ├── BiometricsActions.kt
│ │ │ │ ├── DefaultErrorAction.kt
│ │ │ │ ├── EnrollmentActions.kt
│ │ │ │ ├── EventsActions.kt
│ │ │ │ ├── ExitGateAction.kt
│ │ │ │ ├── GeopositionActions.kt
│ │ │ │ ├── LoadStateAction.kt
│ │ │ │ ├── NavigationActions.kt
│ │ │ │ ├── NotificationActions.kt
│ │ │ │ ├── PerformanceScoreActions.kt
│ │ │ │ ├── ReDispatchAction.kt
│ │ │ │ ├── ReduxAction.kt
│ │ │ │ ├── RemoteConfigActions.kt
│ │ │ │ ├── RevertAction.kt
│ │ │ │ ├── SensorsActions.kt
│ │ │ │ ├── UpdateActions.kt
│ │ │ │ └── wrappers
│ │ │ │ │ ├── ActionEventInstance.kt
│ │ │ │ │ ├── AttachedEventsInterface.kt
│ │ │ │ │ └── AttatchEventWrapper.kt
│ │ │ ├── controllers
│ │ │ │ ├── ControllersProxy.kt
│ │ │ │ ├── ReduxControllerAbstract.kt
│ │ │ │ ├── ReduxControllerState.kt
│ │ │ │ ├── errorHandler
│ │ │ │ │ └── ShowErrorActivity.kt
│ │ │ │ ├── gates
│ │ │ │ │ ├── BaseGate.kt
│ │ │ │ │ ├── ExitGateResult.kt
│ │ │ │ │ └── GatesController.kt
│ │ │ │ ├── geoposition
│ │ │ │ │ └── GeopositionController.kt
│ │ │ │ ├── navigation
│ │ │ │ │ ├── FlowNameAlias.kt
│ │ │ │ │ ├── NavigationController.kt
│ │ │ │ │ ├── PrimitiveTargetActivityIdentifier.kt
│ │ │ │ │ ├── contracts
│ │ │ │ │ │ ├── CustomActivityContract.kt
│ │ │ │ │ │ ├── ReduxActivityResultContract.kt
│ │ │ │ │ │ └── ResultContractStatus.kt
│ │ │ │ │ ├── protocol
│ │ │ │ │ │ ├── DefaultParams.kt
│ │ │ │ │ │ ├── NavigationTarget.kt
│ │ │ │ │ │ └── StartComposeDestination.kt
│ │ │ │ │ ├── routeExplorer
│ │ │ │ │ │ ├── NavigationDirectories.kt
│ │ │ │ │ │ └── RouteExplorer.kt
│ │ │ │ │ ├── strategies
│ │ │ │ │ │ └── NavigationStrategy.kt
│ │ │ │ │ └── targets
│ │ │ │ │ │ ├── AuthenticationNavigationGroup.kt
│ │ │ │ │ │ ├── DashboardNavigationGroup.kt
│ │ │ │ │ │ ├── NavigationTargetGroup.kt
│ │ │ │ │ │ ├── NavigationTargetParams.kt
│ │ │ │ │ │ ├── SealedActivityClassList.kt
│ │ │ │ │ │ ├── TargetActivity.kt
│ │ │ │ │ │ ├── TargetClass.kt
│ │ │ │ │ │ ├── TargetCompose.kt
│ │ │ │ │ │ └── TargetExternal.kt
│ │ │ │ ├── notifications
│ │ │ │ │ ├── FirebaseMessagingDecorator.kt
│ │ │ │ │ ├── FirebaseMessagingReceiver.kt
│ │ │ │ │ ├── NotificationChannel.kt
│ │ │ │ │ └── PushNotificationController.kt
│ │ │ │ ├── performanceScrore
│ │ │ │ │ └── CalculatePerformanceController.kt
│ │ │ │ ├── remoteConfig
│ │ │ │ │ ├── RemoteConfigController.kt
│ │ │ │ │ └── parsers
│ │ │ │ │ │ ├── FlowNameAliasRemoteConfig.kt
│ │ │ │ │ │ ├── RemoteConfigDirectoryMap.kt
│ │ │ │ │ │ └── TaggingSettingsRemoteConfig.kt
│ │ │ │ ├── securityAssets
│ │ │ │ │ ├── BiometricPromptActivity.kt
│ │ │ │ │ └── SecurityAssetsController.kt
│ │ │ │ ├── sensors
│ │ │ │ │ └── SensorsController.kt
│ │ │ │ ├── tagging
│ │ │ │ │ ├── SceneBuilderBase.kt
│ │ │ │ │ ├── TaggingController.kt
│ │ │ │ │ ├── builders
│ │ │ │ │ │ └── EntryPointSceneBuilder.kt
│ │ │ │ │ ├── decorators
│ │ │ │ │ │ ├── AttachEventDecorator.kt
│ │ │ │ │ │ ├── SceneBaseDecorator.kt
│ │ │ │ │ │ ├── SceneDecoratorInterface.kt
│ │ │ │ │ │ └── application
│ │ │ │ │ │ │ └── SensorsTaggingDecorator.kt
│ │ │ │ │ └── providers
│ │ │ │ │ │ ├── FirebaseTaggingStrategy.kt
│ │ │ │ │ │ └── TaggingStrategy.kt
│ │ │ │ └── updatesController
│ │ │ │ │ └── UpdatesController.kt
│ │ │ ├── gates
│ │ │ │ ├── AskForEmailGate.kt
│ │ │ │ ├── CheckUpdateGate.kt
│ │ │ │ ├── FingerprintGate.kt
│ │ │ │ ├── LoggedGate.kt
│ │ │ │ └── PasswordAuthorizationGate.kt
│ │ │ ├── middleware
│ │ │ │ ├── BiometricsMiddleware.kt
│ │ │ │ ├── CalculatePerformanceScoreMiddleware.kt
│ │ │ │ ├── ErrorHandlerMiddleware.kt
│ │ │ │ ├── GatesMiddleware.kt
│ │ │ │ ├── MiddlewareInterface.kt
│ │ │ │ ├── NavigationMiddleware.kt
│ │ │ │ ├── NotificationMiddleware.kt
│ │ │ │ ├── PositionMiddleware.kt
│ │ │ │ ├── RemoteConfigMiddleware.kt
│ │ │ │ ├── SensorsMiddleware.kt
│ │ │ │ ├── TaggingMiddleware.kt
│ │ │ │ └── UpdatesMiddleware.kt
│ │ │ ├── state
│ │ │ │ ├── ConnectivityState.kt
│ │ │ │ ├── DeviceState.kt
│ │ │ │ ├── GeopositionState.kt
│ │ │ │ ├── NavigationState.kt
│ │ │ │ ├── PerformanceScoreState.kt
│ │ │ │ ├── PermissionState.kt
│ │ │ │ ├── ReduxState.kt
│ │ │ │ ├── RemoteConfigState.kt
│ │ │ │ ├── RouteFlowNamesAliasState.kt
│ │ │ │ ├── SensorsState.kt
│ │ │ │ ├── SessionState.kt
│ │ │ │ ├── UpdateState.kt
│ │ │ │ ├── caretaker
│ │ │ │ │ ├── CaretakerStrategy.kt
│ │ │ │ │ ├── DatastoreCaretakerStrategy.kt
│ │ │ │ │ ├── FileCaretakerStrategy.kt
│ │ │ │ │ └── RoomCaretakerStrategy.kt
│ │ │ │ ├── productionrules
│ │ │ │ │ ├── ProductionRule.kt
│ │ │ │ │ └── dsl
│ │ │ │ │ │ └── ProductionRuleDSL.kt
│ │ │ │ └── validations
│ │ │ │ │ ├── StateValidationResult.kt
│ │ │ │ │ ├── ValidationBuilder.kt
│ │ │ │ │ ├── ValidationRule.kt
│ │ │ │ │ └── rules
│ │ │ │ │ ├── ValidateEmailFormatRule.kt
│ │ │ │ │ ├── ValidateMinLengthRule.kt
│ │ │ │ │ └── ValidateNotEmptyRule.kt
│ │ │ └── stores
│ │ │ │ └── ApplicationStateStore.kt
│ │ │ ├── services
│ │ │ ├── location
│ │ │ │ └── KoreLocationService.kt
│ │ │ ├── mediaplayer
│ │ │ │ └── MediaPlayerService.kt
│ │ │ └── voiceinteraction
│ │ │ │ ├── VoiceCommandInteractionService.kt
│ │ │ │ ├── VoiceCommandInteractionSession.kt
│ │ │ │ └── VoiceCommandInteractionSessionService.kt
│ │ │ └── storage
│ │ │ ├── local
│ │ │ ├── database
│ │ │ │ ├── TypeConverters.kt
│ │ │ │ └── dao
│ │ │ │ │ ├── BaseDao.kt
│ │ │ │ │ └── SecurityLayerDao.kt
│ │ │ └── datastore
│ │ │ │ ├── DataStoreBinding.kt
│ │ │ │ ├── DataStoreSecureInterface.kt
│ │ │ │ ├── serializers
│ │ │ │ ├── DynamicKeysVaultStoreSerializer.kt
│ │ │ │ └── TokensVaultStoreSerializer.kt
│ │ │ │ └── vaults
│ │ │ │ ├── DynamicKeysVaultStoreSecure.kt
│ │ │ │ └── TokensVaultStoreSecure.kt
│ │ │ ├── remote
│ │ │ └── webservices
│ │ │ │ ├── client
│ │ │ │ ├── ApiClient.kt
│ │ │ │ ├── EndPoints.kt
│ │ │ │ ├── interceptors
│ │ │ │ │ ├── apiInterfaces
│ │ │ │ │ │ └── AuthenticationApiInterface.kt
│ │ │ │ │ ├── application
│ │ │ │ │ │ ├── AuthInterceptor.kt
│ │ │ │ │ │ └── HttpCodeInterceptor.kt
│ │ │ │ │ └── network
│ │ │ │ │ │ └── Retry.kt
│ │ │ │ └── strategies
│ │ │ │ │ ├── ClientBuilderStrategy.kt
│ │ │ │ │ └── NoInterceptorStrategy.kt
│ │ │ │ └── dto
│ │ │ │ ├── BaseRequest.kt
│ │ │ │ ├── BaseResponse.kt
│ │ │ │ └── PersistentResponseInterface.kt
│ │ │ ├── repositories
│ │ │ ├── RepositoryStrategy.kt
│ │ │ └── RepositoryUtils.kt
│ │ │ └── security
│ │ │ ├── AesStrategy.kt
│ │ │ ├── NativeKeysAccess.kt
│ │ │ ├── NoSecurityStrategy.kt
│ │ │ └── SecurityStrategy.kt
│ ├── proto
│ │ ├── DynamicKeysVaultStore.proto
│ │ └── TokensVaultStore.proto
│ └── res
│ │ ├── drawable
│ │ └── error_24.xml
│ │ └── values
│ │ └── strings.xml
│ └── test
│ └── java
│ └── com
│ └── kortisan
│ └── framework
│ └── ExampleUnitTest.kt
├── gradle.properties
├── gradle
├── libs.versions.toml
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── ksp
├── .gitignore
├── build.gradle
├── consumer-rules.pro
├── proguard-rules.pro
└── src
│ └── main
│ ├── AndroidManifest.xml
│ ├── java
│ └── com
│ │ └── kortisan
│ │ └── ksp
│ │ └── annotations
│ │ ├── FlowNameActivity.kt
│ │ ├── FlowNameClass.kt
│ │ ├── FlowNameCompose.kt
│ │ ├── FlowNameExternal.kt
│ │ ├── FlowNameProcessor.kt
│ │ └── FlowNameProcessorProvider.kt
│ └── resources
│ └── META-INF
│ └── services
│ └── com.google.devtools.ksp.processing.SymbolProcessorProvider
├── projectBuildSettings
├── dependencyHierarchy.gradle
├── detectAndJoinKSP.gradle
├── projectBuild.gradle
├── projectBuildTypes.gradle
├── projectConfig.gradle
├── projectDependencies.gradle
├── projectDependenciesFramework.gradle
├── projectFlavors.gradle
└── protobufSettings.gradle
└── settings.gradle
/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea/caches
5 | /.idea/libraries
6 | /.idea/modules.xml
7 | /.idea/workspace.xml
8 | /.idea/navEditor.xml
9 | /.idea/assetWizardSettings.xml
10 | /.idea/misc.xml
11 | /.idea/sonarlint/issuestore/index.pb
12 | .DS_Store
13 | /build
14 | /captures
15 | .externalNativeBuild
16 | .cxx
17 | local.properties
18 | /.idea/sonarlint/
19 |
20 | # Kotlin 2.0
21 | .kotlin/
--------------------------------------------------------------------------------
/.idea/.name:
--------------------------------------------------------------------------------
1 | DemoAppKoreFrame
--------------------------------------------------------------------------------
/.idea/compiler.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/deploymentTargetDropDown.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/.idea/git_toolbox_prj.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/.idea/gradle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/.idea/inspectionProfiles/Project_Default.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/.idea/kotlinc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/.idea/migrations.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2024 Jacobo Gonzalez Tamayo
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/Parts Diagram.dia:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cobogt/kortisan-android-framework/3d072c6c5f0a2ab19dd7ae2d8f3999ffd6bc7709/Parts Diagram.dia
--------------------------------------------------------------------------------
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/app/build.gradle:
--------------------------------------------------------------------------------
1 | plugins {
2 | alias( libs.plugins.android.application )
3 | alias( libs.plugins.kotlin.android )
4 | alias( libs.plugins.devtools.ksp )
5 | alias( libs.plugins.compose.compiler )
6 | }
7 |
8 | apply from: "$rootDir.path/projectBuildSettings/projectBuild.gradle"
9 | def config = ext.projectGradleConfig
10 |
11 | android {
12 | namespace 'com.kortisan.demoapp'
13 | compileSdk config.compileSdkVersion
14 |
15 | defaultConfig {
16 | applicationId config.applicationId
17 | minSdk config.minSdkVersion
18 | targetSdk config.targetSdkVersion
19 |
20 | version getVersionName()
21 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
22 | multiDexEnabled true
23 | }
24 | }
25 |
26 | dependencies {
27 | implementation project(path: ':content')
28 | implementation project(path: ':framework')
29 | // Only for StartActivity
30 | implementation libs.appcompat
31 | }
--------------------------------------------------------------------------------
/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
--------------------------------------------------------------------------------
/app/src/androidTest/java/com/kortisan/demoapp/ExampleInstrumentedTest.kt:
--------------------------------------------------------------------------------
1 | package com.kortisan.demoapp
2 | /** * * * * * * * * *
3 | * Project KoreFrame
4 | * Created by Jacobo G Tamayo on 30/12/22.
5 | * * * * * * * * * * **/
6 |
7 | import androidx.test.platform.app.InstrumentationRegistry
8 | import androidx.test.ext.junit.runners.AndroidJUnit4
9 |
10 | import org.junit.Test
11 | import org.junit.runner.RunWith
12 |
13 | import org.junit.Assert.*
14 |
15 | /**
16 | * Instrumented test, which will execute on an Android device.
17 | *
18 | * See [testing documentation](http://d.android.com/tools/testing).
19 | */
20 | @RunWith(AndroidJUnit4::class)
21 | class ExampleInstrumentedTest {
22 | @Test
23 | fun useAppContext() {
24 | // Context of the app under test.
25 | val appContext = InstrumentationRegistry.getInstrumentation().targetContext
26 | assertEquals("com.kortisan.demoapp", appContext.packageName)
27 | }
28 | }
--------------------------------------------------------------------------------
/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 |
21 |
22 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/app/src/main/java/com/kortisan/demoapp/DemoAppKoreApplication.kt:
--------------------------------------------------------------------------------
1 | package com.kortisan.demoapp
2 | /** * * * * * * * * *
3 | * Project KoreFrame
4 | * Created by Jacobo G Tamayo on 30/12/22.
5 | * * * * * * * * * * **/
6 |
7 | import com.kortisan.framework.FrameworkApplicationBinding
8 |
9 | class DemoAppKoreApplication: FrameworkApplicationBinding()
--------------------------------------------------------------------------------
/app/src/main/java/com/kortisan/demoapp/StartActivity.kt:
--------------------------------------------------------------------------------
1 | package com.kortisan.demoapp
2 |
3 | import android.os.Bundle
4 | import androidx.appcompat.app.AppCompatActivity
5 | import com.kortisan.framework.entrypoints.IntentEntrypointStrategy
6 | import com.kortisan.framework.redux.ApplicationActionDispatcher
7 | import com.kortisan.framework.redux.actions.NavigationActions
8 | import com.kortisan.framework.redux.actions.ReduxAction
9 | import com.kortisan.framework.redux.controllers.ControllersProxy
10 | import com.kortisan.framework.redux.controllers.navigation.NavigationController
11 | import com.kortisan.framework.redux.gates.AskForEmailGate
12 | import com.kortisan.framework.redux.gates.FingerprintGate
13 | import com.kortisan.framework.redux.gates.LoggedGate
14 |
15 | class StartActivity: AppCompatActivity() {
16 | private val navigationController = ControllersProxy.getController()
17 |
18 | override fun onCreate(savedInstanceState: Bundle?) {
19 | super.onCreate(savedInstanceState)
20 |
21 | var startAction = IntentEntrypointStrategy( intent ).getAction()
22 |
23 | if( startAction is ReduxAction.EmptyAction )
24 | navigationController?.defaultNavigationTarget?.also {
25 | startAction = NavigationActions.NavigateToTarget( it )
26 | }
27 |
28 | finishAffinity()
29 |
30 | // Despachamos una acción al bus de eventos sin que repercuta en una vista
31 | ApplicationActionDispatcher.dispatch ( startAction.apply {
32 | // Aplicamos la compuerta que comprueba el estado de login del usuario
33 | //gates = listOf( LoggedGate )
34 | }
35 | )
36 | }
37 | }
--------------------------------------------------------------------------------
/app/src/main/res/drawable-v24/ic_launcher_foreground.xml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 |
15 |
18 |
21 |
22 |
23 |
24 |
30 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cobogt/kortisan-android-framework/3d072c6c5f0a2ab19dd7ae2d8f3999ffd6bc7709/app/src/main/res/mipmap-hdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cobogt/kortisan-android-framework/3d072c6c5f0a2ab19dd7ae2d8f3999ffd6bc7709/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cobogt/kortisan-android-framework/3d072c6c5f0a2ab19dd7ae2d8f3999ffd6bc7709/app/src/main/res/mipmap-mdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cobogt/kortisan-android-framework/3d072c6c5f0a2ab19dd7ae2d8f3999ffd6bc7709/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cobogt/kortisan-android-framework/3d072c6c5f0a2ab19dd7ae2d8f3999ffd6bc7709/app/src/main/res/mipmap-xhdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cobogt/kortisan-android-framework/3d072c6c5f0a2ab19dd7ae2d8f3999ffd6bc7709/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cobogt/kortisan-android-framework/3d072c6c5f0a2ab19dd7ae2d8f3999ffd6bc7709/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cobogt/kortisan-android-framework/3d072c6c5f0a2ab19dd7ae2d8f3999ffd6bc7709/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cobogt/kortisan-android-framework/3d072c6c5f0a2ab19dd7ae2d8f3999ffd6bc7709/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cobogt/kortisan-android-framework/3d072c6c5f0a2ab19dd7ae2d8f3999ffd6bc7709/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/app/src/main/res/values-night/themes.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
16 |
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #FFBB86FC
4 | #FF6200EE
5 | #FF3700B3
6 | #FF03DAC5
7 | #FF018786
8 | #FF000000
9 | #FFFFFFFF
10 |
--------------------------------------------------------------------------------
/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | DemoApp
3 |
--------------------------------------------------------------------------------
/app/src/main/res/values/themes.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
16 |
17 |
21 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/backup_rules.xml:
--------------------------------------------------------------------------------
1 |
8 |
9 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/data_extraction_rules.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
12 |
13 |
19 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/voice_interaction_service.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/voice_interaction_service_directions.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | - Para buscar un producto en la aplicación, di "Ok Google" seguido de tu búsqueda.
5 | - Por ejemplo, puedes decir "Ok Google, busca zapatillas de running" para encontrar zapatillas de running disponibles para la compra.
6 | - También puedes decir "Ok Google, muestra el carrito de compras" para ver el contenido de tu carrito de compras.
7 |
8 |
9 |
--------------------------------------------------------------------------------
/app/src/test/java/com/kortisan/demoapp/ExampleUnitTest.kt:
--------------------------------------------------------------------------------
1 | package com.kortisan.demoapp
2 | /** * * * * * * * * *
3 | * Project KoreFrame
4 | * Created by Jacobo G Tamayo on 30/12/22.
5 | * * * * * * * * * * **/
6 |
7 | import org.junit.Test
8 |
9 | import org.junit.Assert.*
10 |
11 | /**
12 | * Example local unit test, which will execute on the development machine (host).
13 | *
14 | * See [testing documentation](http://d.android.com/tools/testing).
15 | */
16 | class ExampleUnitTest {
17 | @Test
18 | fun addition_isCorrect() {
19 | assertEquals(4, 2 + 2)
20 | }
21 | }
--------------------------------------------------------------------------------
/authentication/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/authentication/build.gradle:
--------------------------------------------------------------------------------
1 | plugins {
2 | id 'com.android.library'
3 | id 'org.jetbrains.kotlin.android'
4 | id 'kotlin-kapt'
5 | alias( libs.plugins.devtools.ksp )
6 | alias( libs.plugins.compose.compiler )
7 | }
8 |
9 | apply from: "$rootDir.path/projectBuildSettings/projectBuild.gradle"
10 | def config = ext.projectGradleConfig
11 |
12 | android {
13 | namespace 'com.kortisan.authentication'
14 | compileSdk config.compileSdkVersion
15 | compileSdkVersion config.compileSdkVersion
16 |
17 | defaultConfig {
18 | minSdk config.minSdkVersion
19 | targetSdk config.targetSdkVersion
20 | targetSdkVersion config.targetSdkVersion
21 | compileSdk config.compileSdkVersion
22 | compileSdkVersion config.compileSdkVersion
23 | version getVersionName()
24 |
25 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
26 |
27 | multiDexEnabled true
28 | consumerProguardFiles "consumer-rules.pro"
29 | }
30 | }
31 |
32 | dependencies {
33 | implementation project(path: ':framework')
34 |
35 | // KSP Annotation processor
36 | implementation project(path: ':ksp')
37 | ksp project(":ksp")
38 | }
--------------------------------------------------------------------------------
/authentication/consumer-rules.pro:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cobogt/kortisan-android-framework/3d072c6c5f0a2ab19dd7ae2d8f3999ffd6bc7709/authentication/consumer-rules.pro
--------------------------------------------------------------------------------
/authentication/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
--------------------------------------------------------------------------------
/authentication/src/androidTest/java/com/kortisan/authentication/ExampleInstrumentedTest.kt:
--------------------------------------------------------------------------------
1 | package com.kortisan.authentication
2 |
3 | import androidx.test.platform.app.InstrumentationRegistry
4 | import androidx.test.ext.junit.runners.AndroidJUnit4
5 |
6 | import org.junit.Test
7 | import org.junit.runner.RunWith
8 |
9 | import org.junit.Assert.*
10 |
11 | /**
12 | * Instrumented test, which will execute on an Android device.
13 | *
14 | * See [testing documentation](http://d.android.com/tools/testing).
15 | */
16 | @RunWith(AndroidJUnit4::class)
17 | class ExampleInstrumentedTest {
18 | @Test
19 | fun useAppContext() {
20 | // Context of the app under test.
21 | val appContext = InstrumentationRegistry.getInstrumentation().targetContext
22 | assertEquals("com.kortisan.authentication.test", appContext.packageName)
23 | }
24 | }
--------------------------------------------------------------------------------
/authentication/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
--------------------------------------------------------------------------------
/authentication/src/main/java/com/kortisan/authentication/domain/models/AskForEmailModel.kt:
--------------------------------------------------------------------------------
1 | package com.kortisan.authentication.domain.models
2 |
3 | data class AskForEmailModel(val email: String = "")
4 |
--------------------------------------------------------------------------------
/authentication/src/main/java/com/kortisan/authentication/domain/models/AskForPasswordModel.kt:
--------------------------------------------------------------------------------
1 | package com.kortisan.authentication.domain.models
2 |
3 | data class AskForPasswordModel(val id: Any? = null)
4 |
--------------------------------------------------------------------------------
/authentication/src/main/java/com/kortisan/authentication/domain/models/ReadBiometricsModel.kt:
--------------------------------------------------------------------------------
1 | package com.kortisan.authentication.domain.models
2 |
3 | data class ReadBiometricsModel(val id: Any? = null)
4 |
--------------------------------------------------------------------------------
/authentication/src/main/java/com/kortisan/authentication/presentation/AuthenticationSceneBuilder.kt:
--------------------------------------------------------------------------------
1 | package com.kortisan.authentication.presentation
2 |
3 | import com.kortisan.framework.redux.controllers.tagging.SceneBuilderBase
4 |
5 | class AuthenticationSceneBuilder private constructor(): SceneBuilderBase() {
6 | class Builder: SceneBuilderBase.Builder() {
7 | override val taggingScene: SceneBuilderBase = AuthenticationSceneBuilder()
8 | fun setCurrentFlow( name: String ) = apply {
9 | taggingScene.baseParams["currentFlowName"] = name
10 | }
11 | }
12 |
13 | override fun getData(): Map = baseParams
14 | }
15 |
--------------------------------------------------------------------------------
/authentication/src/main/java/com/kortisan/authentication/presentation/actions/SetTextAction.kt:
--------------------------------------------------------------------------------
1 | package com.kortisan.authentication.presentation.actions
2 |
3 | import com.kortisan.framework.redux.actions.ReduxAction
4 |
5 | data class SetTextAction(
6 | val newText: String
7 | ): ReduxAction()
8 |
--------------------------------------------------------------------------------
/authentication/src/main/java/com/kortisan/authentication/presentation/blocs/AskForPasswordBloc.kt:
--------------------------------------------------------------------------------
1 | package com.kortisan.authentication.presentation.blocs
2 |
3 | import androidx.compose.material3.Text
4 | import androidx.compose.runtime.Composable
5 | import com.kortisan.authentication.domain.models.AskForPasswordModel
6 | import com.kortisan.framework.bloc.BaseBloc
7 | import com.kortisan.framework.bloc.BlocState
8 | import com.kortisan.framework.bloc.ViewModelActionDispatcher
9 |
10 | class AskForPasswordBloc (
11 | override val viewModelActionDispatcher: ViewModelActionDispatcher,
12 | override val state: BlocState
13 | ): BaseBloc(
14 | viewModelActionDispatcher, state
15 | ) {
16 | @Composable
17 | override fun Render() {
18 | Text("AskForPasswordBloc")
19 | }
20 | }
--------------------------------------------------------------------------------
/authentication/src/main/java/com/kortisan/authentication/presentation/blocs/LoginBloc.kt:
--------------------------------------------------------------------------------
1 | package com.kortisan.authentication.presentation.blocs
2 |
3 | import androidx.compose.foundation.layout.Column
4 | import androidx.compose.material3.Button
5 | import androidx.compose.material3.Text
6 | import androidx.compose.runtime.Composable
7 | import com.kortisan.framework.bloc.BaseBloc
8 | import com.kortisan.framework.bloc.BlocState
9 | import com.kortisan.framework.bloc.ViewModelActionDispatcher
10 | import com.kortisan.framework.redux.actions.NavigationActions
11 | import com.kortisan.framework.redux.controllers.navigation.targets.AuthenticationNavigationGroup
12 |
13 | class LoginBloc(
14 | override val viewModelActionDispatcher: ViewModelActionDispatcher,
15 | override val state: BlocState
16 | ): BaseBloc(
17 | viewModelActionDispatcher, state
18 | ) {
19 | @Composable
20 | override fun Render() {
21 | Column() {
22 | Text(text = "LoginBloc")
23 | Button(onClick = {
24 | // Enviamos una acción al despachador del viewModel de la actividad actual
25 | viewModelActionDispatcher.dispatch(
26 | NavigationActions.NavigateToTarget(
27 | AuthenticationNavigationGroup.Authentication.AskForEmailCompose
28 | )
29 | )
30 | }) {
31 | Text(text = "GOTO AskFor Email")
32 | }
33 | }
34 | }
35 | }
--------------------------------------------------------------------------------
/authentication/src/main/java/com/kortisan/authentication/presentation/blocs/ReadBiometricsBloc.kt:
--------------------------------------------------------------------------------
1 | package com.kortisan.authentication.presentation.blocs
2 |
3 | import androidx.compose.material3.Text
4 | import androidx.compose.runtime.Composable
5 | import com.kortisan.authentication.domain.models.ReadBiometricsModel
6 | import com.kortisan.framework.bloc.BaseBloc
7 | import com.kortisan.framework.bloc.BlocState
8 | import com.kortisan.framework.bloc.ViewModelActionDispatcher
9 |
10 | class ReadBiometricsBloc(
11 | override val viewModelActionDispatcher: ViewModelActionDispatcher,
12 | override val state: BlocState
13 | ): BaseBloc(
14 | viewModelActionDispatcher, state
15 | ) {
16 | @Composable
17 | override fun Render() {
18 | Text(text = "ReadBiometricsBloc")
19 | }
20 | }
--------------------------------------------------------------------------------
/authentication/src/main/java/com/kortisan/authentication/presentation/states/AskForEmailState.kt:
--------------------------------------------------------------------------------
1 | package com.kortisan.authentication.presentation.states
2 |
3 | import com.kortisan.authentication.presentation.states.productionRules.AskForEmailProductionRules
4 | import com.kortisan.framework.redux.state.productionrules.ProductionRule
5 | import com.kortisan.framework.redux.state.ReduxState
6 |
7 | /**
8 | * Estado que almacena el Email y valida que sea correcto
9 | * Usa la validación de longitud, formato y que no sea vacío.
10 | */
11 | sealed class AskForEmailState: ReduxState() {
12 | /**
13 | * En este caso particular se comparten las mismas reglas de producción
14 | */
15 | protected val sharedProductionRules = AskForEmailProductionRules.sharedProductionRules
16 |
17 | data object EmptyInput: AskForEmailState() {
18 | override val productionRules: List = sharedProductionRules
19 | }
20 |
21 | data class ErrorOnInput(
22 | val currentValue: String,
23 | val errorMessage: String
24 | ): AskForEmailState() {
25 | override val productionRules: List = sharedProductionRules
26 | }
27 |
28 | data class SuccessInput(
29 | val currentValue: String
30 | ): AskForEmailState() {
31 | override val productionRules: List = sharedProductionRules
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/authentication/src/test/java/com/kortisan/authentication/ExampleUnitTest.kt:
--------------------------------------------------------------------------------
1 | package com.kortisan.authentication
2 |
3 | import org.junit.Test
4 |
5 | import org.junit.Assert.*
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * See [testing documentation](http://d.android.com/tools/testing).
11 | */
12 | class ExampleUnitTest {
13 | @Test
14 | fun addition_isCorrect() {
15 | assertEquals(4, 2 + 2)
16 | }
17 | }
--------------------------------------------------------------------------------
/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | dependencies {
3 | //classpath libs.aws.android.sdk.appsync.gradle.plugin
4 | classpath libs.google.services
5 | classpath libs.firebase.crashlytics.gradle
6 | classpath libs.perf.plugin
7 | classpath libs.protobuf.gradle.plugin
8 | classpath libs.kotlin.gradle.plugin
9 | classpath libs.kotlin.serialization.plugin
10 | classpath libs.kotlin.gradle.build
11 | }
12 | repositories {
13 | mavenCentral()
14 | }
15 | }
16 |
17 | plugins {
18 | id 'com.android.application' version libs.versions.androidApplicationVer apply false
19 | id 'com.android.library' version libs.versions.androidApplicationVer apply false
20 | id 'org.jetbrains.kotlin.android' version libs.versions.kotlinVersion apply false
21 | id 'com.google.devtools.ksp' version libs.versions.ksp apply false
22 | }
23 |
24 | tasks.register('clean', Delete) {
25 | delete rootProject.buildDir
26 | }
27 |
--------------------------------------------------------------------------------
/content/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/content/build.gradle:
--------------------------------------------------------------------------------
1 | plugins {
2 | id 'com.android.library'
3 | id 'org.jetbrains.kotlin.android'
4 | id 'kotlin-kapt'
5 | alias( libs.plugins.devtools.ksp )
6 | alias( libs.plugins.compose.compiler )
7 | }
8 |
9 | apply from: "$rootDir.path/projectBuildSettings/projectBuild.gradle"
10 | def config = ext.projectGradleConfig
11 |
12 | android {
13 | namespace 'com.kortisan.content'
14 | compileSdk config.compileSdkVersion
15 | compileSdkVersion config.compileSdkVersion
16 |
17 | defaultConfig {
18 | minSdk config.minSdkVersion
19 | targetSdk config.targetSdkVersion
20 | compileSdk config.compileSdkVersion
21 | compileSdkVersion config.compileSdkVersion
22 | version getVersionName()
23 |
24 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
25 |
26 | multiDexEnabled true
27 | consumerProguardFiles "consumer-rules.pro"
28 | }
29 | }
30 |
31 | dependencies {
32 | implementation project(path: ':framework')
33 | implementation project(path: ':authentication')
34 |
35 | // KSP Annotation processor
36 | implementation project(path: ':ksp')
37 | ksp project(":ksp")
38 | }
--------------------------------------------------------------------------------
/content/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
--------------------------------------------------------------------------------
/content/src/androidTest/java/com/kortisan/content/ExampleInstrumentedTest.kt:
--------------------------------------------------------------------------------
1 | package com.kortisan.content
2 | /** * * * * * * * * *
3 | * Project KoreFrame
4 | * Created by Jacobo G Tamayo on 30/12/22.
5 | * * * * * * * * * * **/
6 |
7 | import androidx.test.platform.app.InstrumentationRegistry
8 | import androidx.test.ext.junit.runners.AndroidJUnit4
9 |
10 | import org.junit.Test
11 | import org.junit.runner.RunWith
12 |
13 | import org.junit.Assert.*
14 |
15 | /**
16 | * Instrumented test, which will execute on an Android device.
17 | *
18 | * See [testing documentation](http://d.android.com/tools/testing).
19 | */
20 | @RunWith(AndroidJUnit4::class)
21 | class ExampleInstrumentedTest {
22 | @Test
23 | fun useAppContext() {
24 | // Context of the app under test.
25 | val appContext = InstrumentationRegistry.getInstrumentation().targetContext
26 | assertEquals("com.kortisan.content", appContext.packageName)
27 | }
28 | }
--------------------------------------------------------------------------------
/content/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/content/src/main/java/com/kortisan/content/domain/MainActivityViewModel.kt:
--------------------------------------------------------------------------------
1 | package com.kortisan.content.domain
2 |
3 | import android.app.Application
4 | import com.kortisan.content.domain.models.DashboardModel
5 | import com.kortisan.content.presentation.blocs.DashboardBloc
6 | import com.kortisan.content.presentation.tagging.MainActivitySceneBuilder
7 | import com.kortisan.framework.bloc.BlocState
8 | import com.kortisan.framework.bloc.ReduxViewModelBase
9 | import com.kortisan.framework.bloc.ViewModelActionDispatcher
10 | import com.kortisan.framework.redux.stores.ApplicationStateStore
11 | import kotlinx.coroutines.flow.flow
12 |
13 | class MainActivityViewModel(
14 | application: Application,
15 | vmActionDispatcher: ViewModelActionDispatcher
16 | ): ReduxViewModelBase( application, vmActionDispatcher ) {
17 | private val mainActivitySceneBase = MainActivitySceneBuilder.Builder()
18 | .setModuleName("Main")
19 | .build()
20 |
21 | val dashboardRootBLoC = DashboardBloc(
22 | getDispatcher(),
23 | BlocState(
24 | ApplicationStateStore,
25 | mainActivitySceneBase,
26 | flow { emit(DashboardModel("FLOW VALUE")) }
27 | )
28 | )
29 | }
--------------------------------------------------------------------------------
/content/src/main/java/com/kortisan/content/domain/models/DashboardModel.kt:
--------------------------------------------------------------------------------
1 | package com.kortisan.content.domain.models
2 |
3 | data class DashboardModel(
4 | val texto: String
5 | )
--------------------------------------------------------------------------------
/content/src/main/java/com/kortisan/content/presentation/states/NotificationTextState.kt:
--------------------------------------------------------------------------------
1 | package com.kortisan.content.presentation.states
2 |
3 | import com.kortisan.framework.redux.actions.NotificationActions
4 | import com.kortisan.framework.redux.state.productionrules.ProductionRule
5 | import com.kortisan.framework.redux.state.ReduxState
6 |
7 | sealed class NotificationTextState: ReduxState() {
8 | data class TextToShow( val currentShow: String ): NotificationTextState() {
9 | override val productionRules = sharedProductionRules
10 | }
11 |
12 | internal val sharedProductionRules = listOf(
13 | { state, action ->
14 | if( action is NotificationActions.ShowNotification )
15 | TextToShow( "Mostrando notificacion" )
16 | else state
17 | },
18 | { state, action ->
19 | if( action is NotificationActions.HideAllNotifications )
20 | TextToShow( "Notificaciones borradas" )
21 | else state
22 | }
23 | )
24 | }
25 |
--------------------------------------------------------------------------------
/content/src/main/java/com/kortisan/content/presentation/tagging/MainActivitySceneBuilder.kt:
--------------------------------------------------------------------------------
1 | package com.kortisan.content.presentation.tagging
2 |
3 | import com.kortisan.framework.redux.controllers.tagging.SceneBuilderBase
4 |
5 | /** * * * * * * * * *
6 | * Project KoreFrame
7 | * Created by Jacobo G Tamayo on 01/01/23.
8 | * * * * * * * * * * **/
9 | class MainActivitySceneBuilder private constructor(): SceneBuilderBase() {
10 | class Builder: SceneBuilderBase.Builder() {
11 | override val taggingScene: SceneBuilderBase = MainActivitySceneBuilder()
12 |
13 | fun setModuleName( moduleName: String ) = apply {
14 | taggingScene.baseParams["moduleName"] = moduleName
15 | }
16 | }
17 |
18 | override fun getData(): Map = baseParams
19 | }
--------------------------------------------------------------------------------
/content/src/main/res/drawable-v24/ic_launcher_foreground.xml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 |
15 |
18 |
21 |
22 |
23 |
24 |
30 |
--------------------------------------------------------------------------------
/content/src/main/res/drawable/baseline_face_24.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/content/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/content/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/content/src/main/res/mipmap-hdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cobogt/kortisan-android-framework/3d072c6c5f0a2ab19dd7ae2d8f3999ffd6bc7709/content/src/main/res/mipmap-hdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/content/src/main/res/mipmap-hdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cobogt/kortisan-android-framework/3d072c6c5f0a2ab19dd7ae2d8f3999ffd6bc7709/content/src/main/res/mipmap-hdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/content/src/main/res/mipmap-mdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cobogt/kortisan-android-framework/3d072c6c5f0a2ab19dd7ae2d8f3999ffd6bc7709/content/src/main/res/mipmap-mdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/content/src/main/res/mipmap-mdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cobogt/kortisan-android-framework/3d072c6c5f0a2ab19dd7ae2d8f3999ffd6bc7709/content/src/main/res/mipmap-mdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/content/src/main/res/mipmap-xhdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cobogt/kortisan-android-framework/3d072c6c5f0a2ab19dd7ae2d8f3999ffd6bc7709/content/src/main/res/mipmap-xhdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/content/src/main/res/mipmap-xhdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cobogt/kortisan-android-framework/3d072c6c5f0a2ab19dd7ae2d8f3999ffd6bc7709/content/src/main/res/mipmap-xhdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/content/src/main/res/mipmap-xxhdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cobogt/kortisan-android-framework/3d072c6c5f0a2ab19dd7ae2d8f3999ffd6bc7709/content/src/main/res/mipmap-xxhdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/content/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cobogt/kortisan-android-framework/3d072c6c5f0a2ab19dd7ae2d8f3999ffd6bc7709/content/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/content/src/main/res/mipmap-xxxhdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cobogt/kortisan-android-framework/3d072c6c5f0a2ab19dd7ae2d8f3999ffd6bc7709/content/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/content/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cobogt/kortisan-android-framework/3d072c6c5f0a2ab19dd7ae2d8f3999ffd6bc7709/content/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/content/src/main/res/values-night/themes.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
16 |
--------------------------------------------------------------------------------
/content/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #FFBB86FC
4 | #FF6200EE
5 | #FF3700B3
6 | #FF03DAC5
7 | #FF018786
8 | #FF000000
9 | #FFFFFFFF
10 |
--------------------------------------------------------------------------------
/content/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | Content
3 | Crear nota
4 |
--------------------------------------------------------------------------------
/content/src/main/res/values/themes.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
16 |
--------------------------------------------------------------------------------
/content/src/test/java/com/kortisan/content/ExampleUnitTest.kt:
--------------------------------------------------------------------------------
1 | package com.kortisan.content
2 | /** * * * * * * * * *
3 | * Project KoreFrame
4 | * Created by Jacobo G Tamayo on 30/12/22.
5 | * * * * * * * * * * **/
6 |
7 | import org.junit.Test
8 |
9 | import org.junit.Assert.*
10 |
11 | /**
12 | * Example local unit test, which will execute on the development machine (host).
13 | *
14 | * See [testing documentation](http://d.android.com/tools/testing).
15 | */
16 | class ExampleUnitTest {
17 | @Test
18 | fun addition_isCorrect() {
19 | assertEquals(4, 2 + 2)
20 | }
21 | }
--------------------------------------------------------------------------------
/fileTemplates/Business Logic Component (BLoC).kt.child.0.kt:
--------------------------------------------------------------------------------
1 | #if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME}.presentation.components#end
2 |
3 | import androidx.compose.material3.Text
4 | import androidx.compose.runtime.Composable
5 |
6 | #parse("File Header.java")
7 | @Composable
8 | fun Custom${NAME}Component( value: String ) {
9 | Text("Hello, I'am Custom${NAME}Component")
10 | Text(value)
11 | }
--------------------------------------------------------------------------------
/fileTemplates/Business Logic Component (BLoC).kt.child.1.kt:
--------------------------------------------------------------------------------
1 | #if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME}.presentation.tagging.decorators#end
2 |
3 | import com.kortisan.framework.redux.controllers.tagging.decorators.SceneBaseDecorator
4 | import com.kortisan.framework.redux.controllers.tagging.decorators.SceneDecoratorInterface
5 |
6 | #parse("File Header.java")
7 | class ${NAME}SceneDecorator(
8 | override val sceneDecorator: SceneDecoratorInterface,
9 | // Option 1: Decorate from constructor
10 | val demoParam: String = ""
11 | ): SceneBaseDecorator() {
12 | init {
13 | decoratedValues["demoParam"] = demoParam
14 | }
15 |
16 | // Option 2: Decorate from builder
17 | fun setParam( demoParam: String ) =
18 | apply {
19 | decoratedValues["demoParam"] = demoParam
20 | }
21 | }
--------------------------------------------------------------------------------
/fileTemplates/Business Logic Component (BLoC).kt.child.2.kt:
--------------------------------------------------------------------------------
1 | #if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME}.presentation.actions#end
2 |
3 | import com.kortisan.framework.redux.actions.ReduxAction
4 |
5 | #parse("File Header.java")
6 | sealed class ${NAME}Actions: ReduxAction() {
7 | data class SetCustomValue( val text: String, val number: Int ): ${NAME}Actions()
8 | data object RemoveValue: ${NAME}Actions()
9 | }
--------------------------------------------------------------------------------
/fileTemplates/Business Logic Component (BLoC).kt.child.3.kt:
--------------------------------------------------------------------------------
1 | #if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME}.domain.models#end
2 |
3 | #parse("File Header.java")
4 | data class ${NAME}Model(
5 | val demoText: String = "Hello, I'am ${NAME}",
6 | val demoInt: Int = 123,
7 | )
--------------------------------------------------------------------------------
/fileTemplates/Business Logic Component (BLoC).kt.child.4.kt:
--------------------------------------------------------------------------------
1 | #if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME}.presentation.states#end
2 |
3 | import ${PACKAGE_NAME}.domain.models.${NAME}Model
4 | import ${PACKAGE_NAME}.presentation.actions.${NAME}Actions
5 | import com.kortisan.framework.redux.state.ProductionRule
6 | import com.kortisan.framework.redux.state.ReduxState
7 |
8 | #parse("File Header.java")
9 | sealed class ${NAME}State : ReduxState() {
10 | data class CustomValue(
11 | val currentValue: ${NAME}Model
12 | ) : ${NAME}State() {
13 | override val productionRules = sharedProductionRules
14 | }
15 |
16 | internal val sharedProductionRules = listOf(
17 | { state, action ->
18 | if (action is ${NAME}Actions.SetCustomValue)
19 | CustomValue(
20 | ${NAME}Model("I'am a value", 123)
21 | )
22 | else state
23 | },
24 | { state, action ->
25 | if (action is ${NAME}Actions.RemoveValue)
26 | CustomValue(
27 | ${NAME}Model("No value", 0)
28 | )
29 | else state
30 | }
31 | )
32 | }
33 |
--------------------------------------------------------------------------------
/fileTemplates/Content Caretaker.kt:
--------------------------------------------------------------------------------
1 | #if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME}.state.caretakers#end
2 |
3 | import com.kortisan.framework.redux.state.caretaker.CaretakerStrategy
4 | import com.kortisan.framework.redux.state.ReduxState
5 | import com.kortisan.framework.storage.security.NoSecurityStrategy
6 | import com.kortisan.framework.storage.security.SecurityStrategy
7 |
8 | #parse("File Header.java")
9 | class ${NAME}CaretakerStrategy(
10 | override val defaultState: ${NAME}State
11 | ): CaretakerStrategy() {
12 | // Put the State data into a storage
13 | override fun persist(currentState: ${NAME}State) {
14 | TODO("Not yet implemented")
15 | }
16 |
17 | // Get the data from a storage and returns a State
18 | override fun recover(stateClassName: String): ${NAME}State? {
19 | TODO("Not yet implemented")
20 | }
21 |
22 | // How to protect the data
23 | override val securityStrategy: SecurityStrategy = NoSecurityStrategy
24 | }
--------------------------------------------------------------------------------
/fileTemplates/Framework Gate.kt:
--------------------------------------------------------------------------------
1 | #if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME}.redux.gates#end
2 |
3 | import com.kortisan.framework.redux.actions.DefaultErrorAction
4 | import com.kortisan.framework.redux.actions.ReduxAction
5 | import com.kortisan.framework.redux.controllers.gates.BaseGate
6 |
7 | #parse("File Header.java")
8 | data object ${NAME}Gate: BaseGate() {
9 | override val startAction: ReduxAction = ReduxAction.EmptyAction
10 |
11 | override val onFailAction: ReduxAction
12 | get() = DefaultErrorAction("Can't continue, sorry :(")
13 |
14 | override fun enterInGate(startAction: ReduxAction): Boolean {
15 | return true
16 | }
17 | }
--------------------------------------------------------------------------------
/fileTemplates/KSP Annotation.kt:
--------------------------------------------------------------------------------
1 | #if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME}#end
2 |
3 | #parse("File Header.java")
4 | @Target( AnnotationTarget.CLASS )
5 | @Retention( AnnotationRetention.SOURCE )
6 | annotation class ${NAME}Annotation(
7 | val param1: String
8 | )
--------------------------------------------------------------------------------
/fileTemplates/KSP Annotation.kt.child.0.kt:
--------------------------------------------------------------------------------
1 | package com.kortisan.ksp.annotations
2 |
3 | import com.google.devtools.ksp.processing.Dependencies
4 | import com.google.devtools.ksp.processing.Resolver
5 | import com.google.devtools.ksp.processing.SymbolProcessor
6 | import com.google.devtools.ksp.processing.SymbolProcessorEnvironment
7 | import com.google.devtools.ksp.symbol.KSAnnotated
8 | import com.google.devtools.ksp.symbol.KSClassDeclaration
9 | import com.google.devtools.ksp.validate
10 | import kotlin.reflect.KClass
11 |
12 | #parse("File Header.java")
13 | class ${NAME}Processor(
14 | private val environment: SymbolProcessorEnvironment
15 | ): SymbolProcessor {
16 | private fun Resolver.findAnnotations(
17 | kClass: KClass<*>,
18 | ) = getSymbolsWithAnnotation(
19 | kClass.qualifiedName.toString())
20 | .filterIsInstance()
21 |
22 | override fun process(resolver: Resolver): List {
23 | val listedAnnotations: Sequence =
24 | resolver.findAnnotations(${NAME}Annotation::class)
25 |
26 | if( ! listedAnnotations.iterator().hasNext() )
27 | return emptyList()
28 |
29 | val listedNames = listedAnnotations.map{ it.simpleName.asString() }
30 |
31 | val fileText = buildString {
32 | append("// ")
33 | append(listedNames.joinToString(", "))
34 | }
35 |
36 | val file = environment
37 | .codeGenerator
38 | .createNewFile(
39 | Dependencies(false),
40 | "com.kortisan.framework.",
41 | "${NAME}Generated",
42 | )
43 |
44 | file.write(fileText.toByteArray())
45 | file.close()
46 |
47 | return (listedAnnotations).filterNot { it.validate() }.toList()
48 | }
49 | }
--------------------------------------------------------------------------------
/fileTemplates/KSP Annotation.kt.child.1.kt:
--------------------------------------------------------------------------------
1 | package com.kortisan.ksp.annotations
2 |
3 | import com.google.devtools.ksp.processing.SymbolProcessor
4 | import com.google.devtools.ksp.processing.SymbolProcessorEnvironment
5 | import com.google.devtools.ksp.processing.SymbolProcessorProvider
6 |
7 | #parse("File Header.java")
8 | class ${NAME}ProcessorProvider: SymbolProcessorProvider {
9 | override fun create(environment: SymbolProcessorEnvironment): SymbolProcessor {
10 | return ${NAME}Processor(environment)
11 | }
12 | }
--------------------------------------------------------------------------------
/fileTemplates/Storage Local BD.kt:
--------------------------------------------------------------------------------
1 | // Storage Local BD DAO
--------------------------------------------------------------------------------
/fileTemplates/Storage Local Datastore.kt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cobogt/kortisan-android-framework/3d072c6c5f0a2ab19dd7ae2d8f3999ffd6bc7709/fileTemplates/Storage Local Datastore.kt
--------------------------------------------------------------------------------
/fileTemplates/Storage Remote Service.kt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cobogt/kortisan-android-framework/3d072c6c5f0a2ab19dd7ae2d8f3999ffd6bc7709/fileTemplates/Storage Remote Service.kt
--------------------------------------------------------------------------------
/fileTemplates/Storage Repository.kt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cobogt/kortisan-android-framework/3d072c6c5f0a2ab19dd7ae2d8f3999ffd6bc7709/fileTemplates/Storage Repository.kt
--------------------------------------------------------------------------------
/fileTemplates/Storage Security Strategy.kt:
--------------------------------------------------------------------------------
1 | #if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME}.storage.security#end
2 |
3 | #parse("File Header.java")
4 |
5 | /**
6 | * Estrategia de seguridad
7 | */
8 | data object ${NAME}SecurityStrategy: SecurityStrategy() {
9 | override val transformation: String = ""
10 |
11 | override fun encrypt(value: String): String {
12 | return value
13 | }
14 |
15 | override fun decrypt(value: String): String {
16 | return value
17 | }
18 | }
--------------------------------------------------------------------------------
/fileTemplates/ViewModel with ActionDispatcher.kt:
--------------------------------------------------------------------------------
1 | #if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME}.domain.viewmodels#end
2 |
3 | import android.app.Application
4 | import com.kortisan.content.presentation.tagging.${NAME}SceneBuilder
5 | import com.kortisan.framework.bloc.ReduxViewModelBase
6 | import com.kortisan.framework.bloc.ViewModelActionDispatcher
7 | import com.kortisan.framework.redux.stores.ApplicationStateStore
8 | import kotlinx.coroutines.flow.flow
9 |
10 | #parse("File Header.java")
11 | class ${NAME}ViewModel(
12 | application: Application,
13 | vmActionDispatcher: ViewModelActionDispatcher
14 | ): ReduxViewModelBase( application, vmActionDispatcher ) {
15 | private val taggingScene${NAME} = ${NAME}SceneBuilder.Builder()
16 | .setRootName("${NAME}")
17 | .build()
18 | }
--------------------------------------------------------------------------------
/fileTemplates/ViewModel with ActionDispatcher.kt.child.0.kt:
--------------------------------------------------------------------------------
1 | #if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME}.presentation.tagging#end
2 |
3 | import com.kortisan.framework.redux.controllers.tagging.SceneBuilderBase
4 |
5 | #parse("File Header.java")
6 | class ${NAME}SceneBuilder private constructor(): SceneBuilderBase() {
7 | class Builder: SceneBuilderBase.Builder() {
8 | override val taggingScene: SceneBuilderBase = ${NAME}SceneBuilder()
9 |
10 | fun setRootName( name: String ) = apply {
11 | taggingScene.baseParams["rootName"] = name
12 | }
13 | }
14 |
15 | override fun getData(): Map = baseParams
16 | }
--------------------------------------------------------------------------------
/fileTemplates/includes/File Header.java:
--------------------------------------------------------------------------------
1 | /** * * * * * * * * *
2 | * Project ${PROJECT_NAME}
3 | * Created by ${USER} on ${DAY}/${MONTH_NAME_SHORT}/${YEAR}.
4 | * * * * * * * * * * **/
--------------------------------------------------------------------------------
/framework/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/framework/build.gradle:
--------------------------------------------------------------------------------
1 | plugins {
2 | alias( libs.plugins.android.library )
3 | alias( libs.plugins.android.library.kotlin )
4 | alias( libs.plugins.android.library.protobuf )
5 | alias( libs.plugins.android.library.kapt )
6 | alias( libs.plugins.devtools.ksp )
7 | alias( libs.plugins.compose.compiler )
8 | // Habilitar cuando se instale google-services.json
9 | // id 'com.google.gms.google-services'
10 | }
11 |
12 | apply from: "$rootDir.path/projectBuildSettings/projectBuild.gradle"
13 | def config = ext.projectGradleConfig
14 |
15 | android {
16 | namespace 'com.kortisan.framework'
17 | compileSdk config.compileSdkVersion
18 | compileSdkVersion config.compileSdkVersion
19 |
20 | defaultConfig {
21 | minSdk config.minSdkVersion
22 | targetSdk config.targetSdkVersion
23 | compileSdk config.compileSdkVersion
24 | compileSdkVersion config.compileSdkVersion
25 | version getVersionName()
26 |
27 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
28 |
29 | consumerProguardFiles "consumer-rules.pro"
30 | }
31 |
32 | buildFeatures {
33 | buildConfig true
34 | }
35 |
36 | libraryVariants.all { variant ->
37 | kotlin.sourceSets {
38 | def name = variant.name
39 | getByName(name) {
40 | kotlin.srcDir("$buildDir/generated/ksp/$name/kotlin")
41 | }
42 | }
43 | }
44 | }
45 |
46 | apply from: "$rootDir.path/projectBuildSettings/projectDependenciesFramework.gradle"
47 | apply from: "$rootDir.path/projectBuildSettings/protobufSettings.gradle"
48 |
49 | dependencies {
50 | // KSP Annotation processor
51 | implementation project(path: ':ksp')
52 | ksp project(":ksp")
53 | }
--------------------------------------------------------------------------------
/framework/consumer-rules.pro:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cobogt/kortisan-android-framework/3d072c6c5f0a2ab19dd7ae2d8f3999ffd6bc7709/framework/consumer-rules.pro
--------------------------------------------------------------------------------
/framework/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
--------------------------------------------------------------------------------
/framework/src/androidTest/java/com/kortisan/framework/ExampleInstrumentedTest.kt:
--------------------------------------------------------------------------------
1 | package com.kortisan.framework
2 |
3 | import androidx.test.platform.app.InstrumentationRegistry
4 | import androidx.test.ext.junit.runners.AndroidJUnit4
5 |
6 | import org.junit.Test
7 | import org.junit.runner.RunWith
8 |
9 | import org.junit.Assert.*
10 |
11 | /**
12 | * Instrumented test, which will execute on an Android device.
13 | *
14 | * See [testing documentation](http://d.android.com/tools/testing).
15 | */
16 | @RunWith(AndroidJUnit4::class)
17 | class ExampleInstrumentedTest {
18 | @Test
19 | fun useAppContext() {
20 | // Context of the app under test.
21 | val appContext = InstrumentationRegistry.getInstrumentation().targetContext
22 | assertEquals("com.kortisan.framework.test", appContext.packageName)
23 | }
24 | }
--------------------------------------------------------------------------------
/framework/src/main/java/com/kortisan/framework/FrameworkApplicationBinding.kt:
--------------------------------------------------------------------------------
1 | package com.kortisan.framework
2 |
3 | import android.app.Application
4 | import android.content.Context
5 | import com.kortisan.framework.redux.actions.LoadStateAction
6 | import com.kortisan.framework.redux.controllers.navigation.strategies.NavigationStrategy
7 | import com.kortisan.framework.redux.stores.ApplicationStateStore
8 |
9 | open class FrameworkApplicationBinding: Application() {
10 | companion object {
11 | lateinit var appContext: Context
12 | }
13 |
14 | override fun onCreate() {
15 | super.onCreate()
16 |
17 | appContext = applicationContext
18 |
19 | registerActivityLifecycleCallbacks(
20 | NavigationStrategy
21 | )
22 |
23 | // Cargamos el estado previo de la aplicación
24 | ApplicationStateStore.reduceAction( LoadStateAction )
25 | }
26 | }
--------------------------------------------------------------------------------
/framework/src/main/java/com/kortisan/framework/bloc/BaseBloc.kt:
--------------------------------------------------------------------------------
1 | package com.kortisan.framework.bloc
2 | /** * * * * * * * * *
3 | * Project KoreFrame
4 | * Created by Jacobo G Tamayo on 30/12/22.
5 | * * * * * * * * * * **/
6 |
7 | import androidx.compose.runtime.Composable
8 | import com.kortisan.framework.redux.actions.ReduxAction
9 | import kotlinx.coroutines.CoroutineScope
10 | import kotlinx.coroutines.Dispatchers
11 | import kotlinx.coroutines.launch
12 |
13 |
14 | /**
15 | * Clase base para que todos los BLoC extiendan
16 | * V: ViewModel donde se encuentra el Bloc o su padre
17 | * B: Tipo de dato que va a representarse en el Bloc
18 | */
19 | abstract class BaseBloc(
20 | open val viewModelActionDispatcher: V,
21 | open val state: BlocState
22 | ) {
23 | /**
24 | * Este método debe llamarse en el init {} de los bloc DESPUÉS de declarar las variables
25 | */
26 | fun observeActions() {
27 | CoroutineScope( Dispatchers.IO ).launch {
28 | viewModelActionDispatcher.currentAction.collect {
29 | reduce( it )
30 | }
31 | }
32 | }
33 |
34 | fun dispatch( action: ReduxAction) = viewModelActionDispatcher.dispatch( action )
35 | open fun reduce( action: ReduxAction ) { /* Reduce una acción en los estados del BLoC */ }
36 |
37 | @Composable
38 | abstract fun Render()
39 | }
--------------------------------------------------------------------------------
/framework/src/main/java/com/kortisan/framework/bloc/BaseUseCase.kt:
--------------------------------------------------------------------------------
1 | package com.kortisan.framework.bloc
2 |
3 | import kotlinx.coroutines.flow.Flow
4 |
5 | /**
6 | * Caso de uso base para extender a los demás
7 | * Tipo I: Valor de entrada
8 | * Tipo O: Valor de salida
9 | * Tipo T: Valor de los parámetros del caso de uso
10 | */
11 | interface BaseUseCase {
12 | /**
13 | * Establece los parámetros para el funcionamiento del caso de uso
14 | */
15 | fun setParams( params: P )
16 |
17 | /**
18 | * Recibe un flujo de recursos y produce otro flujo de recursos depués de transformarlo
19 | * a partir de los parámetros definidos en la implementación del caso de uso.
20 | */
21 | fun transformResource( inputData: Flow> ): Flow>
22 | fun transform( inputData: Flow ): Flow
23 | }
--------------------------------------------------------------------------------
/framework/src/main/java/com/kortisan/framework/bloc/BlocState.kt:
--------------------------------------------------------------------------------
1 | package com.kortisan.framework.bloc
2 | /** * * * * * * * * *
3 | * Project KoreFrame
4 | * Created by Jacobo G Tamayo on 30/12/22.
5 | * * * * * * * * * * **/
6 |
7 | import com.kortisan.framework.redux.controllers.tagging.decorators.SceneDecoratorInterface
8 | import com.kortisan.framework.redux.stores.ApplicationStateStore
9 | import kotlinx.coroutines.flow.Flow
10 |
11 | data class BlocState (
12 | val applicationState: ApplicationStateStore,
13 | val scene: SceneDecoratorInterface,
14 | // Los eventos deben estar en el estado del componente
15 | val componentState: Flow,
16 | )
--------------------------------------------------------------------------------
/framework/src/main/java/com/kortisan/framework/bloc/ReduxViewModelBase.kt:
--------------------------------------------------------------------------------
1 | package com.kortisan.framework.bloc
2 |
3 | import android.app.Application
4 | import androidx.lifecycle.ViewModel
5 |
6 | abstract class ReduxViewModelBase private constructor(): ViewModel() {
7 | private lateinit var _application: Application
8 | private lateinit var _vmActionDispatcher: ViewModelActionDispatcher
9 |
10 | constructor(
11 | application: Application,
12 | vmActionDispatcher: ViewModelActionDispatcher
13 | ): this() {
14 | _application = application
15 | _vmActionDispatcher = vmActionDispatcher
16 | }
17 |
18 | @Suppress("UNCHECKED_CAST")
19 | fun< T: Application> getApplication(): T = _application as T
20 | fun getDispatcher() = _vmActionDispatcher
21 | }
--------------------------------------------------------------------------------
/framework/src/main/java/com/kortisan/framework/bloc/Resource.kt:
--------------------------------------------------------------------------------
1 | package com.kortisan.framework.bloc
2 | /** * * * * * * * * *
3 | * Project KoreFrame
4 | * Created by Jacobo G Tamayo on 30/12/22.
5 | * * * * * * * * * * **/
6 |
7 | import java.lang.Exception
8 |
9 | sealed class Resource {
10 | data class Success(val data: T?, val message: String? = ""): Resource()
11 | data class Error(val exception: Exception, val folio: String? = "", val message: String? = ""): Resource()
12 | data class Loading(val data: Any? = null): Resource()
13 |
14 | companion object {
15 | fun success(data: T): Resource = Success(data)
16 | fun error(exception: Exception, folio: String? = "", message: String? = ""): Resource = Error(exception, folio, message)
17 | fun loading(data: Any? = null): Resource = Loading(data)
18 | }
19 | }
--------------------------------------------------------------------------------
/framework/src/main/java/com/kortisan/framework/bloc/SingleActivityWithViewModel.kt:
--------------------------------------------------------------------------------
1 | package com.kortisan.framework.bloc
2 |
3 | interface SingleActivityWithViewModel {
4 | val singleActivityViewModel: ReduxViewModelBase
5 | }
--------------------------------------------------------------------------------
/framework/src/main/java/com/kortisan/framework/bloc/ViewModelActionDispatcher.kt:
--------------------------------------------------------------------------------
1 | package com.kortisan.framework.bloc
2 | /** * * * * * * * * *
3 | * Project KoreFrame
4 | * Created by Jacobo G Tamayo on 30/12/22.
5 | * * * * * * * * * * **/
6 |
7 | import com.kortisan.framework.redux.actions.ReduxAction
8 | import kotlinx.coroutines.flow.StateFlow
9 |
10 | interface ViewModelActionDispatcher {
11 | val currentAction: StateFlow
12 | fun dispatch(action: ReduxAction)
13 | }
--------------------------------------------------------------------------------
/framework/src/main/java/com/kortisan/framework/entities/Address.kt:
--------------------------------------------------------------------------------
1 | package com.kortisan.framework.entities
2 | /** * * * * * * * * *
3 | * Project KoreFrame
4 | * Created by Jacobo G Tamayo on 30/12/22.
5 | * * * * * * * * * * **/
6 |
7 | data class Address(
8 | var street: String = "",
9 | var numberExt: String = "",
10 | var numberInt: String = "",
11 | var postalAddress: String = "",
12 | var neighborhood: String = "",
13 | var population: String = "", // Población aka. City
14 | var state: String = "",
15 | var country: String = "",
16 | var lat: String = "",
17 | var long: String = "",
18 | var type: String = "",
19 | var address: String = "",
20 | var colony: String = "",
21 | val shortAddress: String = "${street.replaceFirstChar { it.uppercaseChar() }} $postalAddress"
22 | )
23 |
--------------------------------------------------------------------------------
/framework/src/main/java/com/kortisan/framework/entities/Device.kt:
--------------------------------------------------------------------------------
1 | package com.kortisan.framework.entities
2 | /** * * * * * * * * *
3 | * Project KoreFrame
4 | * Created by Jacobo G Tamayo on 30/12/22.
5 | * * * * * * * * * * **/
6 |
7 | import java.util.*
8 |
9 | data class Device(
10 | var id: String = "", // Id del dispositivo
11 | var pushId: String = "", // Id de la notificación push
12 | var model: String = "",
13 | var hashInfo: String = UUID.randomUUID().toString(),
14 | var deviceName: String = "",
15 | var carrier: String = "",
16 | var idfa: String = "",
17 | val type: String = "android",
18 | var countryCode: String = "+52", // Código de país
19 | )
20 |
--------------------------------------------------------------------------------
/framework/src/main/java/com/kortisan/framework/entities/DynamicKeys.kt:
--------------------------------------------------------------------------------
1 | package com.kortisan.framework.entities
2 | /** * * * * * * * * *
3 | * Project KoreFrame
4 | * Created by Jacobo G Tamayo on 30/12/22.
5 | * * * * * * * * * * **/
6 |
7 | data class DynamicKeys(
8 | var aesPublic : String = "",
9 | var aesPrivate : String = "",
10 | )
11 |
--------------------------------------------------------------------------------
/framework/src/main/java/com/kortisan/framework/entities/Tokens.kt:
--------------------------------------------------------------------------------
1 | package com.kortisan.framework.entities
2 |
3 | import org.joda.time.DateTime
4 |
5 | /** * * * * * * * * *
6 | * Project KoreFrame
7 | * Created by Jacobo G Tamayo on 30/12/22.
8 | * * * * * * * * * * **/
9 |
10 | data class Tokens(
11 | val bearer: String,
12 | val bearerAge: String,
13 | val bearerExpireTime: Int,
14 |
15 | val user: String,
16 | val userAge: String,
17 | val userExpireTime: Int,
18 |
19 | val refresh: String,
20 | val refreshAge: String,
21 | val refreshExpireTime:Int,
22 | ) {
23 | val isBearerTokenValid: Boolean
24 | get() = bearer.isNotBlank()
25 | && bearerAge.isNotBlank()
26 | && DateTime.parse( bearerAge ).isAfterNow
27 |
28 | val isAccessTokenValid: Boolean
29 | get() = user.isNotBlank()
30 | && userAge.isNotBlank()
31 | && DateTime.parse( userAge ).isAfterNow
32 |
33 | val isRefreshTokenValid: Boolean
34 | get() = refresh.isNotBlank()
35 | && refreshAge.isNotBlank()
36 | && DateTime.parse( refreshAge ).isAfterNow
37 | }
38 |
--------------------------------------------------------------------------------
/framework/src/main/java/com/kortisan/framework/entrypoints/ActorProviderStrategy.kt:
--------------------------------------------------------------------------------
1 | package com.kortisan.framework.entrypoints
2 |
3 | import android.content.Intent
4 | import com.kortisan.framework.redux.actions.ReduxAction
5 |
6 | /** * * * * * * * * *
7 | * Project KoreFrame
8 | * Created by Jacobo G Tamayo on 06/01/23.
9 | * * * * * * * * * * **/
10 | data class ActorProviderStrategy( private val intent: Intent ): EntrypointStrategy() {
11 | override fun getAction(): ReduxAction {
12 | TODO("Not yet implemented")
13 | }
14 | }
--------------------------------------------------------------------------------
/framework/src/main/java/com/kortisan/framework/entrypoints/ClevertapEntrypointStrategy.kt:
--------------------------------------------------------------------------------
1 | package com.kortisan.framework.entrypoints
2 | /** * * * * * * * * *
3 | * Project KoreFrame
4 | * Created by Jacobo G Tamayo on 30/12/22.
5 | * * * * * * * * * * **/
6 |
7 | import android.content.Intent
8 | import com.google.gson.JsonParseException
9 | import com.google.gson.JsonParser
10 | import com.google.gson.JsonSyntaxException
11 | import com.kortisan.framework.redux.actions.ReduxAction
12 | import java.lang.Exception
13 |
14 | class ClevertapEntrypointStrategy( private val intent: Intent ): EntrypointStrategy() {
15 | override fun getAction(): ReduxAction =
16 | try {
17 | val clevertapPayload = intent.getStringExtra("clevertapPayload") ?: "{}"
18 | val json = JsonParser.parseString( clevertapPayload ).asJsonObject
19 | val flowName = json["targetFlowName"]?.asString ?: ""
20 |
21 | getNavigationActionFromJson( json, flowName)
22 | }catch (e: JsonSyntaxException) {
23 | ReduxAction.EmptyAction
24 | }catch (e: JsonParseException) {
25 | ReduxAction.EmptyAction
26 | }catch (e: Exception) {
27 | ReduxAction.EmptyAction
28 | }
29 | }
--------------------------------------------------------------------------------
/framework/src/main/java/com/kortisan/framework/entrypoints/ComposeNavigationEntrypointStrategy.kt:
--------------------------------------------------------------------------------
1 | package com.kortisan.framework.entrypoints
2 | /** * * * * * * * * *
3 | * Project KoreFrame
4 | * Created by Jacobo G Tamayo on 30/12/22.
5 | * * * * * * * * * * **/
6 |
7 | import com.kortisan.framework.redux.actions.ReduxAction
8 |
9 | data class ComposeNavigationEntrypointStrategy(val exampleAttributeFlowNameFromPayload: String): EntrypointStrategy() {
10 | override fun getAction(): ReduxAction = ReduxAction.EmptyAction
11 | }
--------------------------------------------------------------------------------
/framework/src/main/java/com/kortisan/framework/entrypoints/DeeplinkEntrypointStrategy.kt:
--------------------------------------------------------------------------------
1 | package com.kortisan.framework.entrypoints
2 | /** * * * * * * * * *
3 | * Project KoreFrame
4 | * Created by Jacobo G Tamayo on 30/12/22.
5 | * * * * * * * * * * **/
6 |
7 | import android.content.Intent
8 | import com.google.gson.JsonParseException
9 | import com.google.gson.JsonParser
10 | import com.google.gson.JsonSyntaxException
11 | import com.kortisan.framework.redux.actions.ReduxAction
12 | import java.lang.Exception
13 |
14 | /**
15 | * El DeepLink es nativo de Android
16 | * https://developer.android.com/training/app-links/deep-linking?hl=es-419
17 | */
18 | data class DeeplinkEntrypointStrategy( private val intent: Intent ): EntrypointStrategy() {
19 | override fun getAction(): ReduxAction =
20 | try {
21 | val deepLinkPayload = intent.getStringExtra("deeplinkPayload") ?: "{}"
22 | val json = JsonParser.parseString(deepLinkPayload).asJsonObject
23 | val flowName: String = json["flowName"]?.asString ?: ""
24 |
25 | getNavigationActionFromJson( json, flowName )
26 | } catch (e: JsonSyntaxException) {
27 | ReduxAction.EmptyAction
28 | } catch (e: JsonParseException) {
29 | ReduxAction.EmptyAction
30 | } catch (e: Exception) {
31 | ReduxAction.EmptyAction
32 | }
33 | }
--------------------------------------------------------------------------------
/framework/src/main/java/com/kortisan/framework/entrypoints/GoogleAssistantEntrypointStrategy.kt:
--------------------------------------------------------------------------------
1 | package com.kortisan.framework.entrypoints
2 | /** * * * * * * * * *
3 | * Project KoreFrame
4 | * Created by Jacobo G Tamayo on 30/12/22.
5 | * * * * * * * * * * **/
6 |
7 | import com.kortisan.framework.redux.actions.NavigationActions
8 |
9 | data class GoogleAssistantEntrypointStrategy(val exampleAttributeFlowNameFromPayload: String): EntrypointStrategy() {
10 | override fun getAction(): NavigationActions {
11 | TODO("Not yet implemented")
12 | // NavigationAction.navigateToTarget(
13 | // NavigationTarget.let {
14 | // it.genericTarget(
15 | // it.flowNameAsActivityTarget.get(
16 | // exampleAttributeFlowNameFromPayload
17 | // )?.className ?: it.defaultTarget.activity.className
18 | // )
19 | // },
20 | // params = null
21 | // )
22 | }
23 | }
--------------------------------------------------------------------------------
/framework/src/main/java/com/kortisan/framework/entrypoints/IntentEntrypointStrategy.kt:
--------------------------------------------------------------------------------
1 | package com.kortisan.framework.entrypoints
2 | /** * * * * * * * * *
3 | * Project KoreFrame
4 | * Created by Jacobo G Tamayo on 30/12/22.
5 | * * * * * * * * * * **/
6 |
7 | import android.content.Intent
8 | import com.kortisan.framework.redux.actions.ReduxAction
9 |
10 | data class IntentEntrypointStrategy( private val intent: Intent ): EntrypointStrategy() {
11 | /**
12 | * Lista de los entrypoints que ocupan el intent
13 | */
14 | private val dependentEntryPoints = listOf(
15 | AppLinksEntrypointStrategy ( intent ),
16 | ClevertapEntrypointStrategy( intent ),
17 | OneLinkEntrypointStrategy ( intent ),
18 | DeeplinkEntrypointStrategy ( intent ),
19 | )
20 |
21 | override fun getAction(): ReduxAction = dependentEntryPoints
22 | .map { it.getAction() }
23 | .firstOrNull { it !is ReduxAction.EmptyAction }
24 | ?: ReduxAction.EmptyAction
25 | }
--------------------------------------------------------------------------------
/framework/src/main/java/com/kortisan/framework/entrypoints/OneLinkEntrypointStrategy.kt:
--------------------------------------------------------------------------------
1 | package com.kortisan.framework.entrypoints
2 | /** * * * * * * * * *
3 | * Project KoreFrame
4 | * Created by Jacobo G Tamayo on 30/12/22.
5 | * * * * * * * * * * **/
6 |
7 | import android.content.Intent
8 | import com.google.gson.JsonParseException
9 | import com.google.gson.JsonParser
10 | import com.google.gson.JsonSyntaxException
11 | import com.kortisan.framework.redux.actions.ReduxAction
12 |
13 | /***
14 | * OneLink es controlado por AppsFlyer
15 | * https://support.appsflyer.com/hc/es/articles/115005248543-Descripci%C3%B3n-general-de-OneLink
16 | */
17 | data class OneLinkEntrypointStrategy( private val intent: Intent): EntrypointStrategy() {
18 | override fun getAction(): ReduxAction =
19 | try {
20 | val oneLinkPayload = intent.getStringExtra("onelinkPayload") ?: "{}"
21 | val json = JsonParser.parseString( oneLinkPayload ).asJsonObject
22 | val flowName = json["targetFlowName"]?.asString ?: ""
23 |
24 | getNavigationActionFromJson( json, flowName, true )
25 | }catch (e: JsonSyntaxException) {
26 | ReduxAction.EmptyAction
27 | }catch (e: JsonParseException) {
28 | ReduxAction.EmptyAction
29 | }catch (e: java.lang.Exception) {
30 | ReduxAction.EmptyAction
31 | }
32 | }
33 |
34 |
--------------------------------------------------------------------------------
/framework/src/main/java/com/kortisan/framework/entrypoints/PushNotificationEntrypointStrategy.kt:
--------------------------------------------------------------------------------
1 | package com.kortisan.framework.entrypoints
2 | /** * * * * * * * * *
3 | * Project KoreFrame
4 | * Created by Jacobo G Tamayo on 30/12/22.
5 | * * * * * * * * * * **/
6 |
7 | import com.kortisan.framework.redux.actions.ReduxAction
8 | import java.lang.Exception
9 |
10 | data class PushNotificationEntrypointStrategy(
11 | val data: Map
12 | ): EntrypointStrategy() {
13 | override fun getAction(): ReduxAction = try {
14 | val flowName = data["targetFlowName"]
15 | ?: ""
16 |
17 | if( flowName.isNotEmpty() )
18 | getNavigationActionFromMap( data, flowName )
19 | else
20 | data["action"]
21 | ?.let { actionName ->
22 | // Acción de redux desde el catálogo
23 | ReduxAction.getAction( actionName, data )
24 | }?: ReduxAction.EmptyAction
25 | } catch (e: Exception) {
26 | ReduxAction.EmptyAction
27 | }
28 | }
--------------------------------------------------------------------------------
/framework/src/main/java/com/kortisan/framework/entrypoints/ShortcutEntrypointStrategy.kt:
--------------------------------------------------------------------------------
1 | package com.kortisan.framework.entrypoints
2 | /** * * * * * * * * *
3 | * Project KoreFrame
4 | * Created by Jacobo G Tamayo on 30/12/22.
5 | * * * * * * * * * * **/
6 |
7 | import com.kortisan.framework.redux.actions.NavigationActions
8 |
9 | class ShortcutEntrypointStrategy(val shortcutId: String): EntrypointStrategy() {
10 | override fun getAction(): NavigationActions {
11 | TODO("Not yet implemented")
12 | }
13 | }
--------------------------------------------------------------------------------
/framework/src/main/java/com/kortisan/framework/redux/actions/BiometricsActions.kt:
--------------------------------------------------------------------------------
1 | package com.kortisan.framework.redux.actions
2 |
3 | sealed class BiometricsActions: ReduxAction() {
4 | object AskBiometricsAction: BiometricsActions()
5 |
6 | }
7 |
--------------------------------------------------------------------------------
/framework/src/main/java/com/kortisan/framework/redux/actions/DefaultErrorAction.kt:
--------------------------------------------------------------------------------
1 | package com.kortisan.framework.redux.actions
2 |
3 | /**
4 | * Esta acción captura la información de un error de forma predeterminada
5 | * Es procesada en el middleware de captura de errores
6 | */
7 | data class DefaultErrorAction(
8 | val title: String,
9 | val description: String = "",
10 | val exception: Exception? = null,
11 | val extras: Map = mapOf()
12 | ): ReduxAction()
13 |
--------------------------------------------------------------------------------
/framework/src/main/java/com/kortisan/framework/redux/actions/EnrollmentActions.kt:
--------------------------------------------------------------------------------
1 | package com.kortisan.framework.redux.actions
2 | /** * * * * * * * * *
3 | * Project KoreFrame
4 | * Created by Jacobo G Tamayo on 30/12/22.
5 | * * * * * * * * * * **/
6 |
7 | sealed class AuthenticationActions: ReduxAction() {
8 | data class MigrateUser(val icu: String, val cellphone: String, val passcode: String): AuthenticationActions()
9 | object VerifyLiteAuthentication: AuthenticationActions()
10 | }
11 |
--------------------------------------------------------------------------------
/framework/src/main/java/com/kortisan/framework/redux/actions/EventsActions.kt:
--------------------------------------------------------------------------------
1 | package com.kortisan.framework.redux.actions
2 | /** * * * * * * * * *
3 | * Project KoreFrame
4 | * Created by Jacobo G Tamayo on 30/12/22.
5 | * * * * * * * * * * **/
6 |
7 | import androidx.compose.ui.focus.FocusState
8 | import androidx.compose.ui.input.key.KeyEvent
9 | import androidx.compose.ui.layout.LayoutCoordinates
10 | import androidx.compose.ui.unit.IntSize
11 |
12 | sealed class EventsActions: ReduxAction() {
13 | data class OnKeyEvent ( val keyEvent: KeyEvent? ): EventsActions()
14 | data class OnSizeChanged ( val intSize: IntSize? ): EventsActions()
15 | data class OnFocusChanged ( val focusState: FocusState? ): EventsActions()
16 | data class OnFocusEventAction ( val focusState: FocusState? ): EventsActions()
17 | data class OnPreviewKeyEvent ( val onPreviewKeyEvent: KeyEvent? ): EventsActions()
18 | data class OnGloballyPositioned ( val layoutCoordinates: LayoutCoordinates? ): EventsActions()
19 | }
20 |
--------------------------------------------------------------------------------
/framework/src/main/java/com/kortisan/framework/redux/actions/ExitGateAction.kt:
--------------------------------------------------------------------------------
1 | package com.kortisan.framework.redux.actions
2 |
3 | import com.kortisan.framework.redux.controllers.gates.BaseGate
4 | import com.kortisan.framework.redux.controllers.gates.ExitGateResult
5 |
6 | /**
7 | * Acción para salida de un subflujo con un resultado.
8 | */
9 | data class ExitGateAction (
10 | val result: ExitGateResult
11 | ): ReduxAction() {
12 | data class SetRawDataResultAction (
13 | val gate: BaseGate,
14 | val originalAction: ReduxAction,
15 | val resultAction: ReduxAction,
16 | val data: T
17 | ): ReduxAction()
18 | }
--------------------------------------------------------------------------------
/framework/src/main/java/com/kortisan/framework/redux/actions/GeopositionActions.kt:
--------------------------------------------------------------------------------
1 | package com.kortisan.framework.redux.actions
2 |
3 | import com.kortisan.framework.redux.state.GeopositionState
4 |
5 | sealed class GeopositionActions: ReduxAction() {
6 | data class SetGeopositionAppStateAction( val newState: GeopositionState ): GeopositionActions()
7 | }
8 |
--------------------------------------------------------------------------------
/framework/src/main/java/com/kortisan/framework/redux/actions/LoadStateAction.kt:
--------------------------------------------------------------------------------
1 | package com.kortisan.framework.redux.actions
2 |
3 | /**
4 | * Esta acción indica a los reductores de un estado que deben recuperar su información de un
5 | * CaretakerStrategy en caso de que se haya especificado.
6 | */
7 | object LoadStateAction: ReduxAction()
--------------------------------------------------------------------------------
/framework/src/main/java/com/kortisan/framework/redux/actions/NavigationActions.kt:
--------------------------------------------------------------------------------
1 | package com.kortisan.framework.redux.actions
2 | /** * * * * * * * * *
3 | * Project KoreFrame
4 | * Created by Jacobo G Tamayo on 30/12/22.
5 | * * * * * * * * * * **/
6 |
7 | import com.kortisan.framework.redux.controllers.navigation.protocol.NavigationTarget
8 |
9 | sealed class NavigationActions: ReduxAction() {
10 |
11 | data class NavigateToTarget(
12 | val target: NavigationTarget
13 | ): NavigationActions()
14 |
15 | data class NavigateToTargetWithParams(
16 | val target: NavigationTarget,
17 | val params: Map
18 | ): NavigationActions()
19 |
20 | data class NavigateToClass(
21 | val className: String,
22 | val params: Map
23 | ): NavigationActions()
24 |
25 | data class NavigateToRoute(
26 | val route: String,
27 | val params: Map
28 | ): NavigationActions()
29 | }
--------------------------------------------------------------------------------
/framework/src/main/java/com/kortisan/framework/redux/actions/NotificationActions.kt:
--------------------------------------------------------------------------------
1 | package com.kortisan.framework.redux.actions
/** * * * * * * * * *
* Project KoreFrame
* Created by Jacobo G Tamayo on 30/12/22.
* * * * * * * * * * **/
import com.kortisan.framework.redux.controllers.notifications.NotificationChannel
sealed class NotificationActions: ReduxAction() {
data class ShowNotification(
val title: String,
val bodyText: String,
val group: String,
val autoCancel: Boolean = true,
val smallIcon: Int,
val urlImage: String? = null,
val channel: NotificationChannel = NotificationChannel.MYAPP,
// Se convierte de ReduxAction a Intent en el middleware
val action: ReduxAction? = null,
): NotificationActions()
data class HideNotification( val notificationId: Int ): NotificationActions()
data object HideAllNotifications: NotificationActions()
}
--------------------------------------------------------------------------------
/framework/src/main/java/com/kortisan/framework/redux/actions/PerformanceScoreActions.kt:
--------------------------------------------------------------------------------
1 | package com.kortisan.framework.redux.actions
2 |
3 | sealed class PerformanceScoreActions: ReduxAction() {
4 | object CalculateScore: PerformanceScoreActions()
5 | data class SetPerformanceScoreAction( val newScore: Int ): PerformanceScoreActions()
6 | }
7 |
--------------------------------------------------------------------------------
/framework/src/main/java/com/kortisan/framework/redux/actions/ReDispatchAction.kt:
--------------------------------------------------------------------------------
1 | package com.kortisan.framework.redux.actions
2 |
3 | /**
4 | * Esta acción está diseñada para cuando un controlador o middleware quiere que se vuelva a
5 | * procesar una acción resultado sin que esta llegue a donde se originó la primera.
6 | *
7 | * Reinicia el ciclo del despachador.
8 | */
9 | data class ReDispatchAction(
10 | val action: ReduxAction
11 | ): ReduxAction()
--------------------------------------------------------------------------------
/framework/src/main/java/com/kortisan/framework/redux/actions/RemoteConfigActions.kt:
--------------------------------------------------------------------------------
1 | package com.kortisan.framework.redux.actions
2 | /** * * * * * * * * *
3 | * Project KoreFrame
4 | * Created by Jacobo G Tamayo on 30/12/22.
5 | * * * * * * * * * * **/
6 |
7 | sealed class RemoteConfigActions: ReduxAction() {
8 | object ReloadAction: RemoteConfigActions()
9 |
10 | sealed class StoreRemoteConfigAction: RemoteConfigActions() {
11 | data class LoadFailAction( val exception: Exception ): StoreRemoteConfigAction()
12 | data class RefreshFailAction( val exception: Exception ): StoreRemoteConfigAction()
13 | data class SuccessLoadAction( val content: Map ): StoreRemoteConfigAction()
14 | }
15 | }
--------------------------------------------------------------------------------
/framework/src/main/java/com/kortisan/framework/redux/actions/RevertAction.kt:
--------------------------------------------------------------------------------
1 | package com.kortisan.framework.redux.actions
2 | /** * * * * * * * * *
3 | * Project KoreFrame
4 | * Created by Jacobo G Tamayo on 30/12/22.
5 | * * * * * * * * * * **/
6 |
7 | /**
8 | * Acción opcional que pueden contener algunas acciones para
9 | * poder 'deshacer' su efecto en el estado de la aplicación
10 | */
11 | open class RevertAction: ReduxAction()
--------------------------------------------------------------------------------
/framework/src/main/java/com/kortisan/framework/redux/actions/SensorsActions.kt:
--------------------------------------------------------------------------------
1 | package com.kortisan.framework.redux.actions
2 |
3 | sealed class SensorsActions: ReduxAction() {
4 | data class SetRefreshRateAction(
5 | val refreshRate: Int = 60
6 | ): SensorsActions()
7 |
8 | data class StoreSensorsAppStateAction(
9 | val linearAcc: Int,
10 | val pressureHpa: Int,
11 | val ambientLightLx: Int,
12 | val magneticFieldUt: Int,
13 | val relativeHumidity: Int,
14 | val deviceTemperatureCelsius: Int,
15 | val ambientTemperatureCelsius: Int,
16 | ): SensorsActions()
17 | }
18 |
--------------------------------------------------------------------------------
/framework/src/main/java/com/kortisan/framework/redux/actions/UpdateActions.kt:
--------------------------------------------------------------------------------
1 | package com.kortisan.framework.redux.actions
2 | /** * * * * * * * * *
3 | * Project KoreFrame
4 | * Created by Jacobo G Tamayo on 30/12/22.
5 | * * * * * * * * * * **/
6 |
7 | /**
8 | * Permiten actualizar a la aplicación bajo políticas internas y de la misma play store,
9 | * haciendo uso del middleware de actualizaciones ya que hay acciones que van a demandar
10 | * tener la última versión de la aplicación antes de poder ser consumadas.
11 | *
12 | * @see CheckUpdatePlayCoreAction
13 | * @see CheckUpdateFlagAction
14 | * @see StartUpdateAction
15 | * @see CancelUpdateAction
16 | * @see DownloadUpdateAction
17 | * @see com.kortisan.framework.redux.state.UpdateState
18 | */
19 | sealed class UpdateActions: ReduxAction() {
20 | /**
21 | * Comprueba que hayan actualizaciones en la tienda
22 | * @see UpdateActions
23 | * @see com.kortisan.framework.redux.controllers.updatesController.UpdatesController
24 | */
25 | data object CheckUpdatePlayCoreAction: UpdateActions()
26 |
27 | /**
28 | * Comprueba la bandera que indica que hay que actualizar forzosamente
29 | * @see UpdateActions
30 | * @see com.kortisan.framework.redux.controllers.updatesController.UpdatesController
31 | */
32 | data object CheckUpdateFlagAction: UpdateActions()
33 |
34 | /**
35 | * Inicia el proceso de actualización (Instalación)
36 | * @see UpdateActions
37 | * @see com.kortisan.framework.redux.controllers.updatesController.UpdatesController
38 | */
39 | data object StartUpdateAction: UpdateActions()
40 |
41 | /**
42 | * Cancela el proceso de actualización
43 | * @see UpdateActions
44 | * @see com.kortisan.framework.redux.controllers.updatesController.UpdatesController
45 | */
46 | data object CancelUpdateAction: UpdateActions()
47 |
48 | /**
49 | * Inicia la descarga de la actualización opcional
50 | * @see UpdateActions
51 | * @see com.kortisan.framework.redux.controllers.updatesController.UpdatesController
52 | */
53 | data object DownloadUpdateAction: UpdateActions()
54 | }
55 |
--------------------------------------------------------------------------------
/framework/src/main/java/com/kortisan/framework/redux/actions/wrappers/ActionEventInstance.kt:
--------------------------------------------------------------------------------
1 | package com.kortisan.framework.redux.actions.wrappers
2 | /** * * * * * * * * *
3 | * Project KoreFrame
4 | * Created by Jacobo G Tamayo on 30/12/22.
5 | * * * * * * * * * * **/
6 |
7 | import com.kortisan.framework.redux.actions.ReduxAction
8 |
9 | data class ActionEventInstance(
10 | override val onClick: ReduxAction? = null,
11 | override val onFocus: ReduxAction? = null,
12 | override val onKeyEvent: ReduxAction? = null,
13 | override val onLongClick: ReduxAction? = null,
14 | override val onDoubleClick: ReduxAction? = null,
15 | override val onSizeChanged: ReduxAction? = null,
16 | override val onFocusChanged: ReduxAction? = null,
17 | override val onPreviewKeyEvent: ReduxAction? = null,
18 | override val onGloballyPositioned: ReduxAction? = null,
19 | override val onSwipe: ReduxAction? = null,
20 | override val onDragEnd: ReduxAction? = null,
21 | override val onScrollEnd: ReduxAction? = null,
22 | override val onDragStart: ReduxAction? = null,
23 | override val onPanChange: ReduxAction? = null,
24 | override val onZoomChange: ReduxAction? = null,
25 | override val onScrollStart: ReduxAction? = null,
26 | override val onRotationChange: ReduxAction? = null,
27 | override val onSelected: ReduxAction? = null,
28 | ): AttachedEventsInterface
--------------------------------------------------------------------------------
/framework/src/main/java/com/kortisan/framework/redux/actions/wrappers/AttachedEventsInterface.kt:
--------------------------------------------------------------------------------
1 | package com.kortisan.framework.redux.actions.wrappers
2 | /** * * * * * * * * *
3 | * Project KoreFrame
4 | * Created by Jacobo G Tamayo on 30/12/22.
5 | * * * * * * * * * * **/
6 |
7 | import com.kortisan.framework.redux.actions.ReduxAction
8 |
9 | /**
10 | * Lista de modificadores que se pueden asociar a un componente
11 | * https://developer.android.com/jetpack/compose/modifiers-list?hl=es-419
12 | */
13 | interface AttachedEventsInterface {
14 | val onClick: ReduxAction?
15 | val onFocus: ReduxAction?
16 | val onKeyEvent: ReduxAction?
17 | val onLongClick: ReduxAction?
18 | val onDoubleClick: ReduxAction?
19 | val onSizeChanged: ReduxAction?
20 | val onFocusChanged: ReduxAction?
21 | val onPreviewKeyEvent: ReduxAction?
22 | val onGloballyPositioned: ReduxAction?
23 |
24 | // TODO: Crear envoltorio para asociar estos eventos a los estados
25 | val onSwipe: ReduxAction?
26 | val onDragEnd: ReduxAction?
27 | val onScrollEnd: ReduxAction?
28 | val onDragStart: ReduxAction?
29 | val onPanChange: ReduxAction?
30 | val onZoomChange: ReduxAction?
31 | val onScrollStart: ReduxAction?
32 | val onRotationChange: ReduxAction?
33 |
34 | // TODO: Definir en el callback del un objeto seleccionable
35 | val onSelected: ReduxAction?
36 | }
37 |
--------------------------------------------------------------------------------
/framework/src/main/java/com/kortisan/framework/redux/controllers/ReduxControllerAbstract.kt:
--------------------------------------------------------------------------------
1 | package com.kortisan.framework.redux.controllers
2 |
3 | import com.kortisan.framework.redux.actions.ReduxAction
4 | import com.kortisan.framework.redux.stores.ApplicationStateStore
5 | import kotlinx.coroutines.flow.MutableStateFlow
6 | import kotlinx.coroutines.flow.StateFlow
7 |
8 | abstract class ReduxControllerAbstract {
9 | private val isStartedMutable: MutableStateFlow =
10 | MutableStateFlow( ReduxControllerState.Stopped )
11 |
12 | open val isStarted: StateFlow = isStartedMutable
13 |
14 | var currentAction: ReduxAction? = null
15 |
16 | open fun start() =
17 | setStartStatus( ReduxControllerState.Started )
18 |
19 | fun reduceApplicationState( action: ReduxAction ) =
20 | ApplicationStateStore.reduceAction( action )
21 |
22 | fun setStartStatus( newState: ReduxControllerState ) {
23 | isStartedMutable.value = newState
24 | }
25 | }
--------------------------------------------------------------------------------
/framework/src/main/java/com/kortisan/framework/redux/controllers/ReduxControllerState.kt:
--------------------------------------------------------------------------------
1 | package com.kortisan.framework.redux.controllers
2 |
3 | import com.kortisan.framework.redux.state.ReduxState
4 |
5 | sealed class ReduxControllerState: ReduxState() {
6 | object Stopped: ReduxControllerState()
7 | object Starting: ReduxControllerState()
8 | object Started: ReduxControllerState()
9 | data class ErrorOnStart(
10 | val errorMessage: String,
11 | val exception: Exception? = null
12 | ): ReduxControllerState()
13 | }
--------------------------------------------------------------------------------
/framework/src/main/java/com/kortisan/framework/redux/controllers/gates/ExitGateResult.kt:
--------------------------------------------------------------------------------
1 | package com.kortisan.framework.redux.controllers.gates
2 | /** * * * * * * * * *
3 | * Project KoreFrame
4 | * Created by Jacobo G Tamayo on 30/12/22.
5 | * * * * * * * * * * **/
6 |
7 | import com.kortisan.framework.redux.actions.ReduxAction
8 |
9 | /**
10 | * Acción para salida de un subflujo con un resultado
11 | *
12 | * Puede tener una acción resultado que reemplazará a la acción original, es necesario en
13 | * caso de que una flujo que haya invocado un subflujo requiera reducir un estado a partir
14 | * de una acción resultado del subflujo.
15 | *
16 | * Esto puede implicar que los gates tengan su catálogo de acciones resultado para que los
17 | * flujos puedan reducir estos valores.
18 | *
19 | * Adicionalmente pueden producir valores crudos para otras operaciones.
20 | */
21 | sealed interface ExitGateResult {
22 | val rawDataResult: T?
23 | data class Success(
24 | val customResultSuccessAction: ReduxAction? = null,
25 | override val rawDataResult: T? = null
26 | ): ExitGateResult
27 | data class Fail (
28 | val customResultFailAction: ReduxAction? = null,
29 | override val rawDataResult: T? = null
30 | ): ExitGateResult
31 | data class Retry (
32 | val customResultRetryAction: ReduxAction? = null,
33 | override val rawDataResult: T? = null
34 | ): ExitGateResult
35 | }
--------------------------------------------------------------------------------
/framework/src/main/java/com/kortisan/framework/redux/controllers/geoposition/GeopositionController.kt:
--------------------------------------------------------------------------------
1 | package com.kortisan.framework.redux.controllers.geoposition
2 |
3 | import com.kortisan.framework.redux.actions.GeopositionActions
4 | import com.kortisan.framework.redux.controllers.ReduxControllerAbstract
5 | import com.kortisan.framework.redux.controllers.ReduxControllerState
6 | import com.kortisan.framework.redux.state.GeopositionState
7 |
8 | class GeopositionController: ReduxControllerAbstract() {
9 | override fun start() {
10 | // Comprobamos los permisos de ubicación
11 | setStartStatus( ReduxControllerState.Starting )
12 | reduceApplicationState(
13 | GeopositionActions.SetGeopositionAppStateAction( GeopositionState.Loading )
14 | )
15 | TODO("Obtener posición del GPS y modificar el estado de la aplicación")
16 | }
17 |
18 | }
--------------------------------------------------------------------------------
/framework/src/main/java/com/kortisan/framework/redux/controllers/navigation/FlowNameAlias.kt:
--------------------------------------------------------------------------------
1 | package com.kortisan.framework.redux.controllers.navigation
2 | /** * * * * * * * * *
3 | * Project KoreFrame
4 | * Created by Jacobo G Tamayo on 30/12/22.
5 | * * * * * * * * * * **/
6 |
7 | data class FlowNameAlias(
8 | val alias: String,
9 | val disabled: Boolean = false
10 | )
11 |
--------------------------------------------------------------------------------
/framework/src/main/java/com/kortisan/framework/redux/controllers/navigation/PrimitiveTargetActivityIdentifier.kt:
--------------------------------------------------------------------------------
1 | package com.kortisan.framework.redux.controllers.navigation
2 | /** * * * * * * * * *
3 | * Project KoreFrame
4 | * Created by Jacobo G Tamayo on 30/12/22.
5 | * * * * * * * * * * **/
6 |
7 | data class PrimitiveTargetActivityIdentifier(
8 | val className: String,
9 | val flowName: String = "",
10 | val section: String = "",
11 | val flowNameAlias: FlowNameAlias? = null
12 | )
13 |
--------------------------------------------------------------------------------
/framework/src/main/java/com/kortisan/framework/redux/controllers/navigation/contracts/CustomActivityContract.kt:
--------------------------------------------------------------------------------
1 | package com.kortisan.framework.redux.controllers.navigation.contracts
2 | /** * * * * * * * * *
3 | * Project KoreFrame
4 | * Created by Jacobo G Tamayo on 30/12/22.
5 | * * * * * * * * * * **/
6 |
7 | import android.app.Activity
8 | import android.content.Context
9 | import android.content.Intent
10 | import androidx.activity.result.contract.ActivityResultContract
11 | import com.kortisan.framework.toBundle
12 | import com.kortisan.framework.toMap
13 |
14 | /**
15 | * Contrato para registrar la respuesta de una actividad y pasar estos parámetros a otra actividad
16 | * que será la que haga la llamada.
17 | */
18 | class CustomActivityContract(
19 | // Activity
20 | private val activityCannonicalName: String
21 | ): ActivityResultContract