{"id":17210687,"url":"https://github.com/justson/flying-pigeon","last_synced_at":"2025-03-17T11:30:29.145Z","repository":{"id":41455692,"uuid":"271518684","full_name":"Justson/flying-pigeon","owner":"Justson","description":"flying-pigeon 是一个IPC 跨进程通信组件，底层是匿名内存+Binder ， 突破1MB大小限制，无需写AIDL文件，让实现跨进程通信就像写一个接口一样简单","archived":false,"fork":false,"pushed_at":"2021-03-09T06:29:33.000Z","size":414,"stargazers_count":211,"open_issues_count":0,"forks_count":19,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-16T11:11:21.223Z","etag":null,"topics":["aidl","android","anonymous-memory","binder","contentprovider","ipc","service"],"latest_commit_sha":null,"homepage":"https://github.com/Justson/flying-pigeon","language":"Java","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/Justson.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}},"created_at":"2020-06-11T10:34:28.000Z","updated_at":"2025-03-15T22:51:29.000Z","dependencies_parsed_at":"2022-09-21T09:45:49.111Z","dependency_job_id":null,"html_url":"https://github.com/Justson/flying-pigeon","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Justson%2Fflying-pigeon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Justson%2Fflying-pigeon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Justson%2Fflying-pigeon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Justson%2Fflying-pigeon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Justson","download_url":"https://codeload.github.com/Justson/flying-pigeon/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244025168,"owners_count":20385529,"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":["aidl","android","anonymous-memory","binder","contentprovider","ipc","service"],"created_at":"2024-10-15T02:55:02.031Z","updated_at":"2025-03-17T11:30:28.646Z","avatar_url":"https://github.com/Justson.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Flying-Pigeon\nFlying-Pigeon 是一个IPC跨进程通信组件，把跨进程通信简化到极致，并且突破binder 1MB内存大小限制。\n\n## 引入\n\n* Gradle\n\n\n```gradle\nimplementation 'com.github.Justson:flying-pigeon:v1.0.7'\n```\n\n## 方式一\n\n### Server\n\n```java\nprivate Api mApi = new Api() {\n        @Override\n        public int createPoster(Poster poster) {\n            Log.e(TAG, \"poster:\" + GsonUtils.toJson(poster));\n            return 11;\n        }\n    };\n```\n\n#### 对外发布服务\n```java\nServiceManager.getInstance().publish(mApi);\n```\n\n### Client\n``` java\nfinal Pigeon pigeon = Pigeon.newBuilder(this).setAuthority(ServiceApiImpl.class).build();\nApi api = pigeon.create(Api.class);\napi.createPoster(new Poster(\"Justson\", \"just\", 119, 11111000L, (short) 23, 1.15646F, 'h', (byte) 4, 123456.415D));\n```\n\n## 方式二\n\n### Server\n\n```java\n@MainThread\n@route(\"/query/username\")\npublic void queryUsername(final Bundle in, final Bundle out) {\n    ipcLabel.setText(\"received other app message,\\n message:\" + in.getString(\"userid\"));\n    out.putString(\"username\", \"ipc-sample\");\n}\n```\n#### 对外发布服务\n```java\nServiceManager.getInstance().publish(this);\n```\n\n\n### Client\n```java\nPigeon flyPigeon = Pigeon.newBuilder(MainActivity.this).setAuthority(\"com.flyingpigeon.ipc_sample\").build();\nBundle bundle = flyPigeon.route(\"/query/username\").withString(\"userid\", UUID.randomUUID().toString()).fly();\n```\n\n## 混淆\n```\n-keep class com.flyingpigeon.library.*\n-dontwarn com.flyingpigeon.library.*\n```\n\n## 建议\n*  建议App内使用方式一，App与其他App通信使用方式二\n*  返回的类型中，尽可能使用基本数据类型的包装类、如Integer,Double,Long,Short,Float,Byte,Boolean,Character","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjustson%2Fflying-pigeon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjustson%2Fflying-pigeon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjustson%2Fflying-pigeon/lists"}