WebView
Once you will receive widget URL, you can show it in your app in webview
React Native
Once you will have widget URL from this endpoint - you can use React Native WebView library for opening it in the WebView.
If a 401 error is returned in the mobile application when opening the URL in the WebView (that is, the token has expired), repeat this request to get a new URL.
import React, { Component } from 'react';
import { StyleSheet, Text, View } from 'react-native';
import { WebView } from 'react-native-webview';
// ...
const MyWebComponent = () => {
return <WebView source={{ uri: 'https://app.enable3.io/?token=xxx' }} style={{ flex: 1 }} />;
}
Android
Once you will have widget URL from this endpoint - you can use Android WebView for opening it
import android.os.Bundle;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import androidx.appcompat.app.AppCompatActivity;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
WebView webView = findViewById(R.id.webView);
webView.getSettings().setJavaScriptEnabled(true);
webView.setWebViewClient(new WebViewClient());
webView.loadUrl("https://www.example.com");
}
}
iOS
Documentation coming soon
Last updated