{"id":19137799,"url":"https://github.com/ibaryshnikov/android-iced-example","last_synced_at":"2025-05-06T20:23:07.154Z","repository":{"id":246859973,"uuid":"822371208","full_name":"ibaryshnikov/android-iced-example","owner":"ibaryshnikov","description":"Example of building iced for android","archived":false,"fork":false,"pushed_at":"2025-01-23T07:46:39.000Z","size":529,"stargazers_count":41,"open_issues_count":1,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-19T14:57:55.936Z","etag":null,"topics":["android","iced","rust","webgpu","wgpu","winit"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/ibaryshnikov.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,"zenodo":null}},"created_at":"2024-07-01T02:53:17.000Z","updated_at":"2025-04-14T09:12:49.000Z","dependencies_parsed_at":"2024-07-05T15:15:41.108Z","dependency_job_id":"cbedd403-9920-4347-868e-1ca60e760faa","html_url":"https://github.com/ibaryshnikov/android-iced-example","commit_stats":null,"previous_names":["ibaryshnikov/android-iced-example"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ibaryshnikov%2Fandroid-iced-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ibaryshnikov%2Fandroid-iced-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ibaryshnikov%2Fandroid-iced-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ibaryshnikov%2Fandroid-iced-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ibaryshnikov","download_url":"https://codeload.github.com/ibaryshnikov/android-iced-example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252762123,"owners_count":21800265,"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","iced","rust","webgpu","wgpu","winit"],"created_at":"2024-11-09T06:40:38.168Z","updated_at":"2025-05-06T20:23:07.133Z","avatar_url":"https://github.com/ibaryshnikov.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Example of building android app with iced\n\nThere are [NativeActivity](./NativeActivity) and [GameActivity](./GameActivity) examples here.\n\nBased on several other examples:\n - `na-mainloop` and `agdk-mainloop` from\n   [android-activity](https://github.com/rust-mobile/android-activity/tree/v0.6.0/examples)\n - [na-winit-wgpu](https://github.com/rust-mobile/rust-android-examples/tree/main/na-winit-wgpu)\n   from `rust-android-examples`\n - [integration](https://github.com/iced-rs/iced/tree/0.13.1/examples/integration)\n   from `iced`\n\n\n## Preview\n\niced integration example\n\n![Pixel first screenshot](pixel_1.png)\n![Pixed second screenshot](pixel_2.png)\n\nYou can also run most of the examples from iced.\nFor this omit the scene rendering part and set the background of the root container.\n\n\n## Watch\n\n![Watch first](watch_1.png)\n![Watch second](watch_2.png)\n![Watch third](watch_3.png)\n\n\n## Text input\n\nText input partially works, unresolved issues:\n- window doesn't resize on show/hide soft keyboard\n- how to change input language of soft keyboard\n- ime is not supported\n\nCopy/paste and show/hide soft keyboard is implemented by calling Java\n\n![Pixel third screenshot](pixel_3.png)\n\n\n## Building and running\n\nCheck `android-activity` crate for detailed instructions.\nDuring my tests I was running the following command and using android studio afterwards:\n\n```bash\nexport ANDROID_NDK_HOME=\"path/to/ndk\"\nexport ANDROID_HOME=\"path/to/sdk\"\n\nrustup target add x86_64-linux-android\ncargo install cargo-ndk\n\ncargo ndk -t x86_64 -o app/src/main/jniLibs/  build\n```\n\n\nMy setup is the following:\n- archlinux 6.9.6\n- jdk-openjdk 22\n- target api 35\n\n\n## How it works\n\nThanks to `android-activity` we can already build android apps in Rust, and\nkey crates such as `winit` and `wgpu` also support building for android.\n`iced` doesn't support android out of the box, but it can be integrated with\nexisting graphics pipelines, as shown in\n[integration](https://github.com/iced-rs/iced/tree/0.13.1/examples/integration) example.\nAs a result, it was possible to convert existing example running `winit` + `wgpu` to\nuse `iced` on top.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fibaryshnikov%2Fandroid-iced-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fibaryshnikov%2Fandroid-iced-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fibaryshnikov%2Fandroid-iced-example/lists"}