-
-
Notifications
You must be signed in to change notification settings - Fork 194
E-Commerce SceneView Sample app #300
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
ceda59e
to
69f879d
Compare
@ThomasGorisse Can you take a look at this when you have time? Thanks! |
Hi @Blizl! Anyway, here are my thoughts:
|
@grassydragon Thanks for the review! I've renamed the feature from Virtual Try On to View in Your Space. I've also removed some files that were not needed. I've also added a readme as below: E-commerce Jetpack Compose SceneView Sample AppOverviewWelcome to the "E-commerce Jetpack Compose SceneView Sample App." This advanced sample app demonstrates how to create a modern e-commerce product description screen with additional features like adding products to the cart and viewing them in your space using SceneView for 3D model placement. The app follows modern Android architecture principles using Clean Architecture. Key ComponentsClean ArchitectureThis app follows Clean Architecture principles, separating the codebase into three layers:
UI EventsUI events in this app represent user interactions or actions triggered within the Composable functions. These events are sent to the ViewModel for processing. For example, when the user taps the "Add to Cart" button or "View in your space" button, UI events are dispatched to the ViewModel to handle the corresponding actions. ViewModelThe ViewModel is a crucial part of this app's architecture. It acts as an intermediary between the Presentation and Domain layers. ViewModels receive UI events, process them, and update the ViewState accordingly. They also trigger UiActions to navigate to different screens or display notifications. ViewStateViewState represents the current state of the UI. It includes data that should be displayed on the screen, such as product details, images, and other relevant information. The Presentation layer observes the ViewState and updates the UI accordingly. When the ViewState changes, Jetpack Compose recomposes the UI to reflect the new state. ScreensProduct Description ScreenThe main feature of this app is the product description screen. It displays detailed information about a product and provides the following functionalities:
View In Your Space ScreenThe "View In Your Space" screen is a pivotal feature of this app, offering users the ability to place 3D models in their real-world environment using augmented reality. This screen showcases the app's cutting-edge capabilities with ARCore and SceneView. This screen provides a rich AR experience and includes the following features:
The "View In Your Space" screen exemplifies how modern Android development can seamlessly incorporate augmented reality to enhance user engagement and interaction. It leverages the power of AR technology to create immersive and dynamic experiences within the app. Feel free to explore and customize this screen to suit your specific AR application needs. DependenciesThis app uses Jetpack Compose for UI rendering and follows the principles of clean architecture for maintainability and scalability. It also leverages SceneView for 3D model placement in the virtual try-on feature. Get StartedTo run the app, follow these steps:
|
Hi @Blizl! |
@Blizl I am working on the similar app just like the way you have showcased in the video, could you please share the source code of the sample, that will be a great reference for me, Thank you in advance. |
E-Commerce SceneView Sample app
This app contains two main screens that an ecommerce app generally would have, a product description screen that contains metadata about a product and a second virtual try on screen for users to try out the product in 3D.
This sample app follows most of the modern architecture guidelines as of 2023. (Dependency Injection isn't used to try to keep things a little simpler) https://developer.android.com/topic/architecture
Architecture:
UI Events are user taps, clicks, actions, which modify state stored in the ViewModel.
UI Actions are one time events for navigations, toasts, etc.
ViewModel is used to hold state and ui actions which are StateFlows.
Data layer - contains your data models and repositories
Domain Layer - seperation between presentation layer and data layer (usually interface implementations, but in some cases can include classes)
Presentation Layer - Android specific classes, UI, etc,
Two main screens:
Credits: All products are not my own images and are credited to LongChamp.
3D Model was a free asset downloaded from https://free3d.com/3d-model/womens-bag-373622.html
Demo:
telegram-cloud-document-1-5093660917602714233.mp4