{"id":18838622,"url":"https://github.com/beeware/briefcase-android-gradle-template","last_synced_at":"2025-08-25T00:15:32.706Z","repository":{"id":37985626,"uuid":"248874337","full_name":"beeware/briefcase-android-gradle-template","owner":"beeware","description":"A template for generating Android Gradle projects with Briefcase","archived":false,"fork":false,"pushed_at":"2025-07-14T02:42:07.000Z","size":3744,"stargazers_count":25,"open_issues_count":2,"forks_count":31,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-07-14T04:59:02.554Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/beeware.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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,"zenodo":null},"funding":{"github":["freakboy3742"],"custom":["http://beeware.org/bee/join"]}},"created_at":"2020-03-20T23:51:59.000Z","updated_at":"2025-07-14T02:52:08.000Z","dependencies_parsed_at":"2023-11-18T03:29:03.340Z","dependency_job_id":"2372cc3d-30a4-440b-882e-f131e6f8b991","html_url":"https://github.com/beeware/briefcase-android-gradle-template","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/beeware/briefcase-android-gradle-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beeware%2Fbriefcase-android-gradle-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beeware%2Fbriefcase-android-gradle-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beeware%2Fbriefcase-android-gradle-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beeware%2Fbriefcase-android-gradle-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/beeware","download_url":"https://codeload.github.com/beeware/briefcase-android-gradle-template/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beeware%2Fbriefcase-android-gradle-template/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271983724,"owners_count":24853810,"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-24T02:00:11.135Z","response_time":111,"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":[],"created_at":"2024-11-08T02:40:06.073Z","updated_at":"2025-08-25T00:15:32.693Z","avatar_url":"https://github.com/beeware.png","language":"Java","funding_links":["https://github.com/sponsors/freakboy3742","http://beeware.org/bee/join"],"categories":[],"sub_categories":[],"readme":"# Briefcase Android Gradle Template\n\nA [Cookiecutter](https://github.com/cookiecutter/cookiecutter/) template\nfor building Python apps that will run under Android.\n\n## Using this template\n\nThe easiest way to use this project is to not use it at all - at least,\nnot directly. [Briefcase](https://github.com/beeware/briefcase/) is a\ntool that uses this template, rolling it out using data extracted from a\n`pyproject.toml` configuration file.\n\nHowever, if you *do* want use this template directly...\n\n1.  Install\n    [cookiecutter](https://github.com/cookiecutter/cookiecutter). This\n    is a tool used to bootstrap complex project templates:\n\n        $ pip install cookiecutter\n\n2.  Run `cookiecutter` on the template:\n\n        $ cookiecutter https://github.com/beeware/briefcase-android-gradle-template\n\n    This will ask you for a number of details of your application,\n    including the name of your application (which should be a valid\n    PyPI identifier), and the Formal Name of your application (the\n    full name you use to describe your app). The remainder of these\n    instructions will assume a name of `my-project`, and a formal name\n    of `My Project`.\n\n3.  Add your code to the template, into the\n    `My Project/app/src/main/python` directory. At the very minimum, you\n    need to have an `\u003capp name\u003e/__main__.py` file that invokes\n    `org.beeware.android.MainActivity.setPythonApp()`, providing an\n    `IPythonApp` instance. This provides the hooks into the Android\n    application lifecycle (`onCreate`, `onResume` and so on); it's up to\n    you what your code does with those lifecycle hooks.\n\n    If your code has any dependencies, they should be listed in the file\n    `My Project/app/requirements.txt`.\n\nIf you've done this correctly, a project with a formal name of\n`My Project`, with an app name of `my-project` should have a directory\nstructure that looks something like:\n\n    My Project/\n        app/\n            src/\n                main/\n                    python/\n                        my_project/\n                            __init__.py\n                            __main__.py (declares IPythonApp)\n                cpp/\n                    ...\n                java/\n                    ...\n                res/\n                    ...\n                AndroidManifest.xml\n            build.gradle\n            proguard-rules.pro\n            requirements.txt\n        briefcase.toml\n        build.gradle\n        gradle.properties\n        gradlew\n        gradlew.bat\n        settings.gradle\n\nYou're now ready to build and run your project! Either open the\n`My Project` directory in Android Studio, or [use the command line\ntools](https://developer.android.com/studio/build/building-cmdline).\n\n## Next steps\n\nOf course, running Python code isn't very interesting by itself - you'll\nbe able to output to the console, and see that output in the Logcat, but\nif you tap the app icon on your phone, you won't see anything - because\nthere isn't a visible console on an Android.\n\nTo do something interesting, you'll need to work with the native Android\nsystem libraries to draw widgets and respond to screen taps. The\n[Chaquopy](https://chaquo.com/chaquopy/) Java bridging library can be\nused to interface with the Android system libraries.\n\nAlternatively, you could use a cross-platform widget toolkit that\nsupports Android (such as\n[Toga](https://beeware.org/project/projects/libraries/toga)) to provide\na GUI for your application. Toga automatically handles creating the\n`IPythonApp` instance and responding to the app's lifecycle hooks.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeeware%2Fbriefcase-android-gradle-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbeeware%2Fbriefcase-android-gradle-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeeware%2Fbriefcase-android-gradle-template/lists"}