这是一款超轻巧的查询快递的app,仅1M。
支持包含申通、中通、圆通、EMS等热门物流公司在内的全国近多家公司,支持扫码查询,智能识别快递公司。
- ZXing、Volley、ormlite、Gson、Glide
- 快递查询:阿里云API服务
public static void query(String type, String postId, final HttpCallback<SearchResult> callback) {
String appcode = "***";
String action = "http://kuaidi100.market.alicloudapi.com/getExpress";
Map<String, String> params = new HashMap<>(2);
params.put("NO", postId);
params.put("TYPE", type);
String url = makeUrli(action, params);
GsonRequest<SearchResult> request = new GsonRequest<SearchResult>(url, SearchResult.class,
searchResult -> callback.onResponse(searchResult),
volleyError -> callback.onError(volleyError)) {
@Override
public Map<String, String> getHeaders() {
Map<String, String> headers = new HashMap<>();
headers.put("Authorization", "APPCODE " + appcode);
return headers;
}
};
博客:jiguankai.cn
邮箱:[email protected]
Copyright (C) 2019 OldJii
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.