Cloud Storage Integration 1 PDF
Document Details
Uploaded by FastPacedJasper2846
Universiti Kebangsaan Malaysia
2024
Tags
Summary
This document provides a presentation of cloud storage integration for Android app development with Firebase and Jetpack Compose, as well as some relevant examples and considerations. The document covers topics such as application architecture, authentication, and the creation of a Firebase project. The intended audience is likely university students or professionals working on mobile application development projects. Details such as specific project details, dates, and other relevant information will be helpful to the user, for learning and reference purposes.
Full Transcript
Cloud Storage Building an Android app with Firebase and Jetpack Compose NAAM 2024 Adding Cloud Storage to Your Mobile Application Learn how to integrate cloud storage into mobile applications for enhanced functionality an...
Cloud Storage Building an Android app with Firebase and Jetpack Compose NAAM 2024 Adding Cloud Storage to Your Mobile Application Learn how to integrate cloud storage into mobile applications for enhanced functionality and scalability. Room Cloud storage https://youtu.be/pXeWBPXxkK8?si=5fKIYndOCqVMV https://firebase.blog/posts/2022/04/building- eMi an-app-android-jetpack-compose-firebase Why Use Cloud Storage? Data Accessibility: Access across devices. Collaboration: Real-time data sharing. Backup and Recovery: Secure backups. Scalability: Handles large data volumes. Centralized Analytics: Gain insights from user data. This Photo by Unknown Author is licensed under CC BY-SA-NC Halal Food App with Cloud Storage Core Concept: A halal food app where users share health tips and product benefits. Example: Sharing how honey helps treat a cough. Key Features Enabled by Cloud Storage: 1. Real-Time Data Sharing: Users share and access tips instantly. 2. Data Analysis: Cloud-based analytics reveal trends and user preferences. 3. Personalized Experiences: Users receive recommendations tailored to their interests and needs. Demonstrates the transformative potential of cloud storage in creating engaging, functional apps. Key aspects of cloud integration Firebase Authentication: Ensuring secure user identification and personalized experiences. Firestore: Managing data storage and synchronization in real-time. What is the relationship between Firebase and Firestore? Shared Resources and Services All apps in a Firebase project share the same: Hosting Authentication Realtime Database Cloud Firestore Cloud Storage Cloud Functions Firebase Project as a Container Acts as a central hub for all your apps and resources. Multiple Apps in One Project Supports iOS, Android, or free and paid app versions within the same project. Firebase Authentication A robust backend for user authentication with: - Passwords, phone numbers. - Google, Facebook, Twitter integration. Provides secure and seamless user experiences. Questions Once a user authenticates, what happen? https://youtu.be/8sGY55yxicA?si=vnBvqkEzLlZZ1q_B Firestore A scalable database with real-time sync: - Ensures offline access. - Facilitates responsive app functionality. Questions Why is storing data in the cloud not quite as easy if you're using your own server? https://youtu.be/QcsAb2RR52c?si=h2ECVRUHQ9y7Fh-V Practical example 1. Introduction to the app: Make It So. 2. Application architecture. 3. Firebase project setup. 4. Authentication setup. 5. Adding Firestore collection listener. 6. Debugging the app. Application: Make It So A to-do list app demonstrating: - Adding and editing tasks. - Assigning priorities and due dates. - Integrating Firebase and Jetpack Compose. Application Architecture Model-View-ViewModel (MVVM): - Model: Manages data. - View: UI layer. - ViewModel: Handles business logic. Creating a Firebase Project 1. Create a project in Firebase Console. 2. Add an Android app. 3. Enable Authentication and Cloud Firestore. https://firebase.google.com/codelabs/build-android-app-with-firebase- compose?continue=https%3A%2F%2Fdevelopers.google.com%2Flearn%2Fpa thways%2Ffirebase-android-jetpack%23codelab- https%3A%2F%2Ffirebase.google.com%2Fcodelabs%2Fbuild-android-app- with-firebase-compose#1 Firebase Authentication Email/password authentication by modifying two files: 1. AccountServiceImpl.kt – handles user authentication logic. 2. SettingsViewModel.kt – updates the app’s state. This setup ensures user data is securely stored and accessible only to authorized users." Adding Firestore Listener Implement listener in StorageServiceImpl.kt. Sync updates in TasksViewModel.kt. Ensures real-time UI updates. Debugging the Program Activity: Halal/Healthy Food Data Management Design fields for halal product management: - Product Name, Category, Brand. - Health Benefits, User Ratings. Debug data flow from input to storage. Transformative Learning Activity Exploring Halal and Healthy Food Task 1 Find an item at home related to halal and healthy food (e.g., herbs, plants, food ingredients). Take a photo of the item. Upload the photo to UKMfolio with a description: Why it is halal and healthy. How it positively impacts health. Its relevance to local culture or health practices. Task 2 - Data Class Create a data class for your chosen item. Define attributes such as: Name of the item. Health benefits. Cultural or medicinal significance. Task 3 - Impact Think about the bigger picture: How can this item support local businesses? (e.g., small and medium enterprises or PKS). What benefits does it bring to local health practices? Example Impact Herbs like ginger or turmeric can promote local herbal products. Medicinal plants (e.g., Misai Kucing, Pegaga, Bunga Raya) can improve respiratory health or general wellness. Supporting local herbal farmers can strengthen the community's health and economy. Task 4: Reflect Reflect on how local resources, culture, and health intersect. Contribute to a healthier, sustainable environment through your learning. Share in UKMFolio Lab Test Tentative date: Saturday, January 11, 2024 Question 1: Easy (4 marks) Question 2: Difficult (6 marks) Internet: Restricted UKMfolio, Google Translate, Android Developer, 1 notebook Cover: Lab 1- Lab 4 Continue Lab evaluation and do your project next week Demo Project II: 20/12 - 2/1/2024 (with test) Conclusion Cloud storage enables: - Secure, scalable, user-friendly apps. Mastering these tools helps build impactful applications.