This social media application distinguishes itself from others by emphasizing real-life interactions. Users can only add new connections when they are physically close to one another, fostering genuine social interactions. This proximity-based connection feature is powered by the Nearby Connections API, ensuring that users engage with their community in person before extending their network digitally. Check out the documentions file for more information
- Purpose: Display a list of users that the current user follows in a RecyclerView.
- Key Methods:
onCreateViewHolder()
: Inflates the custom layout for each item, including image and text views for user details.getItemCount()
: Returns the total number of users in the follow list.onBindViewHolder()
: Binds user data (profile image and name) to each ViewHolder using Glide for efficient image loading.
- Purpose: Manage and display posts, including post images, user details, timestamps, and actions like liking or sharing.
- Key Methods:
onCreateViewHolder()
: Prepares the view structure for each post item.getItemCount()
: Returns the number of posts to display.onBindViewHolder()
: Binds post data and interacts with Firebase to fetch and display user data, handle likes, and navigate based on post data.
- Purpose: Central hub where posts and follows are displayed.
- Key Methods:
loadProfileImage()
,loadPosts()
,loadFollows()
: Fetch data from Firebase and update adapters.onCreateView()
: Sets up RecyclerViews, binds data to adapters, and loads initial data.onOptionsItemSelected()
: Handles menu selections for navigation.
![Screenshot 2024-06-01 at 4 19 19 PM](https://private-user-images.githubusercontent.com/84360137/335825792-3dfe3bc4-ef69-44f9-aa40-2bd7df81da17.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQyMjIxNDgsIm5iZiI6MTcyNDIyMTg0OCwicGF0aCI6Ii84NDM2MDEzNy8zMzU4MjU3OTItM2RmZTNiYzQtZWY2OS00NGY5LWFhNDAtMmJkN2RmODFkYTE3LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODIxVDA2MzA0OFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTI0YWEyMmQ0YTdmNTQ5YzFiNjQ2YTkzMGI5YTcyYzI5NDhmZjIzMWRjYWM1NWJjNzBhZTRjODYwMzk2ZTQwZjImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0._aZ7ESwv0DA34McX8g41sdsvyEazKbwYkQW0Dz_jQ7Y)
- Purpose: Load and display comments for posts.
- Key Methods:
onBindViewHolder()
: Initializes CommentAdapter, toggles comment section visibility, loads comments from Firebase when opened, and binds comment data to views.CommentViewHolder
: Sets user’s name, profile image, comment text, and relative time using the TimeAgo library.
![Screenshot 2024-06-01 at 4 19 58 PM](https://private-user-images.githubusercontent.com/84360137/335825813-2b9576ed-2879-4aed-ba11-25dbbb8a9914.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQyMjIxNDgsIm5iZiI6MTcyNDIyMTg0OCwicGF0aCI6Ii84NDM2MDEzNy8zMzU4MjU4MTMtMmI5NTc2ZWQtMjg3OS00YWVkLWJhMTEtMjVkYmJiOGE5OTE0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODIxVDA2MzA0OFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTQ3Y2Q1NjA3ZDMzNTYzZWVmOTEwMDZhNWI1MjkxY2IyNjIxMzY4Yzk0ODk4NTUwZWRmYjFlZjVkNDZmMWRiY2UmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.yBGcOzQX7ucF1nLWIEzoB3mV6Ak1sAnbpCKxocu92j4)
- Purpose: Provide a UI for adding different types of content.
- Key Methods:
onCreateView()
: Sets up UI components and event handlers.postLinearLayout
OnClickListener: Fetches current location, creates intent to start PostActivity, and passes location data.
- Purpose: Allow users to create and publish posts.
- Key Methods:
onCreate()
: Initializes form fields, buttons, and receives location data.- Image Selection: Uses
ActivityResultContracts.GetContent()
for selecting images anduploadImage()
for uploading to Firebase. - Location Setup: Uses
ActivityResultContracts.StartActivityForResult()
for location selection. - Date and Time Pickers: Allow users to select date and time for events.
- Event Handlers: Commit the new post to Firestore or cancel the operation.
![Screenshot 2024-06-01 at 4 20 47 PM](https://private-user-images.githubusercontent.com/84360137/335825845-9631101c-f4f3-43fd-a287-7783910edef9.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQyMjIxNDgsIm5iZiI6MTcyNDIyMTg0OCwicGF0aCI6Ii84NDM2MDEzNy8zMzU4MjU4NDUtOTYzMTEwMWMtZjRmMy00M2ZkLWEyODctNzc4MzkxMGVkZWY5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODIxVDA2MzA0OFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWE2MGEyNTkyYzliZWVjOTVmYmJkNmVlODNiZTY3MTQzMzc1NmU2ZjY5ZmE5OTA2NjZiNDFhMzllODcwMGQ1MjkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.pmEN_xnShgOcTPfMEi4mCTP2Q8AN4UfsfUqA2bHntFI)
- Purpose: Manage and display a list of posts by the current user in a RecyclerView.
- Key Methods:
onCreateViewHolder()
: Sets up the ViewHolder for each post item.getItemCount()
: Returns the count of posts available for display.onBindViewHolder()
: Binds data to each ViewHolder, loading post images using Picasso.
- Purpose: Display all posts made by the current user.
- Key Methods:
onCreateView()
: Sets up the RecyclerView with its adapter and layout manager, and initiates loading of user posts.loadUserPosts()
: Fetches posts from Firebase Firestore and updates the adapter’s data set.
![Screenshot 2024-06-01 at 4 21 22 PM](https://private-user-images.githubusercontent.com/84360137/335825870-f7dba76f-c85a-45a6-aa96-5aa824276e88.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQyMjIxNDgsIm5iZiI6MTcyNDIyMTg0OCwicGF0aCI6Ii84NDM2MDEzNy8zMzU4MjU4NzAtZjdkYmE3NmYtYzg1YS00NWE2LWFhOTYtNWFhODI0Mjc2ZTg4LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODIxVDA2MzA0OFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTBlNDFjMDdjNjIxNTg2MGUwY2JiOWEyZTQ2MWY4ZTY5YzBkZDEzNmYwMDE4ZmJiMjIxZmNlMzdiMTI3MTA1MDYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.42cm42hqjCA4_uYr0xVSft8td3mc3QvjIm2SjG8isqs)
- Purpose: Display a list of posts that the user has liked.
- Key Methods:
onCreateView()
: Sets up the fragment layout, initializes PostAdapter, and configures the RecyclerView.loadLikedPosts()
: Fetches liked post IDs from Firebase Firestore and retrieves post details usingfetchPostsByIds()
.
![Screenshot 2024-06-01 at 4 22 15 PM](https://private-user-images.githubusercontent.com/84360137/335825898-b3dbae4d-5585-4c37-b484-f09fe787e91f.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQyMjIxNDgsIm5iZiI6MTcyNDIyMTg0OCwicGF0aCI6Ii84NDM2MDEzNy8zMzU4MjU4OTgtYjNkYmFlNGQtNTU4NS00YzM3LWI0ODQtZjA5ZmU3ODdlOTFmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODIxVDA2MzA0OFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTA2NGNlYjE3NWMyYTJmZGY3NzBiMTBkZThlOWFjNjljMzgzNmU2ODQyM2FjNDRhMDQyYjBiMTI0ZDQzMWUwOTMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.yacWmEqdE6jfs2V9pl4SQgQnk8PZPDWnN6sY5gxfmwA)
- Purpose: Manage the display of chat messages in a RecyclerView.
- Key Methods:
onCreateViewHolder()
: Creates new views by inflating the message layout.onBindViewHolder()
: Binds data to each ViewHolder, setting message text, sender’s name, timestamp, and profile image.getItemCount()
: Returns the total number of items in the data set.updateMessages()
: Updates the dataset within the adapter and notifies it to refresh the view.
- Purpose: Handle the user interface for a chat session.
- Key Methods:
onCreateView()
: Sets up the RecyclerView with its adapter and layout manager.onViewCreated()
: Loads messages and sets up a button listener for sending new messages.loadMessages()
: Fetches messages from Firebase Firestore in real-time.sendMessageToFirebase()
: Sends a new message to Firebase Firestore.
- Purpose: Display a list of users that the current user can chat with.
- Key Methods:
onCreateView()
: Inflates the layout and initializes the RecyclerView.loadUsers()
: Fetches a list of users that the current user is following.
- Purpose: Manage the display of a list of users within a RecyclerView.
- Key Methods:
updateUsers(newUsers, newUserIds)
: Updates the adapter’s data sources.UserViewHolder
: Holds references to UI components and sets up a click listener.onCreateViewHolder(parent, viewType)
: Inflates the layout for individual components.onBindViewHolder(holder, position)
: Binds data to each ViewHolder.getItemCount()
: Returns the total number of items in the adapter.
![Screenshot 2024-06-01 at 4 23 31 PM](https://private-user-images.githubusercontent.com/84360137/335825951-84b094d9-17d3-48a7-813d-f2fdb14cca87.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQyMjIxNDgsIm5iZiI6MTcyNDIyMTg0OCwicGF0aCI6Ii84NDM2MDEzNy8zMzU4MjU5NTEtODRiMDk0ZDktMTdkMy00OGE3LTgxM2QtZjJmZGIxNGNjYTg3LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODIxVDA2MzA0OFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTI2NmYzYmFlNDJiZGM2YTQ1YjRiOGNmYzkwMjMzNGNiZGYxNGIwN2Q1M2U5MTlkYmE1OWI1MzllOGQ1NzRjYmYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.L_XItnjHSKbIF1ehCJJvSJpHE2bW-vRwVNAU2wMhsv8)
- Purpose: Provide a space for users to view and edit their profiles.
- Key Methods:
onCreateView()
: Sets up UI components and listeners for user interactions.setupViewPager()
: Initializes a ViewPagerAdapter for managing tabs within the profile.logoutUser()
: Handles user logout and redirects to LoginActivity.updateUserProfile()
: Fetches and displays user information from Firebase Firestore.
- Purpose: Register new users or update existing profiles.
- Key Methods:
onCreate()
: Sets up the activity layout and initializes form fields and buttons.registerForActivityResult()
: Manages image picker results and uploads profile images to Firebase Storage.
- Purpose: Handle user authentication.
- Key Methods:
onCreate()
: Sets up the activity layout and initializes input fields and buttons.login()
: Authenticates the user using Firebase Auth.
![Screenshot 2024-06-01 at 4 24 00 PM](https://private-user-images.githubusercontent.com/84360137/335825965-a498fe52-a9da-4d55-afef-48594cf99a2b.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQyMjIxNDgsIm5iZiI6MTcyNDIyMTg0OCwicGF0aCI6Ii84NDM2MDEzNy8zMzU4MjU5NjUtYTQ5OGZlNTItYTlkYS00ZDU1LWFmZWYtNDg1OTRjZjk5YTJiLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODIxVDA2MzA0OFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTU5NmFhM2MzNjZkYjFkYmRhOWJhMDQ2NjQwMWRhMDJlY2NhODk4NjExOGIxNDI4NTEzMjY3MjRiMWViNmE1NjkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.qgeUGJ98OnY5Q4iHEiPIhMfwV8D8cLl9XDKEJ-K519E)
- Purpose: Search through users the current user is following and navigate to AddUserActivity to follow new users.
- Key Components:
- RecyclerView with SearchAdapter: Displays user data with a toggle button to unfollow users.
- Purpose: Connect with nearby users using Google Play services Nearby Connections API and goQR.me QR code API.
- Key Methods:
- Broadcasting user’s device using NearbyConnectionsAPI.
- Handling connection requests and sending user data via shaking the device or pressing a button.
- Populating the SearchAdapter RecyclerView with followed/unfollowed users.
![Screenshot 2024-06-01 at 4 24 27 PM](https://private-user-images.githubusercontent.com/84360137/335826002-f458b568-acf9-4933-a136-b5e48ccffd46.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQyMjIxNDgsIm5iZiI6MTcyNDIyMTg0OCwicGF0aCI6Ii84NDM2MDEzNy8zMzU4MjYwMDItZjQ1OGI1NjgtYWNmOS00OTMzLWExMzYtYjVlNDhjY2ZmZDQ2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODIxVDA2MzA0OFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWNjZDIxMTlhOThjZGIwMTU1NzE1ZjYyOTBiNWE4MmViMWUyZDljYjA3ZmQ0MWJiMDUwYTQwNDEyYWU2MGJjZmMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.2kpx5t-aXHkBvWU53h1azZQayetuMVMih9Go1Y4O-mc)
- Purpose: Add a location to an event post.
- Key Methods:
- Inflates
activity_maps
layout using Google Maps API. - Centers the map around the user’s last known location.
- Allows selecting a location and sending it back to PostActivity.
- Inflates
- Purpose: Display a map with event locations and filter options.
- Key Methods:
- Inflates
fragment_maps
layout using Google Maps API. - Centers the map around the user’s last known location.
- Populates the map with event markers from Firestore.
- Inflates
- Purpose: Store the user’s last location for use in MapsActivity and MapsFragment.
- goQR.me API: Generates QR codes from data.
- NearbyConnections API: Manages local communication technologies for connecting nearby devices.
- Google Maps API: Displays maps and handles location selection.
- Connectivity Requirements: Difficulty finding a suitable connection technology; resolved using NearbyConnections API.
- Post Timestamps: Ensured all new posts include timestamps.
- Loading Posts: Used Firestore’s pagination capabilities and lazy loading for better performance.
- Location Data Integration: Ensured accurate location capture and clear UI/UX flow in PostActivity.
- Firebase Firestore Queries: Optimized for efficiency with indexes and fine-tuned queries.
- Live Messaging and Comments: Implemented using Firebase Firestore’s real-time capabilities.
- Device Compatibility: Employed responsive design principles and extensive testing.
- Maps/Location Synchronization: Used a combination of intents and ViewModel for accurate data passing.
- User Interface Refinement: Based on user feedback, implement Material design components and transitions.
- Real-time Functionalities: Add instant notifications for new posts or updates.
- Advanced Search and Filtering: Implement search by keywords and filtering by date.
- Expanded Social Functionalities: Add tagging users in comments/posts and private groups/forums.
- User Behavior Analytics: Implement analytics to track user behavior and feedback mechanisms.
- Offline Functionality: Cache data locally for offline access.
- Integration with Other APIs: Enrich functionalities with weather services, AI for captions, etc.
- Enhanced Security Features: Implement one-time tokens for user data transfer.
- Device Permissions: Properly requested and handled.
- Fragment Communication: Utilized proper interfaces.
- RecyclerView and CardView: Used appropriately.
- Menus: Implemented effectively.
- Gestures and Accelerometer: Used correctly where needed.
- Multi-locale Support: Targeted multiple locales (e.g., English, Korean).
- Implement Firebase Auth
- Retrieving Data
- Read and Write Data
- Upload files with Cloud storage
- How to use Firebase Storage
- Save images to the Firebase Storage
- How to message users
- Login and registration
- Firebase comments system
- Instagram clone using firebase (Inspiration)
- Google Maps implementation
- Google Maps Platform Documentation
- Save data in database
- Nearby Connections documentation