Skip to content

Commit

Permalink
Add linking and minor textual changes
Browse files Browse the repository at this point in the history
  • Loading branch information
andlie committed Mar 11, 2022
1 parent 3083622 commit 8cb75c0
Showing 1 changed file with 25 additions and 11 deletions.
36 changes: 25 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,36 +11,47 @@ Drop the wrapper-code into your `assets` folder, add a few lines of code in your
## Key Topics
The following topics will be covered in this readme

* Installation
* Initialisation
* Show Feedback form
* Show Campaign / Send Event
* Callback from SDK
* Customize Campaign Banner
* Masking Private Identifiable Information
* [Installation](#installation)
* [Initialisation](#initialisation)
* [Show Feedback form](#show-feedback-form)
* [Show Campaign / Send Event](#show-campaign--send-event)
* [Callback from SDK](#callback-from-sdk)
* [Configure Theme](#configure-theme)
* [Customize Campaign Banner](#customize-campaign-banner)
* [Masking Personally Identifiable Information](#pii)

<div id="installation"></div>

## Installation

Get the [latest code](git@github.com:usabilla/usabilla-u4a-unity.git) from our github repository. Unpack the zip file into your Unity project `Assets/Plugins` folder. Take care not to overwrite any other files
Get the [latest code](https://github.com/usabilla/usabilla-u4a-unity) from our github repository. Unpack the zip file into your Unity project `Assets/Plugins` folder. Take care not to overwrite any other files

If Your application targets iOS, open the `Usabilla.framework.meta` file (auto-generated by Unity), and change the `AddToEmbeddedBinaries: false` to `AddToEmbeddedBinaries: true`. This ensures that the framework will be added correct in the iOS application.


<div id="initialisation"></div>

## Initialisation
To proper set up the GetFeedback SDK, call `GetFeedback.Bridge.initialize("<YOUR APP ID>>")`. This MUST be done before any campaign can be displayed.
Your App ID is created when You create Your Campaign on the GetFeedback website

<div id="show-feedback-form"></div>

## Show Feedback form
To show a FeedBack form, call `GetFeedback.Bridge.showFeedback("<FORM ID>")`. This will display the form, covering the current UI.
NOTE: The SDK doesn't pause any threads or code. If it is needed to halt the current application execution, make sure to do so before calling the SDK
<div id="show-campaign--send-event"></div>

## Show Campaign / Send Event
To show a FeedBack campaign, call `GetFeedback.Bridge.sendEvent("<The Event>>")`. This will depending on the parameters for the campaign, display a banner with the first page of the campaign. Once a campaign has been displayed on a device, it can not be displayed again on the device.

NOTE: The SDK doesn't pause any threads or code. If it is needed to halt the current application execution, make sure to do so before calling the SDK
<div id="callback-from-sdk"></div>

## Callback from SDK
The SDK can report back to the Unity Application when certain events occur, e.g. the Feedback form has been removed. Call `GetFeedbackBridge.setDelegate()` to enable callback. The SDK needs to know where to deliver the callback.
Configure this with `GetFeedback.Events.sdkEvent.AddListener(<function to call>)`. The sdkEvent is a `UnityEvent<string>` so the function should accept a string eg `public void sdkCallBackMethod(string data)`. To learn about the data, check the
<div id="configure-theme"></div>

## Configure Theme
The SDK allowas for some font and images customization.
Expand Down Expand Up @@ -68,6 +79,7 @@ All Image for the Theme must also be placed in the `StreamingAssets`. The Native
#### banner (see Customize Campaign Banner)
If the banner is left empty, the default SDK banner implementation will be applied.
To configure a different banner layout add a Banner Object
<div id="customize-campaign-banner"></div>

## Customize Campaign Banner
The Banner object holds 4 properties
Expand All @@ -87,8 +99,10 @@ All Image for the Theme must also be placed in the `StreamingAssets`. The Native
cancelButtonBgAssetName - the name of the image used as background for the button (Optional)
cancelButtonTextColor - the text color as a #RGB string for the button (Optional)

## Masking Private Identifiable Information
The SDK has an option to mask (when data is submitted to the back-end) the data from input texts, specifically `Text Input` and `Text Area`. Please note that the an email input field is not being masked.
<div id="pii"></div>

## Masking Personally Identifiable Information
The SDK has an option to mask (when data is submitted to the back-end) the data from input texts, specifically `Text Input` and `Text Area`. Please note that the email input field is not being masked.

It matches a list of RegEx and replaces them by the "X" character by default.
To apply masking, create a DataMask object, populate it, and use the
Expand All @@ -102,7 +116,7 @@ To remove the previously set mask, call the method with an empty DataMask object
DataMask mask = new DataMask();
Bridge.setDataMasking(mask);

The SDK provide some default masking, where emails are masked, and any digit longer than 4 digits eg credit-card numbers
The SDK provides some default masking, where emails are masked, and any digit longer than 4 digits (e.g. credit-card numbers)
To apply the default masking, call the method with `null`

Bridge.setDataMasking(null);
Expand Down

0 comments on commit 8cb75c0

Please sign in to comment.