{"id":17982409,"url":"https://github.com/nekocode/meepo","last_synced_at":"2025-04-10T02:23:31.932Z","repository":{"id":98385570,"uuid":"88624763","full_name":"nekocode/Meepo","owner":"nekocode","description":"A router generator on android, similar to retrofit.","archived":false,"fork":false,"pushed_at":"2019-02-06T04:55:13.000Z","size":248,"stargazers_count":315,"open_issues_count":2,"forks_count":22,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-04-03T00:05:07.341Z","etag":null,"topics":["android"],"latest_commit_sha":null,"homepage":"","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/nekocode.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}},"created_at":"2017-04-18T12:53:11.000Z","updated_at":"2025-04-01T06:26:24.000Z","dependencies_parsed_at":"2023-03-09T00:15:26.704Z","dependency_job_id":null,"html_url":"https://github.com/nekocode/Meepo","commit_stats":null,"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nekocode%2FMeepo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nekocode%2FMeepo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nekocode%2FMeepo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nekocode%2FMeepo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nekocode","download_url":"https://codeload.github.com/nekocode/Meepo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248143373,"owners_count":21054764,"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"],"created_at":"2024-10-29T18:14:11.008Z","updated_at":"2025-04-10T02:23:31.907Z","avatar_url":"https://github.com/nekocode.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Meepo\n[![Build Status](https://travis-ci.com/nekocode/Meepo.svg?branch=master)](https://travis-ci.com/nekocode/Meepo) [![codecov](https://codecov.io/gh/nekocode/Meepo/branch/master/graph/badge.svg)](https://codecov.io/gh/nekocode/Meepo)\n\nMeepo is a router generator for android, similar to **[retrofit](https://github.com/square/retrofit)**. You can use it to create routers for Activities, Fragments and even any things.\n\n\n### Integration\n\nReplace the `${last-version}` in below code to number [![Release](https://jitpack.io/v/nekocode/Meepo.svg)](https://jitpack.io/#nekocode/Meepo) .\n\n```gradle\nrepositories {\n    maven { url \"https://jitpack.io\" }\n}\ndependencies {\n    implementation \"com.github.nekocode:Meepo:${last-version}\"\n}\n```\n\n\n## Usage\n\nFirstly, declare a router interface:\n\n```java\npublic interface Router {\n    @Path(\"user/{user_id}/detail\")\n    @RequestCode(1)\n    boolean gotoUserDetail(Context context, @PathParam(\"user_id\") String userId, \n                           @QueryParam(\"show_title\") boolean showTitle);\n\n    @Clazz(StoreActivity.class)\n    @Flags(Intent.FLAG_ACTIVITY_SINGLE_TOP)\n    void gotoB(Context context, @BundleParam(\"title\") String title,\n               @RequestCodeParam int requestCode);\n}\n```\n\nIf you want to open your Activity via URI, you need to add a uri intent filter to the corresponding `\u003cactivity\u003e` element in the manifest file:\n\n```xml\n\u003cactivity android:name=\".UserDetailActivity\"\u003e\n    \u003cintent-filter\u003e\n        \u003caction android:name=\"android.intent.action.VIEW\"/\u003e\n        \u003ccategory android:name=\"android.intent.category.DEFAULT\"/\u003e\n\n        \u003cdata\n            android:host=\"meepo.com\"\n            android:pathPattern=\"/user/.*/detail\"\n            android:scheme=\"meepo\"/\u003e\n    \u003c/intent-filter\u003e\n\u003c/activity\u003e\n```\n\nAnd then obtain an implementation of your router interface:\n\n```java\nfinal Meepo meepo = new Meepo.Builder()\n        .config(new UriConfig().scheme(\"meepo\").host(\"meepo.com\"))\n        .build();\n\nfinal Router router = meepo.create(Router.class);\n```\n\nNow, you can invoke the router's navigation methods:\n\n```java\nboolean isSucess = router.gotoUserDetail(this, \"123\", true);\n```\n\n\n## Router Annotation\n\nThis library currently provides the following annotations:\n\n| Method Annotation | Description |\n| :----- | :------ |\n| `@Clazz` | Class of target Activity  |\n| `@ClazzName` | Class name of target Activity |\n| `@Path` | URI path and mime type of target Activity |\n| `@Action` | Action of Intent |\n| `@Flags` | Flags of Intent |\n| `@RequestCode` | Request code of Intent |\n\n| Parameter Annotation | Description |\n| :----- | :------ |\n| `@BundleParam` | Parameter that will be put into the extra of Intent |\n| `@PathParam` | Parameter that will be used to replace the URI path's corresponding replacement block |\n| `@QueryParam` | Query parameter of the URI |\n| `@QueryMapParam` | Map of Query parameters |\n| `@RequestCodeParam` | Request code of Intent |\n\n\n## Custom Parser and CallAdapter\n\nYou can create custom Parser and CallAdapter. You can reference the **[sample](sample/src/main/java/cn/nekocode/meepo/sample/custom)** module. It means that you can create router for anything.\n\n```java\nfinal ModuleRouter moduleRouter = new Meepo.Builder()\n        .config(new ModuleConfig(\"TEST\"))\n        .parser(new ModuleParser())\n        .adapter(new ModuleCallAdapter())\n        .build()\n        .create(ModuleRouter.class);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnekocode%2Fmeepo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnekocode%2Fmeepo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnekocode%2Fmeepo/lists"}