package com.convenient.android.lib.ui.sample.read

import android.os.Bundle
import androidx.lifecycle.lifecycleScope
import com.convenient.android.common.base.viewbinding.BaseBindingActivity
import com.convenient.android.lib.databinding.ActivityReaderViewBinding
import com.pdf.base.function.openDocument
import kotlinx.coroutines.launch

/**
 * @author: hubowen
 * @date: 2022/9/20
 * @description:
 */
class ReaderViewActivity : BaseBindingActivity<ActivityReaderViewBinding>(ActivityReaderViewBinding::inflate) {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        lifecycleScope.launch {
            this@ReaderViewActivity.openDocument(uri = null, absolutePath = "/storage/emulated/0/17PDF/123.pdf", password = ""){
                success {  }
                fail {  }
                isEncrypt {  }
            }
        }
        readerView
    }
}