Replace native Twilio Voice SDK with WebView-based softphone
Rewrites the mobile app from a native Twilio Voice SDK integration (Android Telecom/ConnectionService) to a thin WebView shell that loads a standalone browser phone page from WordPress. This eliminates the buggy Android phone account registration, fixes frequent logouts by using 7-day WP session cookies instead of JWT tokens, and maintains all existing call features (dialpad, queues, hold, transfer, requeue, recording, caller ID, agent status). Server-side: - Add class-twp-mobile-phone-page.php: standalone /twp-phone/ endpoint with mobile-optimized UI, dark mode, tab navigation, and Flutter WebView JS bridge - Extend auth cookie to 7 days for phone agents - Add WP AJAX handler for FCM token registration (cookie auth) Flutter app (v2.0.0): - Replace 18 native files with 5-file WebView shell - Login via wp-login.php in WebView (auto-detect redirect on success) - Full-screen WebView with auto microphone grant for WebRTC - FCM push notifications preserved for queue alerts - Remove: twilio_voice, dio, provider, JWT auth, SSE, native call UI Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
name: twp_softphone
|
||||
description: TWP Softphone - VoIP client for Twilio WordPress Plugin
|
||||
description: TWP Softphone - WebView client for Twilio WordPress Plugin
|
||||
publish_to: 'none'
|
||||
version: 1.0.0+1
|
||||
version: 2.0.0+6
|
||||
|
||||
environment:
|
||||
sdk: ^3.5.0
|
||||
@@ -9,21 +9,17 @@ environment:
|
||||
dependencies:
|
||||
flutter:
|
||||
sdk: flutter
|
||||
twilio_voice: ^0.3.0
|
||||
firebase_core: ^3.0.0
|
||||
firebase_messaging: ^15.0.0
|
||||
dio: ^5.4.0
|
||||
flutter_secure_storage: ^10.0.0
|
||||
provider: ^6.1.0
|
||||
flutter_local_notifications: ^17.0.0
|
||||
json_annotation: ^4.8.0
|
||||
webview_flutter: ^4.10.0
|
||||
webview_flutter_android: ^4.3.0
|
||||
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
sdk: flutter
|
||||
flutter_lints: ^4.0.0
|
||||
build_runner: ^2.4.0
|
||||
json_serializable: ^6.7.0
|
||||
|
||||
flutter:
|
||||
uses-material-design: true
|
||||
|
||||
Reference in New Issue
Block a user