Re: [presentation-api] Cannot find name 'PresentationRequest' (#510)

(This is slightly off topic for a spec repo, but I'll try to offer some direction to help you forward.)

@abutizi Thank you for your interest toward the Presentation API!

I'm not familiar with Ionic, but it looks like the runtime (called Capacitor, using [WebView](https://ionicframework.com/docs/core-concepts/webview)) underneath the UI layer (Ionic) hosts the app files from a local HTTP server served with the `http://` protocol. The reason you're hitting that error is likely two-fold: the `PresentationRequest` API is only exposed if the app files are served with the `https://` protocol. Secondly, the Presentation API is not enabled in WebView see e.g. https://crbug.com/521319. There seems to be a proposal in https://github.com/capacitor-community/proposals/issues/139 for a Capacitor plugin to enable this API, but no movement yet, so not helping you.

All is not lost. Depending on your use case, you may want to develop a regular web app or a [PWA](https://web.dev/progressive-web-apps/) instead. If you want to pursue this path, to get you going, please first check you are using [a compatible web browser](https://caniuse.com/mdn-api_presentation) and then try [this demo](https://googlechromelabs.github.io/presentation-api-samples/photowall/).

@mfoltzgoogle may be able to speak briefly on the feasibility of supporting Presentation API in Android WebView.

-- 
GitHub Notification of comment by anssiko
Please view or discuss this issue at https://github.com/w3c/presentation-api/issues/510#issuecomment-1357445852 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Monday, 19 December 2022 10:43:58 UTC