All Projects → wangchenyan → Ponyexpress

wangchenyan / Ponyexpress

Android express app use zxing&volley&gson&material design

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Ponyexpress

ZXingSample
Working sample app for a blog post on barcode scanning and generating with ZXing
Stars: ✭ 20 (-92.65%)
Mutual labels:  zxing
qrcode
A flutter plugin for scanning QR codes. Use AVCaptureSession in iOS and zxing in Android.
Stars: ✭ 69 (-74.63%)
Mutual labels:  zxing
Doclever
做最好的接口管理平台
Stars: ✭ 2,849 (+947.43%)
Mutual labels:  express
SCodes
This project is Qt & Qml wrapper for ZXing-C++ Library that is used for decoding 1D and 2D barcodes.
Stars: ✭ 55 (-79.78%)
Mutual labels:  zxing
browser
ZXing for JS's browser layer with decoding implementations for browser.
Stars: ✭ 88 (-67.65%)
Mutual labels:  zxing
Nextjs Redux Starter
Next.js + Redux + styled-components + Express = 😇
Stars: ✭ 257 (-5.51%)
Mutual labels:  express
gift-shop
A gift-shopping app, developed with android 5.0 widgets and transitions.
Stars: ✭ 15 (-94.49%)
Mutual labels:  zxing
Express Mysql Session
A MySQL session store for the express framework in node
Stars: ✭ 268 (-1.47%)
Mutual labels:  express
StarBarcode
一个基于Zxing封装的条形码扫描库。支持多种条形码,可生成、解析带logo的二维码,自动放大镜头,设备移动时自动对焦、连续对焦,扫描UI自定义。
Stars: ✭ 52 (-80.88%)
Mutual labels:  zxing
Home
Project Glimpse: Node Edition - Spend less time debugging and more time developing.
Stars: ✭ 260 (-4.41%)
Mutual labels:  express
WifiBarcodeSample
Sample code for my article in DotNetCurry magazine on scanning barcodes. In this sample you can generate and scan QR codes that contain a Wi-Fi connection string
Stars: ✭ 13 (-95.22%)
Mutual labels:  zxing
ZxingSimplify
一个精简的安卓Zxing扫码库。(A Zxing simplify library for Android)
Stars: ✭ 36 (-86.76%)
Mutual labels:  zxing
Spotify Profile
A web app for visualizing personalized Spotify data built with React, Express, and the Spotify API
Stars: ✭ 254 (-6.62%)
Mutual labels:  express
ZxingSupport
A Library based on Zxing, make you easy to develop 1D/2D barcode-scan App.
Stars: ✭ 15 (-94.49%)
Mutual labels:  zxing
Twreporter React
twreporter site with nodejs
Stars: ✭ 263 (-3.31%)
Mutual labels:  express
UVCCameraZxing
USB串口摄像头识别二维码
Stars: ✭ 82 (-69.85%)
Mutual labels:  zxing
Inventory-Management-System
This is an app for a warehouse management using Bar code Scanner. The database used is Firebase.
Stars: ✭ 41 (-84.93%)
Mutual labels:  zxing
Home Cloud
The "cloud" at home
Stars: ✭ 269 (-1.1%)
Mutual labels:  express
Fullstack App
⚡ Ready-to-use, serverless, full-stack application built with AWS Lambda, Express.js, React, AWS DynamoDB and AWS HTTP API.
Stars: ✭ 265 (-2.57%)
Mutual labels:  express
Vue Express Mongo Boilerplate
⭐ MEVN Full stack JS web app boilerplate with NodeJS, Express, Mongo and VueJS
Stars: ✭ 2,814 (+934.56%)
Mutual labels:  express

小马快递

前言

这是我第一个独立完成的项目,时隔多年又把它拿出来重构了一下代码。

简介

小马快递,您的好帮手。查询并跟踪快递,快递信息及时掌握。
支持全国100多家快递公司,支持扫码查询,智能识别快递公司。
附带生成二维码小工具,方便实用。体积小巧,无广告,无多余权限。

更新说明

v 2.0

  • 全新UI,高仿“支付宝-我的快递”
  • 新增智能识别快递公司
  • 新增扫一扫

v 1.5

  • 新增自动更新

v 1.4

  • 修复无法查询快递的问题
  • 支持Android 6.0
  • 支持运单备注
  • 优化单号扫描界面

下载地址

V2.1

https://github.com/wangchenyan/ponyexpress/releases/download/2.1/ponyexpress-2.1.apk

项目

公开API

  • 快递查询:快递100(非公开,侵权删)

开源技术

关键代码

网络请求Volley + Gson

public static void query(String type, String postId, final HttpCallback<SearchResult> callback) {
    String action = "/query";
    Map<String, String> params = new HashMap<>(2);
    params.put("type", type);
    params.put("postid", postId);
    String url = makeUrl(action, params);
    GsonRequest<SearchResult> request = new GsonRequest<SearchResult>(url, SearchResult.class,
            new Response.Listener<SearchResult>() {
                @Override
                public void onResponse(SearchResult searchResult) {
                    callback.onResponse(searchResult);
                }
            },
            new Response.ErrorListener() {
                @Override
                public void onErrorResponse(VolleyError volleyError) {
                    callback.onError(volleyError);
                }
            }) {
        @Override
        public Map<String, String> getHeaders() throws AuthFailureError {
            Map<String, String> headers = new HashMap<>();
            headers.put(HEADER_REFERER, BASE_URL);
            return headers;
        }
    };
    request.setShouldCache(false);
    getRequestQueue().add(request);
}

封装GsonRequest

public class GsonRequest<T> extends Request<T> {
    private Class<T> mClass;
    private Response.Listener<T> mListener;
    private Gson mGson;

    public GsonRequest(int method, String url, Class<T> clazz, Response.Listener<T> listener, Response.ErrorListener errorListener) {
        super(method, url, errorListener);
        mClass = clazz;
        mListener = listener;
        mGson = new Gson();
    }

    public GsonRequest(String url, Class<T> clazz, Response.Listener<T> listener, Response.ErrorListener errorListener) {
        this(Method.GET, url, clazz, listener, errorListener);
    }

    @Override
    protected Response<T> parseNetworkResponse(NetworkResponse response) {
        String jsonString;
        try {
            jsonString = new String(response.data, HttpHeaderParser.parseCharset(response.headers));
            return Response.success(mGson.fromJson(jsonString, mClass), HttpHeaderParser.parseCacheHeaders(response));
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
            return Response.error(new ParseError(e));
        }
    }

    @Override
    protected void deliverResponse(T response) {
        mListener.onResponse(response);
    }
}

截图

关于作者

掘金:https://juejin.im/user/2313028193754168
微博:https://weibo.com/wangchenyan1993

License

Copyright 2016 wangchenyan

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].