Replace the buggy temp file polling mechanism with direct native-to-JS communication via custom Capacitor plugins for iOS and Android. This eliminates race conditions, file management complexity, and polling overhead. BREAKING CHANGE: Removes backward compatibility with temp file approach. Android minSdkVersion upgraded from 22 to 23. Changes: - iOS: Created SharedImagePlugin (CAPBridgedPlugin) and SharedImageUtility - Uses App Group UserDefaults for data sharing between extension and app - Implements getSharedImage() and hasSharedImage() methods - Removes temp file writing/reading logic from AppDelegate - Android: Created SharedImagePlugin with @CapacitorPlugin annotation - Uses SharedPreferences for data storage instead of temp files - Implements same interface as iOS plugin - Removes temp file handling from MainActivity - TypeScript: Added plugin definitions and registration - Created SharedImagePlugin interface and web fallback - Updated main.capacitor.ts to use plugin instead of Filesystem API - Removed pollForFileExistence() and related file I/O code - Android: Upgraded minSdkVersion from 22 to 23 - Required for SharedPreferences improvements and better API support Benefits: - Eliminates race conditions from file polling - Removes file cleanup complexity - Direct native-to-JS communication (no file I/O) - Better performance (no polling overhead) - More reliable data transfer between share extension and app - Cleaner architecture with proper plugin abstraction
16 lines
496 B
Groovy
16 lines
496 B
Groovy
ext {
|
|
minSdkVersion = 23
|
|
compileSdkVersion = 36
|
|
targetSdkVersion = 36
|
|
androidxActivityVersion = '1.8.0'
|
|
androidxAppCompatVersion = '1.6.1'
|
|
androidxCoordinatorLayoutVersion = '1.2.0'
|
|
androidxCoreVersion = '1.12.0'
|
|
androidxFragmentVersion = '1.6.2'
|
|
coreSplashScreenVersion = '1.0.1'
|
|
androidxWebkitVersion = '1.9.0'
|
|
junitVersion = '4.13.2'
|
|
androidxJunitVersion = '1.1.5'
|
|
androidxEspressoCoreVersion = '3.5.1'
|
|
cordovaAndroidVersion = '10.1.1'
|
|
} |