{"id":15458598,"url":"https://github.com/nisrulz/android-lib-init-examples","last_synced_at":"2025-04-22T10:19:30.612Z","repository":{"id":147264765,"uuid":"313149813","full_name":"nisrulz/android-lib-init-examples","owner":"nisrulz","description":"[Examples] Simple basic isolated android examples to showcase various library initialization mechanisms","archived":false,"fork":false,"pushed_at":"2020-11-16T19:55:46.000Z","size":181,"stargazers_count":10,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-29T14:07:24.157Z","etag":null,"topics":["android","android-app","android-application","android-library","appstart","appstartup","initialization","initializer","startup"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nisrulz.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},"funding":{"github":"nisrulz","ko_fi":"nisrulz","buy_me_a_coffee":"nisrulz","custom":["https://revolut.me/nisrulz","https://www.paypal.me/nisrulz/5eur"]}},"created_at":"2020-11-16T00:12:08.000Z","updated_at":"2025-02-24T05:50:48.000Z","dependencies_parsed_at":null,"dependency_job_id":"135c1500-689b-43f7-9fbd-595a7b0df0cf","html_url":"https://github.com/nisrulz/android-lib-init-examples","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nisrulz%2Fandroid-lib-init-examples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nisrulz%2Fandroid-lib-init-examples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nisrulz%2Fandroid-lib-init-examples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nisrulz%2Fandroid-lib-init-examples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nisrulz","download_url":"https://codeload.github.com/nisrulz/android-lib-init-examples/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250221177,"owners_count":21394679,"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":["android","android-app","android-application","android-library","appstart","appstartup","initialization","initializer","startup"],"created_at":"2024-10-01T23:01:20.620Z","updated_at":"2025-04-22T10:19:30.597Z","avatar_url":"https://github.com/nisrulz.png","language":"Kotlin","funding_links":["https://github.com/sponsors/nisrulz","https://ko-fi.com/nisrulz","https://buymeacoffee.com/nisrulz","https://revolut.me/nisrulz","https://www.paypal.me/nisrulz/5eur"],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\u003ch1\u003eAndroid Library Init Examples 🚀\u003c/h1\u003e\n\u003cstrong\u003e\n  \u003cem\u003eSimple basic isolated android examples to showcase various library initialization mechanisms. \u003c/em\u003e\n\u003c/strong\u003e\u003c/div\u003e\n\n\u003cbr\u003e\n\n\u003cdiv align=\"center\"\u003e\u003ca href=\"https://github.com/nisrulz/android-lib-init-examples\"\u003e\n  \u003cimg src=\"https://img.shields.io/github/stars/nisrulz/android-lib-init-examples.svg?style=social\u0026amp;label=Star\" alt=\"GitHub stars\"\u003e\n\u003c/a\u003e \u003ca href=\"https://github.com/nisrulz/android-lib-init-examples/fork\"\u003e\n  \u003cimg src=\"https://img.shields.io/github/forks/nisrulz/android-lib-init-examples.svg?style=social\u0026amp;label=Fork\" alt=\"GitHub forks\"\u003e\n\u003c/a\u003e \u003ca href=\"https://github.com/nisrulz/android-lib-init-examples\"\u003e\n  \u003cimg src=\"https://img.shields.io/github/watchers/nisrulz/android-lib-init-examples.svg?style=social\u0026amp;label=Watch\" alt=\"GitHub watchers\"\u003e\n\u003c/a\u003e \u003ca href=\"https://github.com/nisrulz/android-lib-init-examples\"\u003e\n  \u003cimg src=\"https://img.shields.io/github/followers/nisrulz.svg?style=social\u0026amp;label=Follow\" alt=\"GitHub followers\"\u003e\n\u003c/a\u003e\u003ca href=\"https://twitter.com/nisrulz\"\u003e\n  \u003cimg src=\"https://img.shields.io/twitter/follow/nisrulz.svg?style=social\" alt=\"Twitter Follow\"\u003e\n\u003c/a\u003e\n\n\u003c/div\u003e\n\n## Examples\n- [Using Normal Class Constructor To Init Lib](/UsingNormalClassConstructorToInitLib) \n- [Using Normal Class Init Function To Init Lib](/UsingNormalClassInitFnToInitLib)\n- [Using LifecycleObserver To Init Lib](/UsingLifecycleObserverToInitLib)  \n- [Using Singleton To Init Lib](/UsingSingletonToInitLib)\n- [Using ContentProvider To Init Lib](/UsingContentProviderToInitLib)\n- [Using AndroidX Startup](/UsingAndroidXStartup)\n\n## Questions\n- **Question: Is a ContentProvider's `onCreate()` called before the Application's `onCreate()` ?**\n  \n  Ans: Yes. \n  \n  Example app: [Application Class Init Vs ContentProvider Init](/ApplicationClassInitVsContentProviderInit)\n\n  \u003cimg src=\"img/sc_1.png\" width=480 /\u003e\n\n## Contribution/Pull Requests\nI welcome and encourage all pull requests. It usually will take me within 24-48 hours to respond to any issue or request. Here are some basic rules to follow to ensure timely addition of your request:\n  1. Match coding style (braces, spacing, etc.) This is best achieved using `Reformat Code` feature of Android Studio `CMD`+`Option`+`L` on Mac and `CTRL` + `ALT` + `L` on Linux + Windows .\n  2. If its a feature, bugfix, or anything please only change code to what you specify.\n  3. Please keep PR titles easy to read and descriptive of changes, this will make them easier to merge :)\n  4. Pull requests _must_ be made against `develop` branch. Any other branch (unless specified by the maintainers) will get rejected.\n  5. Check for existing [issues](https://github.com/nisrulz/android-lib-init-examples/issues) first, before filing an issue.\n  6. Make sure you follow the set standard as all other projects in this repo do\n\n      + Upgrade your gradle wrapper to the one all other apps are using. Use the below command at root of your project\n\n          ```\n          ./gradlew wrapper --gradle-version \u003cversion_name\u003e\n          ```\n          i.e `./gradlew wrapper --gradle-version 6.5`\n      \n      + Use the package name of the format `github.nisrulz.example.*` where `*` is the example you are adding to the repo. I am trying to follow a set standard in the repo, please adhere to that.\n  7. Have fun!\n\n## Talk/Presentation\n- [Droidcon Americas 2020](https://crushingcode.nisrulz.com/talks/droidcon_americas_2020/)\n\nLicense\n=======\n\n    Copyright 2020 Nishant Srivastava\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n\n[Read the full text here](/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnisrulz%2Fandroid-lib-init-examples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnisrulz%2Fandroid-lib-init-examples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnisrulz%2Fandroid-lib-init-examples/lists"}