Weavy in the mobile

For a feature complete experience in the mobile, the preferred way to implement Weavy in the mobile is with a so called Web View. This is a hybrid app approach which allows for a similar experience as in a web browser. We have created our own implementation of a Web View that can be used in a Xamarin.Forms mobile app project. This is just an ordinary web view, but with additional functionality such as Single Sign On capabilities, notification updates and more.

The Weavy Web View

The Weavy Web View is available as a Nuget package that you can add to your Xamarin.Forms project. The minimal requirement is the Uri to the web site where Weavy is hosted.

<w:WeavyWebView 
    x:Name="weavyWebView" 
    Uri="https://demo.weavycloud.com" 
    VerticalOptions="FillAndExpand" 
    HorizontalOptions="FillAndExpand">
</w:WeavyWebView>

To display a specific App, just specify the Uri for that App.

<w:WeavyWebView 
    x:Name="weavyWebView" 
    Uri="https://demo.weavycloud.com/e/apps/1"
    VerticalOptions="FillAndExpand"
    HorizontalOptions="FillAndExpand">
</w:WeavyWebView>

Or, if you want to display the Messenger, specify the Uri to the Messenger.

<w:WeavyWebView 
    x:Name="weavyWebView" 
    Uri="https://demo.weavycloud.com/messenger"
    VerticalOptions="FillAndExpand"
    HorizontalOptions="FillAndExpand">
</w:WeavyWebView>

Initialize and load

To initialize and load the Uri, add the following to the code behind file.

weavyWebView.InitCompleted += (s, a) => { 
    weavyWebView.Load(); 
};

Single Sign On

The Weavy Web View has built in support to handle Single Sign On (SSO). This is handled the same way as you would implement SSO to your Weavy web site. Just specify the JWT token before initializing and loading the Wevy Web View.

weavyWebView.AuthenticationToken = "a.jwt.token";
weavyWebView.InitCompleted += (s, a) => { 
    weavyWebView.Load(); 
};

Push Notifications

Notifications to the user's mobile devices is automatically pushed from the Weavy web app. Regardless off which provider you decide to use to do this, some form of configuration is needed. Weavy has a default implementation of the notification provider which is Azure Notification Hubs. More information on how to create you own custom Push Notification Provider can be found in the Tutorials section.

Native Web View with Weavy

Although the supplied Weavy Web View is built for Xamarin.Forms only, a native Web View in your Android or iOS project will work just as good. The only thing is that you have to implement functionality such as SSO and notifications your self. Displaying content from Weavy is as easy as pointing the Web View to an url.

Pure Native Weavy app

Do you prefer a native app? No problem, you can build the app the way you like it. Although a hybrid app is a much quicker way to get up and running and getting a feature complete Weavy app, a native app might be preferable regarding using experience, native functionality etc.

If you decide to create a native app, you are going to need to create rest api end points in your Weavy solution for all the functionality required to be exposed to the app. This typically includes api endpoints for authentication, listing content and more.

Integrate into an existing app

If you already have an existing app and want to integrate Weavy, you can choose between the Weavy Web View (if your project is a Xamarin.Forms app), a native web view (for the hybrid app approach) or a pure native approach where you create rest api endpoints for the functionality you want to integrate.