{"id":20330256,"url":"https://github.com/sabo99/activityresultcontracts","last_synced_at":"2025-08-15T22:34:17.625Z","repository":{"id":170699159,"uuid":"442987631","full_name":"sabo99/ActivityResultContracts","owner":"sabo99","description":"Android App Module - Activity Result Contracts","archived":false,"fork":false,"pushed_at":"2021-12-30T06:31:00.000Z","size":1582,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-30T01:11:10.717Z","etag":null,"topics":["activity-lifecycle","async-await","kotlin","kotlin-coroutines","permission-android"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sabo99.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2021-12-30T06:30:44.000Z","updated_at":"2022-02-01T06:40:50.000Z","dependencies_parsed_at":null,"dependency_job_id":"a7f9199d-32f1-4d9f-ab6f-00ba25c4bf77","html_url":"https://github.com/sabo99/ActivityResultContracts","commit_stats":null,"previous_names":["sabo99/activityresultcontracts"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sabo99/ActivityResultContracts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sabo99%2FActivityResultContracts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sabo99%2FActivityResultContracts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sabo99%2FActivityResultContracts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sabo99%2FActivityResultContracts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sabo99","download_url":"https://codeload.github.com/sabo99/ActivityResultContracts/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sabo99%2FActivityResultContracts/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270638135,"owners_count":24620469,"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","status":"online","status_checked_at":"2025-08-15T02:00:12.559Z","response_time":110,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-lifecycle","async-await","kotlin","kotlin-coroutines","permission-android"],"created_at":"2024-11-14T20:15:43.594Z","updated_at":"2025-08-15T22:34:17.592Z","avatar_url":"https://github.com/sabo99.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# \u003cimg src=\"https://img.icons8.com/color/48/000000/android-studio--v3.png\"/\u003e Activity Result Contract with async \u0026 await (Asynchronous) - Android App Module\n\n### **App Features Activity Result Contract** :\n\n-   **_ActivityResultContracts_**\n    -   **Permissions**\n        -   Request Permission\n        -   Multiple Request Permissions\n    -   **Image**\n        -   Pick Image from **Camera**\n        -   Select Image from **Gallery**\n        -   **CropImageActivity** with Pick Image or Select Image\n    -   **Document**\n        -   Open Single Document\n        -   Open Multiple Documents\n-   **_CoroutineScope_**\n    -   **GlobalScope**\n    -   **async{}**\n    -   **await()**\n\n\u003cbr\u003e\n\n## Design UI App Activity Result Contract\n\n\u003c!-- ### **`Preview Activity Result Contract`**\n\n\u003cimg src=\"Screenshot_App/Screenshot 2021-12-15 110852.png\" height=\"500\"/\u003e --\u003e\n\n### **`Preview UI FirebaseAuth-Google`**\n\n|         Name Page         |                         Preview UI                         |                         Preview UI                         |\n| :-----------------------: | :--------------------------------------------------------: | :--------------------------------------------------------: |\n|          `Home`           | \u003cimg src=\"Screenshot_App/1640844061484.jpg\" height=\"500\"/\u003e |                           `none`                           |\n|       `Permissions`       | \u003cimg src=\"Screenshot_App/1640842464650.jpg\" height=\"500\"/\u003e | \u003cimg src=\"Screenshot_App/1640842464642.jpg\" height=\"500\"/\u003e |\n|       `Crop Image`        | \u003cimg src=\"Screenshot_App/1640842464667.jpg\" height=\"500\"/\u003e | \u003cimg src=\"Screenshot_App/1640842464659.jpg\" height=\"500\"/\u003e |\n|  `Open Single Document`   | \u003cimg src=\"Screenshot_App/1640842464630.jpg\" height=\"500\"/\u003e | \u003cimg src=\"Screenshot_App/1640842464623.jpg\" height=\"500\"/\u003e |\n| `Open Multiple Documents` | \u003cimg src=\"Screenshot_App/1640842464615.jpg\" height=\"500\"/\u003e | \u003cimg src=\"Screenshot_App/1640842464606.jpg\" height=\"500\"/\u003e |\n\n\u003cbr\u003e\n\n## Dependencies used\n\n```groovy\n    // Kotlin Coroutine\n    implementation 'androidx.activity:activity-ktx:1.4.0'\n    // Image Cropper\n    api 'com.theartofdev.edmodo:android-image-cropper:2.8.0'\n```\n\n### Integration Step Used Binding in Kotlin\n\n1. Add **viewBinding `true`** \u003ca href=\"./app/build.gradle\"\u003e`build.gralde (Module)`\u003c/a\u003e\n\n```groovy\nandroid {\n   ...\n   buildFeatures {\n      viewBinding true\n   }\n}\n```\n\n2. Activity Kotlin Class\n\n```kotlin\nclass MainActivity : AppCompatActivity() {\n\n    /** Add this */\n    private lateinit var binding: ActivityMainBinding\n\n    override fun onCreate(savedInstanceState: Bundle?) {\n        super.onCreate(savedInstanceState)\n        /** Add this */\n        binding = ActivityMainBinding.inflate(layoutInflater)\n\n        /** Change this */\n        setContentView(binding.root)\n\n        /** Without findViewById */\n        binding.textView.text = \"Bye bye findViewById\"\n    }\n}\n```\n\n3. Activity Java Class\n\n```java\npublic class MainActivity extends AppCompatActivity {\n\n    /** Add this */\n    private ActivityMainBinding binding;\n\n    @Override\n    protected void onCreate(Bundle savedInstanceState) {\n        super.onCreate(savedInstanceState);\n        /** Add this */\n        binding = ActivityMainBinding.inflate(getLayoutInflater());\n\n        /** Change this */\n        setContentView(binding.getRoot());\n\n        /** Without findViewById */\n        binding.textView.setText(\"Bye bye findViewById\");\n    }\n}\n```\n\n**binding** in kotlin can be used directly without initializing **findViewById** on widgets in layout xml\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsabo99%2Factivityresultcontracts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsabo99%2Factivityresultcontracts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsabo99%2Factivityresultcontracts/lists"}