uplink 1.0.0
uplink: ^1.0.0 copied to clipboard
An unstoppable, high-performance background media upload engine with swipe-kill resilience, hardware locks, and auto-retry sync.
π UpLink
The Unstoppable, Enterprise-Grade Background Media Uploader for Flutter
UpLink is a premium, hardware-optimized background media upload engine. Unlike standard uploaders that fail the second an app is swiped away, UpLink is engineered natively to stay alive under any circumstanceβsurviving OS termination, screen sleep, and aggressive Chinese OEM task-killers.
Built natively using START_STICKY Foreground Services (Android) and Background URLSessions (iOS), anchored by a thread-safe shared SQLite synchronization engine.
π Table of Contents #
- π₯ Core Features
- π¦ Installation & Setup
- π οΈ Complete API Guide
- π Status Definitions
- π€ Author & Legal
π₯ Core Features #
| Feature | Engineering Mechanism | Benefit |
|---|---|---|
| π‘οΈ Swipe-Kill Shield | START_STICKY Native Lifecycle |
Automatically resurrects processing if app is swiped away |
| β‘ Hardware WakeLock | CPU PARTIAL_WAKE_LOCK |
Prevents CPU deep sleep, preserving 100% transfer rates |
| π‘ Wifi High-Perf | WIFI_MODE_FULL_HIGH_PERF |
Bypass background bandwidth limits for fiber throughput |
| π Auto-Healing | 3-Phase Exponential Backoff | Automatically heals network drops (retries: 3s, 6s, 12s) |
| πΎ Out-of-Band Sync | Native C-Level SQLite binds | Crash-proof history tracking even when Dart VM is dead |
π¦ Installation & Setup #
1. Import Dependency #
Add UpLink to your projectβs pubspec.yaml:
dependencies:
uplink:
path: /path/to/uplink # Reference to your local package folder
Android Configuration #
Important
Modern Android systems (13+) require explicit declarations for Foreground Services.
Add these permissions and service tags to your android/app/src/main/AndroidManifest.xml:
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Hardware and Background Permissions -->
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_DATA_SYNC" />
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<application>
<!-- UpLink High-Priority Sticky Execution Engine -->
<service
android:name="com.anit.uplink.UploadService"
android:foregroundServiceType="dataSync"
android:exported="false" />
</application>
</manifest>
iOS Configuration #
Enable background streaming via Xcode:
- Open Xcode -> Select Runner target.
- Navigate to Signing & Capabilities -> Click + Capability.
- Add Background Modes and enable:
Background fetchBackground processing
π οΈ Complete API Guide #
π Prompt Permissions (Android 13+) #
Request user authorization for standard background notification system:
import 'package:uplink/uplink.dart';
@override
void initState() {
super.initState();
// Prompts the OS dialog for notification delivery permissions
UpLink.requestNotificationPermission();
}
π₯ Enqueue High-Speed Upload #
Directly push media files into the secure native processing queue:
final String taskId = await UpLink.enqueue(
url: "https://your-secure-api.com/endpoint",
filePath: "/storage/emulated/0/DCIM/Camera/large_video.mp4",
headers: {
"Authorization": "Bearer YOUR_JWT_TOKEN",
"Accept": "application/json",
},
);
π‘ Live Streaming Listener #
Bind interactive widgets directly to real-time network progress feedback:
StreamBuilder<UploadProgressEvent>(
stream: UpLink.onProgress,
builder: (context, snapshot) {
if (snapshot.hasData) {
final event = snapshot.data!;
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text("Task ID: ${event.id}"),
LinearProgressIndicator(value: event.progress / 100.0),
Text("Status: ${event.status} (${event.progress}%)"),
],
);
}
return const Text("No active background processes.");
},
)
π Inspect Persistent Log Archive #
Access standard historical databases securely synced directly via device storage:
// Retrieve complete localized history
List<UploadTask> logArchive = await UpLink.getAllTasks();
for (var record in logArchive) {
print("File: ${record.filePath} -> ${record.status.name}");
}
// Remove specific record from log
await UpLink.deleteTask(taskId);
π Status Definitions #
| Status Indicator | Runtime Context Description |
|---|---|
enqueued |
Buffered safely inside localized SQLite queues, awaiting native thread lock. |
running |
Streaming bytes over secure sockets with hardware locks engaged. |
completed |
Server accepted full content payload with standard 2xx success code. |
failed |
Transmission halted after 3 sequential exponential retry exhaustion attempts. |
π€ Author #
Developed and maintained with β€οΈ by Anit Pal.
π License #
This software is licensed under the MIT License. You are permitted to integrate, modify, and deploy this system within any proprietary high-scale commercial solutions.
Copyright (c) 2026 Anit Pal. All rights reserved.