app / com.otago.open / PDFListFragment / PDFService / startService

startService

fun startService(parentFolder: String, url: String, inFragment: PDFListFragment, doFolders: Boolean): Unit

Starts fetching and downloading PDFs. Utilises coroutines to run networking on a separate threads to UI.

Parameters

parentFolder - The folder in which the downloaded content will be stored

url - The URL at which we will look for folders and PDFs etc

inFragment - The instance of PDFListFragment, to call in class functions

doFolders - Whether we want to include folders. Currently this should only be true if paperSubName is "" or "index.php" due to the COSC website navigation structure

See Also

PDFOperations.fetchLinks

PDFOperations.downloadPDF

PDFItem