Skip to content

Commit

Permalink
v1.8.1
Browse files Browse the repository at this point in the history
  • Loading branch information
szvone committed Dec 20, 2019
1 parent 78fd3e2 commit d752011
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 15 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ V免签为完全开源项目,开源项目意味着作者没有任何收入来
+ 微信收款商业版店员到账收款通知

## 更新记录
+ v1.8.1(2019.12.20)
+ 修复上个版本无法正常回调问题

+ v1.8(2019.12.03)
+ 修复付款人昵称如果是纯数字,支付完后台订单金额会记录成昵称的数字的问题

Expand Down
Binary file modified app/app-release.apk
Binary file not shown.
2 changes: 1 addition & 1 deletion app/src/main/java/com/vone/vmq/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ protected void onCreate(Bundle savedInstanceState) {
}


Toast.makeText(MainActivity.this, "v免签开源免费免签系统 v1.8", Toast.LENGTH_SHORT).show();
Toast.makeText(MainActivity.this, "v免签开源免费免签系统 v1.8.1", Toast.LENGTH_SHORT).show();


}
Expand Down
40 changes: 26 additions & 14 deletions app/src/main/java/com/vone/vmq/NeNotificationService2.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@
import java.io.IOException;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

Expand Down Expand Up @@ -145,6 +147,13 @@ public void onNotificationPosted(StatusBarNotification sbn) {
if (money!=null){
Log.d(TAG, "onAccessibilityEvent: 匹配成功: 支付宝 到账 " + money);
appPush(2, Double.valueOf(money));
}else {
Handler handlerThree=new Handler(Looper.getMainLooper());
handlerThree.post(new Runnable(){
public void run(){
Toast.makeText(getApplicationContext() ,"监听到支付宝消息但未匹配到金额!",Toast.LENGTH_SHORT).show();
}
});
}
}

Expand All @@ -158,6 +167,13 @@ public void onNotificationPosted(StatusBarNotification sbn) {
if (money!=null){
Log.d(TAG, "onAccessibilityEvent: 匹配成功: 微信到账 "+ money);
appPush(1,Double.valueOf(money));
}else{
Handler handlerThree=new Handler(Looper.getMainLooper());
handlerThree.post(new Runnable(){
public void run(){
Toast.makeText(getApplicationContext() ,"监听到微信消息但未匹配到金额!",Toast.LENGTH_SHORT).show();
}
});
}

}
Expand All @@ -169,7 +185,7 @@ public void onNotificationPosted(StatusBarNotification sbn) {
Handler handlerThree=new Handler(Looper.getMainLooper());
handlerThree.post(new Runnable(){
public void run(){
Toast.makeText(getApplicationContext() ,"监听正常!",Toast.LENGTH_SHORT).show();
Toast.makeText(getApplicationContext() ,"监听正常,如无法正常回调请联系作者反馈!",Toast.LENGTH_SHORT).show();
}
});
}
Expand Down Expand Up @@ -238,20 +254,17 @@ public void onResponse(Call call, Response response) throws IOException {

public static String getMoney(String content){

int index = content.indexOf("]");
if (index!=-1){
content = content.substring(index+1);
List<String> ss = new ArrayList<String>();
for(String sss:content.replaceAll("[^0-9.]", ",").split(",")){
if (sss.length()>0)
ss.add(sss);
}


Pattern p = Pattern.compile("([0-9]\\d*\\.?\\d*)|(0\\.\\d*[0-9])");
Matcher m = p.matcher(content);
boolean result = m.find();
String find_result = null;
if (result) {
find_result = m.group(m.groupCount());
if (ss.size()<1){
return null;
}else {
return ss.get(ss.size()-1);
}
return find_result;

}
public static String md5(String string) {
if (TextUtils.isEmpty(string)) {
Expand All @@ -276,5 +289,4 @@ public static String md5(String string) {
return "";
}


}

0 comments on commit d752011

Please sign in to comment.