Download pdf file inside WebView using AdvancedWebview : I'm struggling a lot on getting to download files inside an webView when link is clicked within it. I searched many forums and mostly they work when I run application in Bluestacks emulater but when I installed it in device, only Downloading file appears and nothing happens after that.

Then I came across Advancced webView but I have no clue what to write inside if and else statement to get what I desires 

Here is the code from library to initiate download

    public void onDownloadRequested(String url, String suggestedFilename, String mimeType, long contentLength, String contentDisposition, String userAgent) {
    // some file is available for download
    // either handle the download yourself or use the code below

    if (AdvancedWebView.handleDownload(this, url, suggestedFilename)) {
        // download successfully handled
    }
    else {
        // download couldn't be handled because user has disabled download manager app on the device
        // TODO show some notice to the user
    }
}

and my manifest file is

    <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.faraksoch.sagar.eroutine">

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

    <application
        android:allowBackup="true"
        android:icon="@mipmap/icon"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/icon"
        android:supportsRtl="true"
        android:theme="@style/Theme.AppCompat.NoActionBar">
        <activity
            android:name=".MainActivity"
            android:configChanges="orientation"
            android:screenOrientation="portrait"
            android:theme="@style/AppTheme.TransNav">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />


                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
            android:name=".UpdateDialog"
            android:theme="@style/Theme.AppCompat.Dialog" />

        <service android:name=".MyFirebaseMessagingService">
            <intent-filter>
                <action android:name="com.google.firebase.MESSAGING_EVENT" />
            </intent-filter>
        </service>
        <service android:name=".MyFirebaseInstanceIDService">
            <intent-filter>
                <action android:name="com.google.firebase.INSTANCE_ID_EVENT" />
            </intent-filter>
        </service>
        <service
            android:name=".UpdateService"
            android:enabled="true"
            android:exported="true" />

    </application>

</manifest>


Any help would be largely appreciated. And for the records , Download link are generated from Google drive

and my main activity file is 


    public class MainActivity extends AppCompatActivity {

  
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
     final WebView webView = (WebView) findViewById(webView);
    webView.loadUrl("file:///android_asset/C.html");
        


