I'm using the below code to open an URL. Downloading a PDF from React native webview after opening on Android gives:

> 
> "invaild pdf format or corrupted"
> 
> 
> 

but it works fine on iOS.

```
<WebView
        renderToHardwareTextureAndroid={true}
        startInLoadingState={isLoading}
        renderLoading={() => {
          return <BarIndicator color="blue" />;
        }}
        mediaPlaybackRequiresUserAction={false}
        javaScriptEnabled={true}
        source={{
          uri: webviewUrl,
          headers: webviewHeaders,
        }}
        style={drawerWebviewStyles.container}
      />

```
['https://Stackoverflow.com/questions/69084365', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/16477546/']
If you want full control over subscriptions, you can create a custom `Publisher` and `Subscription`.

`Publisher`'s `func receive<S: Subscriber>(subscriber: S)` method is the one that gets called when the publisher receives a new subscriber.

If you simply want to make a network request when this happens, you just need to create a custom `Publisher` and return a `Future` that wraps the network request from this method.

In general, you should use `Future` for one-off async events, `PassthroughSubject` is not the ideal `Publisher` to use for network requests.
You can handle publisher events and inject side effect to track subscriptions, like

```
class LoginService {
static func generateLoginPublisher(onSubscription: @escaping (Subscription) -> Void) -> AnyPublisher<Client, NetworkError> {
    return PassthroughSubject<Client, NetworkError>()
        .handleEvents(receiveSubscription: onSubscription, receiveOutput: nil, receiveCompletion: nil, receiveCancel: nil, receiveRequest: nil)
        .eraseToAnyPublisher()
    }
}

```

so

```
loginPublisher = LoginService.generateLoginPublisher() { subscription in
   // do anything needed here when on new subscription appeared
}

```