# Introduction

## Cross Platform Screen Recorder Kit

[Cross Platform Screen Recorder Kit](http://u3d.as/1nN3) allows to record your player's game experiences easily on Unity. It supports both iOS and Android platforms with unified and simple API.  It provides a unified and simple API for GIF/Video screen recording.<br>

{% hint style="info" %}
Plugin supports mobile platforms Android (API 21 and above), iOS(11 and above - iPhone 5S or later, iPad mini 2 or later, iPod Touch 6th generation, iPad Air or later.)&#x20;
{% endhint %}

\
**Our Other Top Selling Products** [Cross Platform Native Plugins : Essential Kit](http://u3d.as/1szE) | [Cross Platform Easy Save](http://u3d.as/1juJ) | [Cross Platform Snapchat Kit](http://u3d.as/1gWc)\
\
**Important links** \
[Support](https://discord.gg/jegTXvqPKQ) | [Tutorials](http://u3d.as/1nN3) \
\
**Highlights** \
• Unified API design. \
• Auto-generates Android Manifest file. \
• Easy API for Recording \
• Easily convertible from Unity's ReplayKit API \
• Full source code is included. \
\
**Feature set** \
• Screen Record complete screen with microphone(including UI) \
• Preview Recorded Video \
• Single API for both iOS and Android Platforms\
• Get Preview Recording file path\
• Save & Share Recorded video (share for gif coming soon)

&#x20;\
\
**Note** \
On Android, there is no public API to record audio without microphone.The game music will be recorded through microphone only. In coming updates we allow option to add custom music instead of just microphone captured audio. \
\
\
This asset uses below third party libraries. \
1\. ExifLib under MIT License. \
See Third-Party Notices.txt file in the package for details.


# Installation

1. In Assets/Plugins/VoxelBusters folder, delete **CoreLibrary** and **ScreenRecorderKit** folders (if exists)
2. Download the plugin via Package Manager
3. Import the plugin
4. Add the Newtonsoft Json dependency (<mark style="color:purple;">"com.unity.nuget.newtonsoft-json": "2.0.0"</mark>) in YOUR\_PROJECT\_ROOT/Packages/manifest.json under dependencies block.
5. Create settings and configure from top menu bar Window -> Voxel Busters -> Screen Recorder Kit -> Open Settings


# Version 2 vs Version 1

API differences among V1 and V2

V1 has access to the api methods via ReplayKitManager static class. This is changed in V2 and access is provided via an [IScreenRecorder](https://voxelbusters.com/products/cross-platform-screen-recorder-kit/documentation/api/VoxelBusters.ScreenRecorderKit.IScreenRecorder.html) interface which provides an access to use same code for GIF and Video recording.

For creating an instance of IScreenRecorder, you need to use [ScreenRecorderBuilder](https://voxelbusters.com/products/cross-platform-screen-recorder-kit/documentation/api/VoxelBusters.ScreenRecorderKit.ScreenRecorderBuilder.html).

<table><thead><tr><th width="215">Description</th><th width="222">Version 1</th><th width="305">Version 2</th></tr></thead><tbody><tr><td>Check availability of service</td><td>IsRecordingApiAvailable</td><td><a href="https://voxelbusters.com/products/cross-platform-screen-recorder-kit/documentation/api/VoxelBusters.ScreenRecorderKit.IScreenRecorder.html#VoxelBusters_ScreenRecorderKit_IScreenRecorder_CanRecord">CanRecord</a></td></tr><tr><td>Initialisation</td><td>Initialise</td><td>-</td></tr><tr><td>Check if Recording</td><td>IsRecording</td><td><a href="https://voxelbusters.com/products/cross-platform-screen-recorder-kit/documentation/api/VoxelBusters.ScreenRecorderKit.IScreenRecorder.html#VoxelBusters_ScreenRecorderKit_IScreenRecorder_IsRecording">IsRecording</a></td></tr><tr><td>Check Paused or Recording</td><td>-</td><td><a href="https://voxelbusters.com/products/cross-platform-screen-recorder-kit/documentation/api/VoxelBusters.ScreenRecorderKit.IScreenRecorder.html#VoxelBusters_ScreenRecorderKit_IScreenRecorder_IsPausedOrRecording">IsPausedOrRecording</a></td></tr><tr><td>Set Microphone Status</td><td>SetMicrophoneStatus</td><td><a href="https://voxelbusters.com/products/cross-platform-screen-recorder-kit/documentation/api/VoxelBusters.ScreenRecorderKit.VideoRecorderRuntimeSettings.html#constructors">VideoRecorderRuntimeSettings</a> or<br><a href="https://voxelbusters.com/products/cross-platform-screen-recorder-kit/documentation/api/VoxelBusters.ScreenRecorderKit.GifRecorderSettings.html#VoxelBusters_ScreenRecorderKit_GifRecorderSettings__ctor_System_Boolean_System_Int32_System_Int32_System_Boolean_System_Int32_System_Int32_System_Int32_System_Single_ThreadPriority_">GifRecorderSettings</a></td></tr><tr><td>Prepare Recording</td><td>PrepareRecording</td><td><a href="https://voxelbusters.com/products/cross-platform-screen-recorder-kit/documentation/api/VoxelBusters.ScreenRecorderKit.IScreenRecorder.html#VoxelBusters_ScreenRecorderKit_IScreenRecorder_PrepareRecording_CompletionCallback_">PrepareRecording(CompletionCallback callback)</a></td></tr><tr><td>Start Recording</td><td>StartRecording</td><td><a href="https://voxelbusters.com/products/cross-platform-screen-recorder-kit/documentation/api/VoxelBusters.ScreenRecorderKit.IScreenRecorder.html#VoxelBusters_ScreenRecorderKit_IScreenRecorder_StartRecording_CompletionCallback_">StartRecording(CompletionCallback callback)</a></td></tr><tr><td>Pause Recording</td><td>-</td><td><a href="https://voxelbusters.com/products/cross-platform-screen-recorder-kit/documentation/api/VoxelBusters.ScreenRecorderKit.IScreenRecorder.html#VoxelBusters_ScreenRecorderKit_IScreenRecorder_PauseRecording_CompletionCallback_">PauseRecording(CompletionCallback callback)</a></td></tr><tr><td>Stop Recording</td><td>StopRecording</td><td><a href="https://voxelbusters.com/products/cross-platform-screen-recorder-kit/documentation/api/VoxelBusters.ScreenRecorderKit.IScreenRecorder.html#VoxelBusters_ScreenRecorderKit_IScreenRecorder_StopRecording_CompletionCallback_">StopRecording(CompletionCallback callback)</a></td></tr><tr><td>Discard Recording</td><td>DiscardRecording</td><td><a href="https://voxelbusters.com/products/cross-platform-screen-recorder-kit/documentation/api/VoxelBusters.ScreenRecorderKit.IScreenRecorder.html#VoxelBusters_ScreenRecorderKit_IScreenRecorder_DiscardRecording_CompletionCallback_">DiscardRecording(CompletionCallback callback)</a></td></tr><tr><td>Preview Recording</td><td>PreviewRecording</td><td><a href="https://voxelbusters.com/products/cross-platform-screen-recorder-kit/documentation/api/VoxelBusters.ScreenRecorderKit.IScreenRecorder.html#VoxelBusters_ScreenRecorderKit_IScreenRecorder_OpenRecording_CompletionCallback_">OpenRecording(CompletionCallback callback)</a></td></tr><tr><td>Save Recording</td><td>SaveRecording</td><td><a href="https://voxelbusters.com/products/cross-platform-screen-recorder-kit/documentation/api/VoxelBusters.ScreenRecorderKit.IScreenRecorder.html#VoxelBusters_ScreenRecorderKit_IScreenRecorder_SaveRecording_CompletionCallback_VoxelBusters_ScreenRecorderKit_ScreenRecorderSaveRecordingResult__">SaveRecording</a></td></tr><tr><td>Share Recording</td><td>Share Recording</td><td><a href="https://voxelbusters.com/products/cross-platform-screen-recorder-kit/documentation/api/VoxelBusters.ScreenRecorderKit.IScreenRecorder.html#VoxelBusters_ScreenRecorderKit_IScreenRecorder_ShareRecording_System_String_System_String_CompletionCallback_">ShareRecording(CompletionCallback callback)</a></td></tr></tbody></table>


# Settings

Overview of Screen Recorder Kit Settings

Access settings from Window -> Voxel Busters -> Cross Screen Recorder Kit -> Setting menu.

### Video Recorder Settings

<figure><img src="/files/nsvZ5qG4s97tUpObtdOv" alt=""><figcaption><p>Video Recorder Settings</p></figcaption></figure>

#### **Android  Properties (For a more granular control on Android Platform)**

**Video Max Quality** - Set max quality you want to allow for recording the video on Android QUALITY\_1080P - Video will be recorded at 1080p max resolution if the device supports. QUALITY\_720P - Video will be recorded at 720p max resolution if the device supports. QUALITY\_480P - Video will be recorded at 480p max resolution if the device supports.

**Custom Video Bitrate** - Enable this if you want to setup custom video bitrates. Usually default bitrates on Android for video recording uses higher bitrates leading to good quality but bigger file sizes. This setting allows you to choose from [optimal recommended settings](https://support.video.ibm.com/hc/en-us/articles/207852117-Internet-connection-and-recommended-encoding-settings) and choose a factor between min and max values.

> This will give a better file size without compromising much for the quality. Choosing the factor is based on the content length you may record in your game.

### GIF Recorder Settings

<figure><img src="/files/yHITRrS5He0cFBHNp0qo" alt=""><figcaption><p>Gif Recorder Settings</p></figcaption></figure>


# Folder Paths

| Title       | Path                                                            |
| ----------- | --------------------------------------------------------------- |
| Plugin Root | Assets/Plugins/VoxelBusters/ScreenRecorderKit                   |
| Examples    | Assets/Plugins/VoxelBusters/Screen Recorder Kit/Examples/Scenes |


# Create

To access the api to record, you need to first create an instance of [IScreenRecorder](https://voxelbusters.com/products/cross-platform-screen-recorder-kit/documentation/api/VoxelBusters.ScreenRecorderKit.IScreenRecorder.html). ScreenRecorderBuilder provides a way to create IScreenRecorder instances for both Gif and Video.

### Create Video Recorder

To create a video recorder IScreenRecorder instance, first you need to create an instance of VideoRecorderRuntimeSettings and pass it to [ScreenRecorderBuilder](https://voxelbusters.com/products/cross-platform-screen-recorder-kit/documentation/api/VoxelBusters.ScreenRecorderKit.ScreenRecorderBuilder.html).

#### Configuration

[VideoRecorderRuntimeSettings](https://voxelbusters.com/products/cross-platform-screen-recorder-kit/documentation/api/VoxelBusters.ScreenRecorderKit.ScreenRecorderBuilder.html#VoxelBusters_ScreenRecorderKit_ScreenRecorderBuilder_CreateVideoRecorder_VoxelBusters_ScreenRecorderKit_VideoRecorderRuntimeSettings_) provides a way to configure the video recorder. You can change the microphone status to enable or disable for the current recording.

{% code title="Create settings instance" %}

```csharp
VideoRecorderRuntimeSettings settings = new VideoRecorderRuntimeSettings(enableMicrophone: true);
```

{% endcode %}

#### IScreenRecorder instance for Video

Once you create a VideoRecorderRuntimeSettings instance, pass it to ScreenRecorderBuilder to create an IScreenRecorder instance.

```csharp
IScreenRecorder recorder;
//...
//...

// Create settings
VideoRecorderRuntimeSettings settings = new VideoRecorderRuntimeSettings(enableMicrophone: true);

// Pass settings to ScreenRecorderBuilder and build
ScreenRecorderBuilder builder = ScreenRecorderBuilder.CreateVideoRecorder(settings);
recorder = builder.Build();
```

### Create GIF Recorder

Create a GIF recorder IScreenRecorder instance vis ScreenRecorderBuilder.

#### Configuration

You can pass Camera instance to builder if you want to record only a specific camera.

#### IScreenRecorder instance for GIF

You can either record a specific camera or complete screen with GIF recorder.

{% code title="Camera Recording" %}

```csharp
IScreenRecorder recorder;
Camera cameraInstance;
//....
ScreenRecorderBuilder builder = ScreenRecorderBuilder.CreateGifRecorder(cameraInstance);
recorder = builder.Build();
```

{% endcode %}

{% code title="Full Screen Recording" %}

```csharp
IScreenRecorder recorder;
//....

ScreenRecorderBuilder builder = ScreenRecorderBuilder.CreateGifRecorder();
recorder = builder.Build();
```

{% endcode %}


# Can Record (Service Availability)

## Check Service Availability <a href="#check-service-availability" id="check-service-availability"></a>

Check if Screen Recorder Kit features can be used. As the functionality needs required support from the hardware, it's always good to check this before calling any of the other plugin methods.

```csharp
// Create a gif or video recorder instance
IScreenRecorder recorder = ScreenRecorderBuilder.CreateGifRecorder().Build;
bool canRecord = recorder.CanRecord();
```

{% hint style="info" %}
Gif recording is supported on all platforms.

Video Recording is supported only on mobile platforms Android (API 21 and above), iOS(9 and above - iPhone 5S or later, iPad mini 2 or later, iPod Touch 6th generation, iPad Air or later.)&#x20;
{% endhint %}

Example

```csharp
public bool CanRecord()
{
	IScreenRecorder recorder = ScreenRecorderBuilder.CreateGifRecorder().Build();
	//or
	//IScreenRecorder recorder = ScreenRecorderBuilder.CreateVideoRecorder(new VideoRecorderRuntimeSettings()).Build();

	bool canRecord  =  recorder.CanRecord();

	string message  = canRecord ? "Screen Recorder Kit recording API is available!" : "Screen Recorder Kit recording API is not available.";

	Debug.Log(message);
	return canRecord;
}
```


# Register Listeners

Get callbacks when an event occurs

#### Set On Recording Available Listener

This listener is used to get a callback a record gets finished and has a result. In the case of Video recording, this will be file path and for Gif recording the result will be GifTexture instance.

<pre class="language-csharp" data-title="For Video Recorder"><code class="lang-csharp">IScreenRecorder recorder;
//... Create video recorder instance via ScreenRecorderBuilder.
//...

<strong>recorder.SetOnRecordingAvailable((result) =>
</strong>        {
            string path = result.Data as string;
            Debug.Log($"File path: {path}");
        });
</code></pre>

{% code title="For GIF Recorder" %}

```csharp
IScreenRecorder recorder;
//... Create GIF recorder instance via ScreenRecorderBuilder.
//...

recorder.SetOnRecordingAvailable((result) =>
        {
            GifTexture gifTexture = result.Data as GifTexture;
            Debug.Log($"Gif Texture : {gifTexture}");
        });
```

{% endcode %}


# Is Recording

Learn how to check if recording is in progress

Check if already there is a screen recording happening. This returns true if a screen recording already stared and running.

```csharp
recorder.IsRecording();
```

Example

```csharp
IScreenRecorder recorder;
//...
public void IsRecording()
{
  return recorder.IsRecording();
}
```


# Is Paused or Recording

Learn how to know if a preview is available

Check if a recording is currently paused or recording.

```csharp
IScreenRecorder.IsPausedOrRecording(); //Can call with IScreenRecorder instance
```

Example

<pre class="language-csharp"><code class="lang-csharp">IScreenRecorder recorder;
//...
public void CheckStates()
{
    if(recorder.IsRecording())
    {
        Debug.Log("Currently an active recording exists and is in recording state.");
    }
    else if(recorder.IsPausedOrRecording())
    {
        Debug.Log("Currently an active recording exists and is either paused or in recording state.");
    }
    else if(recorder.IsPausedOrRecording() &#x26;&#x26; !recorder.IsRecording())
    {
<strong>        Debug.Log("Currently an active recording exists and is paused state.");            
</strong>    }
    else
    {
        Debug.Log("No active recording exists.");
    }
}
</code></pre>


# Prepare Recording

This shows the required permissions and gets everything ready for actual recording. Gif recording doesn't need any permissions but video recording on native platforms will request user to allow recording.

```csharp
recorder.PrepareRecording(callback: (success, error) =>
{
    if (success)
    {
        Debug.Log("Prepare recording successful.");
        //Call StartRecording here.
    }
    else
    {
        Debug.Log($"Prepare recording failed with error [{error}]");
    }
});
```

Once after calling PrepareRecording, you can go ahead with StartRecording.

{% hint style="success" %}
It's not mandatory to call PrepareRecording before StartRecording as StartRecording will internally call prepare if it's not done . \
\
PrepareRecording helps in cases where you want to show the recording permissions a head so that you inform the user about the recording permissions or to avoid any flickering when using vuforia/AR frameworks at the time of recording.
{% endhint %}

Example

> ```csharp
> using VoxelBusters.ScreenRecorderKit;
>
> IScreenRecorder recorder;
> //... Create instance for IScreenRecorder via ScreenRecorderBuilder
>
> public void PrepareRecording()
> {
>     recorder.PrepareRecoring(PrepareRecordingComplete);
> }
>
> private void PrepareRecordingComplete(bool status, Error error)
> {
>     if (success)
>     {
>         Debug.Log("Prepare recording successful.");
>         //Call StartRecording here.
>     }
>     else
>     {
>         Debug.Log($"Prepare recording failed with error [{error}]");
>     }
> }
>
> ```


# Start Recording

This starts the recording and internally it may call PrepareRecording if its not called earlier to this call. If it calls PrepareRecording internally, it may show up permission for the user to allow recording.

```csharp
recorder.StartRecording(callback: (success, error) =>
{
    if (success)
    {
        Debug.Log("Start recording successful.");
    }
    else
    {
        Debug.Log($"Start recording failed with error [{error}]");
    }
});
```

Example

> ```csharp
> using VoxelBusters.ScreenRecorderKit;
>
> IScreenRecorder recorder;
> //... Create instance for IScreenRecorder via ScreenRecorderBuilder
>
> public void StartRecording()
> {
>     recorder.StartRecording(StartRecordingComplete);
> }
>
> private void StartRecordingComplete(bool status, Error error)
> {
>     if (success)
>     {
>         Debug.Log("Start recording successful.");
>     }
>     else
>     {
>         Debug.Log($"Start recording failed with error [{error}]");
>     }
> }
> ```


# Stop Recording

Learn how to stop a recording

This call stops the current recording and do the required steps for making the recorded video available for preview.

You need to have an active recording to call this method. Else it throws error.

```csharp
recorder.StopRecording(callback: (success, error) =>
{
    if (success)
    {
        Debug.Log("Stop recording successful.");
    }
    else
    {
        Debug.Log($"Stop recording failed with error [{error}]");
    }
});
```

Example

```csharp
using VoxelBusters.ScreenRecorderKit;

IScreenRecorder recorder;
//... Create instance for IScreenRecorder via ScreenRecorderBuilder

public void StopRecording()
{
    recorder.StopRecording((success, error) =>
    {
        if (success)
        {
            Debug.Log("Stop recording successful.");
        }
        else
        {
            Debug.Log($"Stop recording failed with error [{error}]");
        }
    });
}
```


# Open Recording

Learn how to show preview of the recording

Once you get a callback triggered on recording available (You can set it with [Register Listeners](/api/initialisation)), calling this method opens up a view/intent to play the recorded video/Gif.

{% hint style="warning" %}
Currently this method is not supported with GIF recording. Coming soon!
{% endhint %}

```csharp
using VoxelBusters.ScreenRecorderKit;

IScreenRecorder recorder;
//... Create instance for IScreenRecorder via ScreenRecorderBuilder

void RegisterListeners()
{
    recorder.SetOnRecordingAvailable((result) =>
    {
        string path = result.Data as string;
        Debug.Log($"File path: {path}");
        OpenRecording();
    });
}
void OpenRecording()
{
    recorder.OpenRecording((success, error) =>
    {
        if (success)
        {
            Debug.Log($"Open recording successful");
        }
        else
        {
            Debug.Log($"Open recording failed with error [{error}]");
        }
    });    
}

```

{% hint style="success" %}
You can have your own custom video preview by making use of the file path returned from SetOnRecordingAvailable listener and [Unity Video Player](https://docs.unity3d.com/ScriptReference/Video.VideoPlayer.html)
{% endhint %}


# Discard Recording

Discard a recording once its recorded

While recording is happening, the recording can be discarded with this call. It's always recommended to call discard incase if you don't need the recording. This will avoid saving the recorded content and helps in freeing any memory allocated.

```csharp
recorder.DiscardRecording((success, error) => {
    if(success)
    {
        Debug.Log("Discard recording successful");
    }
    else
    {
        Debug.Log($"Discard recording failed with error [{error}]");
    }
});
```


# Save Recorded Video

Learn how to save recorded video to gallery

Once a recording is finished, this call will save the recorded content to disk.&#x20;

> For video recording : On iOS this saves directly to the camera roll. On Android we create an app folder album and copy over there&#x20;

{% hint style="success" %}
For Gif recording : This saves gif to Application.PersistentPath.
{% endhint %}

{% hint style="info" %}
On Android, Make sure you enable **Uses Save Preview** from Screen Recorder Kit Settings. Else it won't get saved to gallery as it needs permissions declared in the manifest. We do it automatically, if you enable it in Screen Recorder Kit settings.
{% endhint %}

```csharp
using VoxelBusters.ScreenRecorderKit;

IScreenRecorder recorder;
//... Create instance for IScreenRecorder via ScreenRecorderBuilder

void RegisterListeners()
{
    recorder.SetOnRecordingAvailable((result) =>
    {
        string path = result.Data as string;
        Debug.Log($"File path: {path}");
        SaveRecording();
    });
}
void SaveRecording()
{
    recorder.SaveRecording(null, (result, error) =>
    {
        if(error == null)
        {
            Debug.Log("Saved recording successfully :" + result.Path);
        }
        else
        {
            Debug.Log($"Failed saving recording [{error}]");
        }
    });
}

```

### Error Codes

| Name                        | Description                                                                                                                                                                                  |
| --------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **PREVIEW\_UNAVAILABLE**    | This error string is passed in the callback if save is called when preview is not available                                                                                                  |
| **PERMISSION\_UNAVAILABLE** | This error is passed in the callback if external storage permissions are not set in Screen Recorder Kit Settings inspector (make sure you click on save button after updating the inspector) |


# Share Recorded Video

Learn how to share recorded video

Once a recording is finished and available, you can share the file to other services.

{% hint style="warning" %}
Currently share recording is not supported for Gif recording. Coming soon.
{% endhint %}

```csharp
using VoxelBusters.ScreenRecorderKit;

IScreenRecorder recorder;
//... Create instance for IScreenRecorder via ScreenRecorderBuilder

void RegisterListeners()
{
    recorder.SetOnRecordingAvailable((result) =>
    {
        string path = result.Data as string;
        Debug.Log($"File path: {path}");
        SaveRecording();
    });
}
void SaveRecording()
{
    recorder.SaveRecording(null, (result, error) =>
    {
        if(error == null)
        {
            Debug.Log("Saved recording successfully :" + result.Path);
            ShareRecording();
        }
        else
        {
            Debug.Log($"Failed saving recording [{error}]");
        }
    });
}

void ShareRecording()
{
    recorder.ShareRecording(callback: (success, error) =>
    {
        if (success)
        {
            Debug.Log("Shared recording");
        }
        else
        {
            Debug.Log($"Failed to share recording [{error}]");
        }
    });
}

```


# Flush

Flush the created resources created for the recording.

```csharp
recorder.Flush();
```


# Android

Currently on Android, It's not possible to record internal sounds without the microphone for video recorder. This is because of no public API availability.

{% hint style="danger" %}
Even though in-game sounds can be recorded in root mode, this is out of the scope of this plugin as it may be removed from store without notice by google anytime if publishing using private API's. So our plugin won't use any private API's for reliability.
{% endhint %}

However, you can record the screen with the sound through microphone which is acceptable.

{% hint style="info" %}
In upcoming updates we will come up with an option to add custom music incase if audio through microphone recording is not yielding better results.
{% endhint %}


# Using in Native Android Projects (UaaL)

Quick overview on how to use in native android projects with unity as a library (UaaL)

### Complete Setup

1. Open Unity Player Settings
2. Go to Publishing Settings
3. Enable Main Gradle Template
4. Enable Main Android Manifest  and open from Assets/Plugins/Android folder
5. Add service tag (between existing \<application> \</application> tag as stated in [#file-setup-androidmanifest.xml](#file-setup-androidmanifest.xml "mention")
6. Open settings.gradle of your root native project and add lines from[#file-setup-settings.gradle](#file-setup-settings.gradle "mention") at the end of the file after you include unityLibrary project directory.

***

### External Dependency Manager Setup (Optional)

1. Open Assets -> External Dependency Manager -> Android -> Settings
2. Open Assets -> External Dependency Manager -> Android -> Force Resolve

### File Setup : AndroidManifest.xml

{% code overflow="wrap" %}

```
<service android:name="com.voxelbusters.screenrecorderkit.videorecorder.internal.ScreenRecordingService" android:enabled="true" android:process=":UnityPlayer" android:foregroundServiceType="mediaProjection" />
```

{% endcode %}

{% hint style="success" %}
Setting up the Android Manifest is a must as Unity runs in a different process (UnityPlayer) so for recording service to work we need to set this attribute
{% endhint %}

{% hint style="info" %}
Note that the process name could be different for your project. You can get the value from the main launcher android manifest xml file. If you don't run unity in a separate process, you can just skip adding android:process attribute.
{% endhint %}

### File Setup : settings.gradle

```gradle
include 'unityLibrary:com.voxelbusters.screenrecorderkit.androidlib'
```

> After the above steps, follow [this document](https://forum.unity.com/threads/integration-unity-as-a-library-in-native-android-app-version-2.751712/) on actions for Android Studio.


# 2.4.2

### Uninstall before updating

1. Delete Assets/Plugins/VoxelBusters/**CoreLibrary** folder
2. Delete Assets/Plugins/VoxelBusters/**ScreenRecorderKit** folder
3. Delete Assets/Plugins/Android/**com.voxelbusters.screenrecorderkit**.androidlib or **com.voxelbusters.replaykit**.androidlibfolder (If exists)
4. Import the new update

### Release Notes

{% content-ref url="/pages/n1MDV4a6QQhEU7qM4zhf" %}
[2.4.2](/release-notes/2.4.2)
{% endcontent-ref %}


# 2.4.1

### Uninstall before updating

1. Delete Assets/Plugins/VoxelBusters/**CoreLibrary** folder
2. Delete Assets/Plugins/VoxelBusters/**ScreenRecorderKit** folder
3. Delete Assets/Plugins/Android/**com.voxelbusters.screenrecorderkit**.androidlib or **com.voxelbusters.replaykit**.androidlibfolder (If exists)
4. Import the new update

### Release Notes

{% content-ref url="/pages/JhIialKIXcTywn3NzkC2" %}
[2.4.1](/release-notes/2.4.1)
{% endcontent-ref %}


# 2.4.0

### Uninstall before updating

1. Delete Assets/Plugins/VoxelBusters/**CoreLibrary** folder
2. Delete Assets/Plugins/VoxelBusters/**ScreenRecorderKit** folder
3. Delete Assets/Plugins/Android/**com.voxelbusters.screenrecorderkit**.androidlib or **com.voxelbusters.replaykit**.androidlibfolder (If exists)
4. Import the new update

### Release Notes

{% content-ref url="/pages/WDhtczXo7iEM305uYO7g" %}
[2.4.0](/release-notes/2.4.0)
{% endcontent-ref %}


# 2.3.1

### Uninstall before updating

1. Delete Assets/Plugins/VoxelBusters/**CoreLibrary** folder
2. Delete Assets/Plugins/VoxelBusters/**ScreenRecorderKit** folder
3. Delete Assets/Plugins/Android/**com.voxelbusters.screenrecorderkit**.androidlib or **com.voxelbusters.replaykit**.androidlibfolder

### Release Notes

{% content-ref url="/pages/beMBf1auXUdJwoBbBZOQ" %}
[2.3.1](/release-notes/2.3.1)
{% endcontent-ref %}


# 2.3.0

### Uninstall before updating

1. Delete Assets/Plugins/VoxelBusters/**CoreLibrary** folder
2. Delete Assets/Plugins/VoxelBusters/**ScreenRecorderKit** folder
3. Delete Assets/Plugins/Android/**com.voxelbusters.screenrecorderkit**.androidlib or **com.voxelbusters.replaykit**.androidlibfolder

### Release Notes

{% content-ref url="/pages/93Qrzwj73cYg2MAqEc5d" %}
[2.2.0](/release-notes/2.2.0)
{% endcontent-ref %}


# 2.2.0

### Uninstall before updating

1. Delete Assets/Plugins/VoxelBusters/**CoreLibrary** folder
2. Delete Assets/Plugins/VoxelBusters/**ScreenRecorderKit** folder
3. Delete Assets/Plugins/Android/**com.voxelbusters.replaykit**.androidlib folder (if exists)

### Release Notes

{% content-ref url="/pages/93Qrzwj73cYg2MAqEc5d" %}
[2.2.0](/release-notes/2.2.0)
{% endcontent-ref %}


# 2.1.0

### Uninstall before updating

1. Delete Assets/Plugins/VoxelBusters/**CoreLibrary** folder
2. Delete Assets/Plugins/VoxelBusters/**ScreenRecorderKit** folder
3. Delete Assets/Plugins/Android/**com.voxelbusters.replaykit**.androidlib folder
4. Delete Assets/Resources/**ScreenRecorderKitSettings** (if any)

### Release Notes

{% content-ref url="/pages/sJ0bcdBXbj3mm5VnEIWW" %}
[2.1.0](/release-notes/2.1.0)
{% endcontent-ref %}


# 2.0.0

### Uninstall before updating

1. **Delete** Assets/Plugins/VoxelBusters/CoreLibrary folder
2. **Delete** Assets/Plugins/VoxelBusters/CrossPlatformReplayKit folder
3. Delete Assets/Plugins/Android/com.voxelbusters.replaykit.androidlib folder
4. Delete Assets/Resources/CrossPlatformReplayKitSettings (if any)

Check [here](/version-2-vs-version-1) for differences between V2 and V2.

### Release Notes

{% content-ref url="/pages/y15mFUYVCSP2NqYMGcOy" %}
[2.0.0](/release-notes/2.0.0)
{% endcontent-ref %}


# 1.7.0

### Uninstall before updating

1. Delete Assets/Plugins/VoxelBusters folder
2. Delete Assets/Plugins/Android/com.voxelbusters.replaykit.androidlib folder
3. Delete Assets/Resources/CrossPlatformReplayKitSettings (if any)

### [Release Notes](/release-notes/1.7.0) &#x20;


# 1.6

1. Uninstall from Top menu bar Window -> Voxel Busters -> Cross Platform Replay Kit -> Uninstall
2. Delete Assets/PlayServicesResolver folder
3. Import the new update
4. Click on save in ReplayKitSettings inspector
5. \[Optional] Resolve libraries from Assets -> External Dependency Manager -> Android -> Force Resolve


# 1.5

1. Uninstall from Top menu bar Window -> Voxel Busters -> Cross Platform Replay Kit -> Uninstall
2. Delete Assets/PlayServicesResolver folder
3. Import the new update
4. Click on save in ReplayKitSettings inspector
5. \[Optional] Resolve libraries from Assets -> External Dependency Manager -> Android -> Force Resolve


# 2.4.2

* Updated to latest core library to be compatible with other Voxel Busters Plugins


# 2.4.1

* Fixed shell script permissions issue for created xcode project which copies frameworks
* Updated to latest core library to be compatible with other Voxel Busters Plugins


# 2.4.0

* Fixed sharing recorded video with text or message on iOS
* Updated to latest core library to be compatible with other Voxel Busters Plugins


# 2.3.1

* Fixed compilation issue on iOS
* Fixed texture flip issue on certain graphics pipelines for gif recorder


# 2.3.0

* Updated Core Library to align with other VB plugins
* Proper memory cleanup on calling Flush method
* Clearing old cached files on every prepare call
* Updated EDMU to 1.2.183


# 2.2.0

* Updated Core Library to align with other VB plugins
* Bug fix for android devices below API 30
* Made default recording selection to app only for devices >= API 34 on Android
* Updated EDMU to 1.2.180


# 2.1.0

* Updated Core Library to align with other VB plugins


# 2.0.0

* Plugin now supports both Gif and Video recording with single API.
* \[Breaking] Changed the complete api to facilitate easy workflow. Check here for [differences](/version-2-vs-version-1).


# 1.7.0

* Made plugin compatible with other VB products
* Now Android library uses .aar instead of jar files
* Following a standard structure for all of our plugins now to make them compatible
* All events prototypes got changed to accomodate result object
* \[Breaking Change] Changed event prototypes to accomodate result data type (standardized callback results)

```
From
private  void  DidInitialise(ReplayKitInitialisationState  state,  string  message)  
to
private  void  DidInitialise(InitialiseCompleteResult result, Error error)  
```

```
From
private void DidRecordingStateChangeEvent(ReplayKitRecordingState state, string error)
to
private void DidRecordingStateChangeEvent(RecordingStateChangeResult result, Error error)

```


# 1.6

* Added PrepareRecording method for fetching the permissions ahead
* Fixed toast visibility for errors in non-development mode
* Included latest external dependency manager (1.2.164)


# 1.5

* Deprecated StartRecording(bool enableMicrophone) method&#x20;
* Added SetMicrophoneStatus(bool enable) method&#x20;
* Added QUALITY\_MATCH\_SCREEN\_SIZE for Android&#x20;
* Added callback in StopRecording to get the video path directly&#x20;
* Enabled API 29 by default Made compatible with all unity versions (includes 2020)


# 1.4

* Android Q support (Please enable it from settings)
* Screen permission on Android is cached now and will be shown once per launch
* \[Bug Fix] Fixed saving video to gallery
* \[Bug Fix] Fixed sound issues which are not getting deallocated earlier.


# 1.3

* Get Preview File Path
* Save Preview to gallery
* Share Recorded preview
* \[Android] Added option to enable external storage permission for saving to gallery on android
* \[Android] Removed external storage option as now we allow save to gallery API
* \[Android] AndroidX support


# 1.0

* Record Screen
* Share Recorded Video
* Single API for iOS & Android


