{"id":25046010,"url":"https://github.com/wangchenyan/ponyexpress","last_synced_at":"2025-04-06T18:17:59.851Z","repository":{"id":98875519,"uuid":"39244177","full_name":"wangchenyan/ponyexpress","owner":"wangchenyan","description":"Android express app use zxing\u0026volley\u0026gson\u0026material design","archived":false,"fork":false,"pushed_at":"2022-01-24T02:34:05.000Z","size":10064,"stargazers_count":275,"open_issues_count":0,"forks_count":119,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-03-30T17:09:54.471Z","etag":null,"topics":["android","express","volley","zxing"],"latest_commit_sha":null,"homepage":"https://juejin.im/post/6844903759059894280","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wangchenyan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2015-07-17T08:43:26.000Z","updated_at":"2025-03-23T07:09:39.000Z","dependencies_parsed_at":"2023-07-20T19:31:57.808Z","dependency_job_id":null,"html_url":"https://github.com/wangchenyan/ponyexpress","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wangchenyan%2Fponyexpress","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wangchenyan%2Fponyexpress/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wangchenyan%2Fponyexpress/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wangchenyan%2Fponyexpress/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wangchenyan","download_url":"https://codeload.github.com/wangchenyan/ponyexpress/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247526770,"owners_count":20953143,"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","express","volley","zxing"],"created_at":"2025-02-06T06:34:12.212Z","updated_at":"2025-04-06T18:17:59.829Z","avatar_url":"https://github.com/wangchenyan.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 小马快递\n![](https://raw.githubusercontent.com/wangchenyan/ponyexpress/master/app/src/main/res/drawable-xxhdpi/ic_launcher.png)\n\n## 前言\n这是我第一个独立完成的项目，时隔多年又把它拿出来重构了一下代码。\n\n- 项目地址：https://github.com/wangchenyan/ponyexpress\n- 有问题请提Issues\n- 如果喜欢，欢迎Star！\n\n## 简介\n小马快递，您的好帮手。查询并跟踪快递，快递信息及时掌握。\u003cbr\u003e\n支持全国100多家快递公司，支持扫码查询，智能识别快递公司。\u003cbr\u003e\n附带生成二维码小工具，方便实用。体积小巧，无广告，无多余权限。\n\n## 更新说明\n`v 2.0`\n- 全新UI，高仿“支付宝-我的快递”\n- 新增智能识别快递公司\n- 新增扫一扫\n\n`v 1.5`\n- 新增自动更新\n\n`v 1.4`\n- 修复无法查询快递的问题\n- 支持Android 6.0\n- 支持运单备注\n- 优化单号扫描界面\n\n## 下载地址\n[点击下载](https://github.com/wangchenyan/ponyexpress/releases)\n\n## 项目\n### 公开API\n- 快递查询：[快递100](http://www.kuaidi100.com/)（非公开，侵权删）\n\n### 开源技术\n- [ZXing](https://github.com/zxing/zxing)\n- [Volley](https://developer.android.com/training/volley/index.html)\n- [Gson](https://github.com/google/gson)\n- [ormlite](https://github.com/j256/ormlite-android)\n- [Glide](https://github.com/bumptech/glide)\n\n### 关键代码\n网络请求`Volley + Gson`\n```\npublic static void query(String type, String postId, final HttpCallback\u003cSearchResult\u003e callback) {\n    String action = \"/query\";\n    Map\u003cString, String\u003e params = new HashMap\u003c\u003e(2);\n    params.put(\"type\", type);\n    params.put(\"postid\", postId);\n    String url = makeUrl(action, params);\n    GsonRequest\u003cSearchResult\u003e request = new GsonRequest\u003cSearchResult\u003e(url, SearchResult.class,\n            new Response.Listener\u003cSearchResult\u003e() {\n                @Override\n                public void onResponse(SearchResult searchResult) {\n                    callback.onResponse(searchResult);\n                }\n            },\n            new Response.ErrorListener() {\n                @Override\n                public void onErrorResponse(VolleyError volleyError) {\n                    callback.onError(volleyError);\n                }\n            }) {\n        @Override\n        public Map\u003cString, String\u003e getHeaders() throws AuthFailureError {\n            Map\u003cString, String\u003e headers = new HashMap\u003c\u003e();\n            headers.put(HEADER_REFERER, BASE_URL);\n            return headers;\n        }\n    };\n    request.setShouldCache(false);\n    getRequestQueue().add(request);\n}\n```\n封装GsonRequest\n```java\npublic class GsonRequest\u003cT\u003e extends Request\u003cT\u003e {\n    private Class\u003cT\u003e mClass;\n    private Response.Listener\u003cT\u003e mListener;\n    private Gson mGson;\n\n    public GsonRequest(int method, String url, Class\u003cT\u003e clazz, Response.Listener\u003cT\u003e listener, Response.ErrorListener errorListener) {\n        super(method, url, errorListener);\n        mClass = clazz;\n        mListener = listener;\n        mGson = new Gson();\n    }\n\n    public GsonRequest(String url, Class\u003cT\u003e clazz, Response.Listener\u003cT\u003e listener, Response.ErrorListener errorListener) {\n        this(Method.GET, url, clazz, listener, errorListener);\n    }\n\n    @Override\n    protected Response\u003cT\u003e parseNetworkResponse(NetworkResponse response) {\n        String jsonString;\n        try {\n            jsonString = new String(response.data, HttpHeaderParser.parseCharset(response.headers));\n            return Response.success(mGson.fromJson(jsonString, mClass), HttpHeaderParser.parseCacheHeaders(response));\n        } catch (UnsupportedEncodingException e) {\n            e.printStackTrace();\n            return Response.error(new ParseError(e));\n        }\n    }\n\n    @Override\n    protected void deliverResponse(T response) {\n        mListener.onResponse(response);\n    }\n}\n```\n\n## 截图\n![](https://raw.githubusercontent.com/wangchenyan/ponyexpress/master/art/screenshot_01.jpg)\n![](https://raw.githubusercontent.com/wangchenyan/ponyexpress/master/art/screenshot_02.jpg)\n![](https://raw.githubusercontent.com/wangchenyan/ponyexpress/master/art/screenshot_03.jpg)\n![](https://raw.githubusercontent.com/wangchenyan/ponyexpress/master/art/screenshot_04.jpg)\n![](https://raw.githubusercontent.com/wangchenyan/ponyexpress/master/art/screenshot_05.jpg)\n\n## 关于作者\n掘金：https://juejin.im/user/2313028193754168\u003cbr\u003e\n微博：https://weibo.com/wangchenyan1993\n\n## License\n\n    Copyright 2016 wangchenyan\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","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwangchenyan%2Fponyexpress","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwangchenyan%2Fponyexpress","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwangchenyan%2Fponyexpress/lists"}