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

Commit

Permalink
DetectNumberService: Create
Browse files Browse the repository at this point in the history
Project: Update support library

Signed-off-by: Fung <[email protected]>
  • Loading branch information
fython committed Jun 20, 2017
1 parent 44cffe4 commit d98a603
Show file tree
Hide file tree
Showing 17 changed files with 539 additions and 48 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ A Material Design Shipment Tracker Android App.

### 开发环境需求

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

### 应用安装需求
Expand All @@ -28,16 +28,16 @@ Fung Go (fython) Email: [email protected]

联系 QQ: 2850029060

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

博客地址: http://blog.feng.moe
博客地址: https://feng.moe

### License

```
GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007
Copyright (C) 2016 Fung Go
Copyright (C) 2016-2017 Fung Go
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it under certain conditions.
9 changes: 4 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
ext.android_support_lib_version = '26.0.0-beta2'
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.3'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

Expand All @@ -18,6 +14,9 @@ allprojects {
maven {
url "https://jitpack.io"
}
maven {
url "https://maven.google.com"
}
}
}

Expand Down
23 changes: 4 additions & 19 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,21 +1,6 @@
## Project-wide Gradle settings.
#
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
#
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
# Default value: -Xmx1024m -XX:MaxPermSize=256m
# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
#
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
#Wed Dec 28 20:18:09 CST 2016
org.gradle.jvmargs=-Xmx1536m
BUILD_TOOLS_VERSION=25.0.2
VERSION_NAME=2.5.1
TARGET_SDK_VERSION=25
VERSION_CODE=34
BUILD_TOOLS_VERSION=26.0.0
VERSION_NAME=2.6.0
TARGET_SDK_VERSION=26
VERSION_CODE=35
MIN_SDK_VERSION=19
10 changes: 5 additions & 5 deletions mobile/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ dependencies {
compile project(':libraries:AdvancedRecyclerView')
compile project(':libraries:StatusBarCompat')
compile project(':bottom-bar-1.4.0.1')
compile 'com.android.support:appcompat-v7:25.1.0'
compile 'com.android.support:cardview-v7:25.1.0'
compile 'com.android.support:design:25.1.0'
compile 'com.android.support:support-v13:25.1.0'
compile 'com.android.support:customtabs:25.1.0'
compile "com.android.support:appcompat-v7:$android_support_lib_version"
compile "com.android.support:cardview-v7:$android_support_lib_version"
compile "com.android.support:recyclerview-v7:$android_support_lib_version"
compile "com.android.support:design:$android_support_lib_version"
compile "com.android.support:customtabs:$android_support_lib_version"
compile 'com.google.code.gson:gson:2.8.0'
compile 'com.squareup.okhttp3:okhttp:3.6.0'
compile 'com.rengwuxian.materialedittext:library:2.1.4'
Expand Down
8 changes: 8 additions & 0 deletions mobile/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,14 @@
<service android:name="info.papdt.express.helper.services.ReminderService"/>
<service android:name="info.papdt.express.helper.services.AppWidgetService"
android:permission="android.permission.BIND_REMOTEVIEWS"/>
<service android:name="info.papdt.express.helper.services.DetectNumberService"
android:permission="android.permission.BIND_ACCESSIBILITY_SERVICE"
android:label="@string/label_detect_service">
<intent-filter>
<action android:name="android.accessibilityservice.AccessibilityService"/>
</intent-filter>
<meta-data android:name="android.accessibilityservice" android:resource="@xml/service_detect_number"/>
</service>

<receiver android:name="info.papdt.express.helper.receiver.ConnectivityReceiver">
<intent-filter>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,16 @@ public class CompanyFilterTask extends AsyncTask<String, Void, ArrayList<Package

@Override
protected ArrayList<PackageApi.CompanyInfo.Company> doInBackground(String... strings) {
String keyword = ZHConverter.convert(strings[0], ZHConverter.SIMPLIFIED);
return doSync(strings[0]);
}

public static ArrayList<PackageApi.CompanyInfo.Company> doSync(String keyword) {
keyword = ZHConverter.convert(keyword, ZHConverter.SIMPLIFIED).replaceAll("快递", "");
ArrayList<PackageApi.CompanyInfo.Company> src = new ArrayList<>();
if (keyword != null && keyword.trim().length() > 0) {
for (int i = 0; i < PackageApi.CompanyInfo.info.size(); i++) {
if (!PackageApi.CompanyInfo.names [i].toLowerCase().contains(keyword.toLowerCase()) && !PackageApi.CompanyInfo.pinyin [i].contains(keyword)) {
if (!PackageApi.CompanyInfo.names [i].toLowerCase().contains(keyword.toLowerCase())
&& !PackageApi.CompanyInfo.pinyin[i].contains(keyword)) {
continue;
}

Expand Down
Loading

0 comments on commit d98a603

Please sign in to comment.