{"id":19438539,"url":"https://github.com/ireddragonicy/cb24153-lab-intent-activity","last_synced_at":"2026-05-07T04:40:56.493Z","repository":{"id":261278048,"uuid":"883691236","full_name":"IRedDragonICY/cb24153-lab-intent-activity","owner":"IRedDragonICY","description":"A simple Android application that demonstrates the use of explicit and implicit intents to navigate between different activities and send data across them. ","archived":false,"fork":false,"pushed_at":"2024-11-05T18:24:53.000Z","size":677,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-25T07:17:04.286Z","etag":null,"topics":["activity","android","demo","demo-app","intent","java","kotlin","lab","mobile-app","tutorial"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/IRedDragonICY.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-05T12:09:29.000Z","updated_at":"2024-11-05T18:24:56.000Z","dependencies_parsed_at":"2024-11-05T17:46:24.346Z","dependency_job_id":"d97ecb76-fc0b-4255-92f2-065379ba354a","html_url":"https://github.com/IRedDragonICY/cb24153-lab-intent-activity","commit_stats":null,"previous_names":["ireddragonicy/cb24153-lab-intent-activity"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/IRedDragonICY/cb24153-lab-intent-activity","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IRedDragonICY%2Fcb24153-lab-intent-activity","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IRedDragonICY%2Fcb24153-lab-intent-activity/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IRedDragonICY%2Fcb24153-lab-intent-activity/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IRedDragonICY%2Fcb24153-lab-intent-activity/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/IRedDragonICY","download_url":"https://codeload.github.com/IRedDragonICY/cb24153-lab-intent-activity/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IRedDragonICY%2Fcb24153-lab-intent-activity/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260427291,"owners_count":23007488,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["activity","android","demo","demo-app","intent","java","kotlin","lab","mobile-app","tutorial"],"created_at":"2024-11-10T15:18:54.826Z","updated_at":"2026-05-07T04:40:51.473Z","avatar_url":"https://github.com/IRedDragonICY.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Intent Activity Demo\n\n\nThis project is a simple Android application that demonstrates the use of explicit and implicit intents to navigate between different activities and send data across them. The application includes four main activities:\n\n- **MainActivity**: The starting point, which initiates the navigation and data sending to other activities.\n- **BActivity**: Receives and sends data back to `MainActivity` or forwards it to `CActivity`.\n- **CActivity**: Receives data from `BActivity`.\n- **MyImplicitIntent**: Demonstrates implicit intents, such as opening a browser or sending an SMS.\n\n## Table of Contents\n\n- [Getting Started](#getting-started)\n- [Structure](#structure)\n- [Usage](#usage)\n- [Screenshots](#screenshots)\n- [How Intents Work](#how-intents-work)\n- [License](#license)\n\n---\n\n## Getting Started\n\nTo get a local copy of this project up and running, follow these simple steps:\n\n### Prerequisites\n\n- **Android Studio**: Download and install [Android Studio](https://developer.android.com/studio).\n- **Android Device or Emulator**: The application can be run on a physical Android device or an emulator.\n\n### Installation\n\n1. **Clone the Repository**:\n   ```bash\n   git clone https://github.com/IRedDragonICY/cb24153-lab-intent-activity.git\n   ```\n2. **Open in Android Studio**:\n   Open Android Studio, navigate to `File -\u003e Open`, and select the cloned project.\n3. **Build and Run**:\n   After the project loads, click on the `Run` button or use `Shift + F10` to build and deploy the app on an emulator or connected device.\n\n---\n\n## Structure\n\nThe project is structured as follows:\n\n- **MainActivity.kt**: The main activity that sends data to `BActivity`, `CActivity`, and triggers the implicit intent to open `MyImplicitIntent`.\n- **BActivity.java**: An activity that receives data from `MainActivity`, displays it, and allows sending data back to `MainActivity` or forwarding it to `CActivity`.\n- **CActivity.java**: Receives data from `BActivity` and displays it.\n- **MyImplicitIntent.java**: Demonstrates implicit intents, allowing the user to open a URL in a browser or send an SMS.\n- **XML Layout Files**:\n  - `mainactivity.xml`: Layout for `MainActivity`【15†source】.\n  - `bactivity.xml`: Layout for `BActivity`【13†source】.\n  - `cactivity.xml`: Layout for `CActivity`【14†source】.\n  - `myimplicitintentactivity.xml`: Layout for `MyImplicitIntent`【16†source】.\n\n---\n\n## Usage\n\n1. **Main Activity**:\n   - Input data in the \"Set Info.\" field.\n   - Choose one of the options:\n     - **Send To B**: Sends data to `BActivity`.\n     - **Send To C**: Sends data directly to `CActivity`.\n     - **Imp. Act.**: Opens `MyImplicitIntent` for implicit intents.\n\n2. **B Activity**:\n   - Displays the received data from `MainActivity`.\n   - Allows sending data back to `MainActivity` with **Reply Main** or forwarding it to `CActivity` with **Send To C**.\n\n3. **C Activity**:\n   - Displays data received from either `MainActivity` or `BActivity`.\n\n4. **My Implicit Intent**:\n   - Provides options to perform implicit actions, such as opening a browser or sending an SMS.\n\n\n---\n\n## How Intents Work\n\nIntents are used to navigate between different activities and pass data in Android. This application demonstrates both **Explicit Intents** (for navigating to a specified activity) and **Implicit Intents** (for actions like opening a URL in a browser).\n\n### Intent Workflow\n![Intent Workflow](https://github.com/user-attachments/assets/7dffee14-f36b-423a-a513-32f51c8c63f3)\n\n# Intent Application\n\n1. **Explicit Intents**:\n   - **MainActivity** to **BActivity** and **CActivity**:\n     - Data is sent using `Intent.putExtra(\"key\", value)` and received using `getIntent().getStringExtra(\"key\")`.\n   \n   - **BActivity** back to **MainActivity**:\n     - Data is sent back using `setResult()` and received in `MainActivity` through `onActivityResult()`.\n\n2. **Implicit Intents**:\n   - **MyImplicitIntent** activity allows for implicit actions like browsing a website or sending an SMS.\n\n---\n\n## Demo\n\n[![Watch the demo](https://img.youtube.com/vi/OZVv5iGewpc/0.jpg)](https://youtu.be/OZVv5iGewpc)\n\n\n---\n\n## License\n\nThis project is licensed under the GNU General Public License v3.0. For more information, see the [LICENSE](LICENSE) file.\n\n---\n\n## Additional Notes\n\n- This application serves as a demonstration for Android Intents.\n- Make sure to handle permissions, especially for actions like sending SMS, in a real-world application.\n- The layouts and activities can be customized as per your project's requirements.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fireddragonicy%2Fcb24153-lab-intent-activity","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fireddragonicy%2Fcb24153-lab-intent-activity","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fireddragonicy%2Fcb24153-lab-intent-activity/lists"}