//sorisdk/com.iplateia.sorisdk/PendingRequestManager/processPendingRequests
processPendingRequests
[androidJvm]
fun processPendingRequests(scope: CoroutineScope, onResult: (String, SORICampaign?) -> Unit)
Processes all pending requests in the queue.
This method should be called when network connectivity is restored. It will:
- Filter out expired requests (older than
maxPendingTimeMillis
) - Attempt to retry each valid request using the API client
- Re-queue requests that fail again for future retry
- Invoke the callback for each processed request with the result
The processing happens asynchronously on the IO dispatcher to avoid blocking the main thread. The callback is invoked on the Main dispatcher.
Parameters
androidJvm
scope | The coroutine scope to use for async processing |
onResult | Callback invoked for each processed request with materialId and resulting campaign (null if failed) |
See also
SORIConfig.maxPendingTimeMillis |
SORIConfig.enableDelayedSending |