Search results

Embedding Bold BI Dashboards in Xamarin using the Embedded SDK

Created a Xamarin application for achieving this embedding. Here, set the server and dashboard details as the embed details, and the dashboard will be rendered after passing the authorization.

NOTE: Reading the Getting Started section of the documentation is the best way to get started. The Getting Started guide provides you enough information that you need to know before working on the sample.

How to run the sample

  1. Please download the Xamarin Forms sample from the attached file.

  2. We need to set the following properties in EmbedProperties.cs file as follows.
    Embed Properties

    RootUrl Dashboard Server BI URL (ex: http://localhost:5000/bi, http://dashboard.syncfusion.com/bi)
    SiteIdentifier For Bold BI Enterprise edition, it should be like site/site1. For Bold BI Cloud, it should be empty string.
    DashboardId Provide the dashboard id of the dashboard you want to embed here.Please refer below how to get the dashboard id.
    UserEmail UserEmail of the Admin in your Bold BI, which will be used to get the dashboards list.
    EmbedSecret ou can get your EmbedSecret key from embed tab by enablingEnable embedauthentication in Administration page as mentioned in next step.
  1. You can get your Embed Secret key from the administrator setting section. Please refer to this link, for more details.

  2. Then, run your Xamarin Forms application.

Get dashboard ID

You could get the item id of the dashboard from the BI server. Please refer to this link and the following screenshot.

Get dashboard ID

After changing the above details in the sample, you can run the Xamarin forms and the dashboard will be rendered.

How this sample works

  1. We are using WebView to render the BoldBI Dashboard in Xamarin forms application.

  2. Since we are using WebView, we have to generate the html file to append to WebView.

  3. We have to authorize the application by calling the GetEmbedDetail method as below,

    Get Embed Details

  4. In the above authorization, generated a SignatureUrl with the provided EmbedSecret key and using the signature, we will validate the details and BoldBI will return the token. We will pass the token with the HtmlString as below, Htmlstring

  5. In the EmbedProperties.cs, you can change the dashboard Id of the respective dashboard as you wish to embed. Set Dashboard Id