pushinbr / pam-native-background-transfer
Durable background uploads and downloads for PAM Native.
Package info
github.com/push-in/pam-native-background-transfer
Language:Kotlin
Type:pam-native-plugin
pkg:composer/pushinbr/pam-native-background-transfer
Requires
- php: ^8.4
- pushinbr/pam-native: ^0.6.1
Requires (Dev)
- pushinbr/pam-native-testing: ^0.1.0
README
Durable uploads and downloads that continue outside the PHP runtime. Android uses WorkManager 2.11.2; iOS uses a launch-event-enabled background URLSession.
composer require pushinbr/pam-native-background-transfer pam mobile codegen pam mobile ios:prepare
$transfers = new Pam\Native\BackgroundTransfer\BackgroundTransfer(); $transfers->download('https://cdn.example.com/movie.mp4', 'media/movie.mp4', function (?string $id, ?string $error): void { // Persist the id and query it after relaunch. });
Transfers require HTTPS. Paths are always resolved inside the application sandbox and traversal is rejected natively. State, kind and network requirements are sequential integer-backed enums. Android retries transient failures up to three times and honors connected, unmetered, or not-roaming constraints.
Platform support: Android API 26+, iOS 15+, PAM Native 0.6.x.