Skip to content
This repository was archived by the owner on Jun 8, 2024. It is now read-only.

Commit d98a603

Browse files
committed
DetectNumberService: Create
Project: Update support library Signed-off-by: Fung <fython@163.com>
1 parent 44cffe4 commit d98a603

17 files changed

Lines changed: 539 additions & 48 deletions

File tree

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ A Material Design Shipment Tracker Android App.
1111

1212
### 开发环境需求
1313

14-
- Android SDK Platform 24
15-
- Android Support Library 24.0.0
16-
- Gradle + Android Studio 2.2 Preview1
14+
- Android SDK Platform 26
15+
- Android Support Library 26.0.0
16+
- Gradle + Android Studio 2.3 / IntelliJ IDEA 2017.1
1717
- Windows / Linux / Mac
1818

1919
### 应用安装需求
@@ -28,16 +28,16 @@ Fung Go (fython) Email: fython@163.com
2828

2929
联系 QQ: 2850029060
3030

31-
捐赠支持(支付宝): 316643843@qq.com
31+
捐赠支持(支付宝): fythonx@gmail.com
3232

33-
博客地址: http://blog.feng.moe
33+
博客地址: https://feng.moe
3434

3535
### License
3636

3737
```
3838
GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007
3939
40-
Copyright (C) 2016 Fung Go
40+
Copyright (C) 2016-2017 Fung Go
4141
4242
This program comes with ABSOLUTELY NO WARRANTY.
4343
This is free software, and you are welcome to redistribute it under certain conditions.

build.gradle

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
1-
// Top-level build file where you can add configuration options common to all sub-projects/modules.
2-
31
buildscript {
2+
ext.android_support_lib_version = '26.0.0-beta2'
43
repositories {
54
jcenter()
65
}
76
dependencies {
87
classpath 'com.android.tools.build:gradle:2.2.3'
9-
10-
// NOTE: Do not place your application dependencies here; they belong
11-
// in the individual module build.gradle files
128
}
139
}
1410

@@ -18,6 +14,9 @@ allprojects {
1814
maven {
1915
url "https://jitpack.io"
2016
}
17+
maven {
18+
url "https://maven.google.com"
19+
}
2120
}
2221
}
2322

gradle.properties

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,6 @@
1-
## Project-wide Gradle settings.
2-
#
3-
# For more details on how to configure your build environment visit
4-
# http://www.gradle.org/docs/current/userguide/build_environment.html
5-
#
6-
# Specifies the JVM arguments used for the daemon process.
7-
# The setting is particularly useful for tweaking memory settings.
8-
# Default value: -Xmx1024m -XX:MaxPermSize=256m
9-
# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
10-
#
11-
# When configured, Gradle will run in incubating parallel mode.
12-
# This option should only be used with decoupled projects. More details, visit
13-
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
14-
# org.gradle.parallel=true
15-
#Wed Dec 28 20:18:09 CST 2016
161
org.gradle.jvmargs=-Xmx1536m
17-
BUILD_TOOLS_VERSION=25.0.2
18-
VERSION_NAME=2.5.1
19-
TARGET_SDK_VERSION=25
20-
VERSION_CODE=34
2+
BUILD_TOOLS_VERSION=26.0.0
3+
VERSION_NAME=2.6.0
4+
TARGET_SDK_VERSION=26
5+
VERSION_CODE=35
216
MIN_SDK_VERSION=19

mobile/build.gradle

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ dependencies {
2828
compile project(':libraries:AdvancedRecyclerView')
2929
compile project(':libraries:StatusBarCompat')
3030
compile project(':bottom-bar-1.4.0.1')
31-
compile 'com.android.support:appcompat-v7:25.1.0'
32-
compile 'com.android.support:cardview-v7:25.1.0'
33-
compile 'com.android.support:design:25.1.0'
34-
compile 'com.android.support:support-v13:25.1.0'
35-
compile 'com.android.support:customtabs:25.1.0'
31+
compile "com.android.support:appcompat-v7:$android_support_lib_version"
32+
compile "com.android.support:cardview-v7:$android_support_lib_version"
33+
compile "com.android.support:recyclerview-v7:$android_support_lib_version"
34+
compile "com.android.support:design:$android_support_lib_version"
35+
compile "com.android.support:customtabs:$android_support_lib_version"
3636
compile 'com.google.code.gson:gson:2.8.0'
3737
compile 'com.squareup.okhttp3:okhttp:3.6.0'
3838
compile 'com.rengwuxian.materialedittext:library:2.1.4'

mobile/src/main/AndroidManifest.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,14 @@
109109
<service android:name="info.papdt.express.helper.services.ReminderService"/>
110110
<service android:name="info.papdt.express.helper.services.AppWidgetService"
111111
android:permission="android.permission.BIND_REMOTEVIEWS"/>
112+
<service android:name="info.papdt.express.helper.services.DetectNumberService"
113+
android:permission="android.permission.BIND_ACCESSIBILITY_SERVICE"
114+
android:label="@string/label_detect_service">
115+
<intent-filter>
116+
<action android:name="android.accessibilityservice.AccessibilityService"/>
117+
</intent-filter>
118+
<meta-data android:name="android.accessibilityservice" android:resource="@xml/service_detect_number"/>
119+
</service>
112120

113121
<receiver android:name="info.papdt.express.helper.receiver.ConnectivityReceiver">
114122
<intent-filter>

mobile/src/main/java/info/papdt/express/helper/asynctask/CompanyFilterTask.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,16 @@ public class CompanyFilterTask extends AsyncTask<String, Void, ArrayList<Package
1212

1313
@Override
1414
protected ArrayList<PackageApi.CompanyInfo.Company> doInBackground(String... strings) {
15-
String keyword = ZHConverter.convert(strings[0], ZHConverter.SIMPLIFIED);
15+
return doSync(strings[0]);
16+
}
17+
18+
public static ArrayList<PackageApi.CompanyInfo.Company> doSync(String keyword) {
19+
keyword = ZHConverter.convert(keyword, ZHConverter.SIMPLIFIED).replaceAll("快递", "");
1620
ArrayList<PackageApi.CompanyInfo.Company> src = new ArrayList<>();
1721
if (keyword != null && keyword.trim().length() > 0) {
1822
for (int i = 0; i < PackageApi.CompanyInfo.info.size(); i++) {
19-
if (!PackageApi.CompanyInfo.names [i].toLowerCase().contains(keyword.toLowerCase()) && !PackageApi.CompanyInfo.pinyin [i].contains(keyword)) {
23+
if (!PackageApi.CompanyInfo.names [i].toLowerCase().contains(keyword.toLowerCase())
24+
&& !PackageApi.CompanyInfo.pinyin[i].contains(keyword)) {
2025
continue;
2126
}
2227

0 commit comments

Comments
 (0)