嗨,我的网站有一个简单的Kotlin Webview应用程序 我的网站有推送通知,其适用于Windows的chrome和适用于Android的chrome 但在我的应用中说不支持 这是图片
class MainActivity : AppCompatActivity(), NavigationView.OnNavigationItemSelectedListener {
@SuppressLint("SetJavaScriptEnabled", "SdCardPath")
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
setSupportActionBar(toolbar)
webframe.loadUrl(getString(R.string.Site_Url))
webframe.settings.javaScriptEnabled = true//Enable JavaScript
webframe.settings.allowFileAccess = true
webframe.settings.allowFileAccessFromFileURLs = true
webframe.settings.allowContentAccess = true
webframe.settings.domStorageEnabled = true
webframe.settings.setGeolocationEnabled(true)
CookieManager.getInstance().acceptCookie()
webframe.restoreState(savedInstanceState)
}
}