Q: How can I display the widget on my mobile app

SafeAardwolf3 months ago

I would like to use the widget in my mobile app, how would I go about rendering it.


Matthewadmin3 months ago

Hey, the best approach would be to open the widget in the designated browser. Whilst it is possible to render a webview, this is not ideal as some providers like Google may reject authentication.

To open the url in swift:

if let url = URL(string: urlSting), UIApplication.shared.canOpenURL(url) { UIApplication.shared.open(url) }

In kotlin:

Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(url)); startActivity(browserIntent);

In react native:

Linking.canOpenURL(url).then(supported => { if (supported) { Linking.openURL(url); } }

And in flutter:

final Uri url = Uri.parse(url); await launchUrl(url)