Skip to content

Chinese OTP detection and OTP tags#125

Open
ADAIBLOG wants to merge 21 commits intoPVOT-OSS:masterfrom
ADAIBLOG:master
Open

Chinese OTP detection and OTP tags#125
ADAIBLOG wants to merge 21 commits intoPVOT-OSS:masterfrom
ADAIBLOG:master

Conversation

@ADAIBLOG
Copy link
Copy Markdown
Contributor

541065109-b47343dd-8205-490d-a7a1-727b19c548b0
541065134-73f07483-d95c-42ba-b998-004e53aa7709
541067111-77610325-dd6c-401a-a86e-f07e86f40232

@danascape
Copy link
Copy Markdown
Member

@bluejeans117 need to rebase for the code to be modular for other locales as well, and then merge this

@ADAIBLOG
Copy link
Copy Markdown
Contributor Author

New Feature: Parcel Pickup Code Recognition

What's Changed:

  1. Added support for recognizing parcel pickup codes from major domestic and international courier companies
  2. Now detects both English and Chinese pickup code patterns
  3. Introduced isParcel field in OtpDetectionResult to distinguish between OTP codes and pickup codes

Important Note:

Since I don't have personal experience with international courier services, the recognition logic for international carriers (Amazon, Royal Mail, UPS, DHL, FedEx, etc.) might not be 100% accurate. Please use this as a reference and adjust as needed based on real-world usage.

@danascape
Copy link
Copy Markdown
Member

@ADAIBLOG I will have to rebase your changes after implementing #126 I will add your changes inline with the feature, since the code is already a mess when I wrote it initially, it will take some time before 1.0.8

@ADAIBLOG
Copy link
Copy Markdown
Contributor Author

  1. Pickup code detection logic separation :
  • Removed pickup code detection logic from OtpDetector.kt
  • Created ParcelDetector.kt file, implementing pickup code detection logic based on the parcel-main project
  • Simplified the detection logic, removing custom rules and ignore keywords functionality
  1. UI integration :
  • Added parcelTag UI element in conversation_list_item.xml
  • Modified ConversationsAdapter.kt to integrate pickup code detection and display functionality
  1. Multi-language support :
  • Added English pickup code tag in strings.xml
  • Added Chinese pickup code tag in values-zh-rCN/strings.xml
  • Updated ConversationsAdapter.kt to use the system's default string resource mechanism

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants