# build Pulse in unity Android scripting backend il2cpp

**URL:** https://discourse.kitware.com/t/build-pulse-in-unity-android-scripting-backend-il2cpp/739
**Category:** Pulse Physiology Engine
**Created:** [November 25, 2021, 10:48pm UTC](https://discourse.kitware.com/t/build-pulse-in-unity-android-scripting-backend-il2cpp/739 "2021-11-25T22:48:35Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![Omar\_Flayyih](https://discourse.kitware.com/user_avatar/discourse.kitware.com/omar_flayyih/32/479_2.png) [@Omar\_Flayyih](https://discourse.kitware.com/u/Omar_Flayyih)
#### Post date: [November 25, 2021, 10:48pm UTC](https://discourse.kitware.com/t/build-pulse-in-unity-android-scripting-backend-il2cpp/739/1 "2021-11-25T22:48:35Z")

</div>

Dear All,

I’m trying to build Pulse in the scripting backend “IL2CPP” unfortunately it doesn’t work as shown in the image.

 ![Screenshot_20211125-233834_Puls_1](https://discourse.kitware.com/uploads/default/original/1X/43ddb1ade45d518e81ee0eed252d8c2d6f373123.jpeg)

Can you help me with that, thanks in advance 🙂

---

<div class="post-metadata">

### Author: ![abray](https://discourse.kitware.com/user_avatar/discourse.kitware.com/abray/32/12_2.png) [@abray](https://discourse.kitware.com/u/abray)
#### Post date: [November 25, 2021, 10:53pm UTC](https://discourse.kitware.com/t/build-pulse-in-unity-android-scripting-backend-il2cpp/739/2 "2021-11-25T22:53:56Z")

</div>

Hi Omar,

Are you working with Android 64 or 32 bit?

---

<div class="post-metadata">

### Author: ![Omar\_Flayyih](https://discourse.kitware.com/user_avatar/discourse.kitware.com/omar_flayyih/32/479_2.png) [@Omar\_Flayyih](https://discourse.kitware.com/u/Omar_Flayyih)
#### Post date: [November 25, 2021, 11:04pm UTC](https://discourse.kitware.com/t/build-pulse-in-unity-android-scripting-backend-il2cpp/739/4 "2021-11-25T23:04:55Z")

</div>

Hi abray,

I am currently working on 32 bit.

---

<div class="post-metadata">

### Author: ![abray](https://discourse.kitware.com/user_avatar/discourse.kitware.com/abray/32/12_2.png) [@abray](https://discourse.kitware.com/u/abray)
#### Post date: [November 25, 2021, 11:06pm UTC](https://discourse.kitware.com/t/build-pulse-in-unity-android-scripting-backend-il2cpp/739/5 "2021-11-25T23:06:02Z")

</div>

What device is that?  
Have you checked out the logs?

> **[Unity - Manual: Log files](https://docs.unity3d.com/Manual/LogFiles.html)**

---

<div class="post-metadata">

### Author: ![Omar\_Flayyih](https://discourse.kitware.com/user_avatar/discourse.kitware.com/omar_flayyih/32/479_2.png) [@Omar\_Flayyih](https://discourse.kitware.com/u/Omar_Flayyih)
#### Post date: [November 25, 2021, 11:14pm UTC](https://discourse.kitware.com/t/build-pulse-in-unity-android-scripting-backend-il2cpp/739/6 "2021-11-25T23:14:50Z")

</div>

Dear Abray,

I checked the logs and everything is fine, the problem is that pulse works in Mono scripting backend, not in IL2CPP. I read the files associated with the extension and it turned out that there is an XML file I added but it does not work as in the picture.

my Unity version is 2020.3

The app is android

---

<div class="post-metadata">

### Author: ![abray](https://discourse.kitware.com/user_avatar/discourse.kitware.com/abray/32/12_2.png) [@abray](https://discourse.kitware.com/u/abray)
#### Post date: [November 25, 2021, 11:55pm UTC](https://discourse.kitware.com/t/build-pulse-in-unity-android-scripting-backend-il2cpp/739/7 "2021-11-25T23:55:05Z")

</div>

Is that screen shot from the editor from windows?

Have you seen this?

[https://gitlab.kitware.com/physiology/unity#il2cpp-build-support](https://gitlab.kitware.com/physiology/unity#il2cpp-build-support)

---

<div class="post-metadata">

### Author: ![Omar\_Flayyih](https://discourse.kitware.com/user_avatar/discourse.kitware.com/omar_flayyih/32/479_2.png) [@Omar\_Flayyih](https://discourse.kitware.com/u/Omar_Flayyih)
#### Post date: [November 26, 2021, 9:34am UTC](https://discourse.kitware.com/t/build-pulse-in-unity-android-scripting-backend-il2cpp/739/8 "2021-11-26T09:34:08Z")

</div>

The screenshot is taken from the application and not from the windows.

and for the link that you mention it “IL2CPP Build Support”, the XML code I have done it before but still not working.

So can you give an example as unitypackage that Includes the XML file with the ability to export the android app via IL2CPP scripting backend? it will help me a lot especially in augmented reality applications.

---

<div class="post-metadata">

### Author: ![abray](https://discourse.kitware.com/user_avatar/discourse.kitware.com/abray/32/12_2.png) [@abray](https://discourse.kitware.com/u/abray)
#### Post date: [November 26, 2021, 4:28pm UTC](https://discourse.kitware.com/t/build-pulse-in-unity-android-scripting-backend-il2cpp/739/9 "2021-11-26T16:28:19Z")

</div>

Can you try putting this in the build.xml?

```auto
<linker>
  <assembly fullname="System" preserve="all"/>
  <assembly fullname="Google.Protobuf" preserve="all"/>
  <assembly fullname="Pulse" preserve="all"/>
  <assembly fullname="Pulse.CDM" preserve="all"/>
  <assembly fullname="Pulse.cdm.bind" preserve="all"/>
  <assembly fullname="Pulse.engine.bind" preserve="all"/>
</linker>

```

I should change the casing to be more consistent…  
But I think this may keep all the proper pulse classes

---

<div class="post-metadata">

### Author: ![Omar\_Flayyih](https://discourse.kitware.com/user_avatar/discourse.kitware.com/omar_flayyih/32/479_2.png) [@Omar\_Flayyih](https://discourse.kitware.com/u/Omar_Flayyih)
#### Post date: [November 27, 2021, 10:15pm UTC](https://discourse.kitware.com/t/build-pulse-in-unity-android-scripting-backend-il2cpp/739/10 "2021-11-27T22:15:08Z")

</div>

I tried with the code but it didn’t work it still doesn’t give any pulse signals I don’t know what is the reason.

What I’m trying to do is display the heart rate monitor in augmented reality via Unity and that’s done on mobile phones Android devices as well as IOS.

Action steps: After making the augmented reality scene and activating ARcore \> download your extension via Unity \> create the “Assembly” file \> create an XML file and put it in the pulses file of the scene \> click on build settings \> player settings \> change scripting backend from Mono to il2cpp \> uncheck script engine code \> build and run \> there is no indication of pulses as in the first picture.

---

<div class="post-metadata">

### Author: ![abray](https://discourse.kitware.com/user_avatar/discourse.kitware.com/abray/32/12_2.png) [@abray](https://discourse.kitware.com/u/abray)
#### Post date: [December 1, 2021, 2:12pm UTC](https://discourse.kitware.com/t/build-pulse-in-unity-android-scripting-backend-il2cpp/739/11 "2021-12-01T14:12:03Z")

</div>

Hey Omar

This is how I test Pulse on android  
[https://gitlab.kitware.com/physiology/unity/-/wikis/android](https://gitlab.kitware.com/physiology/unity/-/wikis/android)

So I created a dummy project, and installed Pulse from the Store  
And I am getting a blank screen as well

When I build my APK from my development environment  
(Which is a Unity project where I clone our [unity repository](https://gitlab.kitware.com/physiology/unity) under the Assets folder of a project)  
I do get vitals data…

So, I am looking to see what the difference is between my fresh store based unity project and my development project…

Will keep you posted!

---

<div class="post-metadata">

### Author: ![abray](https://discourse.kitware.com/user_avatar/discourse.kitware.com/abray/32/12_2.png) [@abray](https://discourse.kitware.com/u/abray)
#### Post date: [December 1, 2021, 2:33pm UTC](https://discourse.kitware.com/t/build-pulse-in-unity-android-scripting-backend-il2cpp/739/12 "2021-12-01T14:33:49Z")

</div>

So I created a link.xml file and put it under the Assets folder of my test project with the contents

```xml
<linker>
  <assembly fullname="System" preserve="all"/>
  <assembly fullname="Google.Protobuf" preserve="all"/>
  <assembly fullname="Pulse" preserve="all"/>
</linker>

```

And that seemed to do it

The link.xml file needs to be under your project Assets folder, not the Pulse asset folder

 ![link_file](https://discourse.kitware.com/uploads/default/original/1X/13a4b0dd76988e678fcdab1a2ad833bd23f15e42.png)

---

<div class="post-metadata">

### Author: ![Omar\_Flayyih](https://discourse.kitware.com/user_avatar/discourse.kitware.com/omar_flayyih/32/479_2.png) [@Omar\_Flayyih](https://discourse.kitware.com/u/Omar_Flayyih)
#### Post date: [December 1, 2021, 9:08pm UTC](https://discourse.kitware.com/t/build-pulse-in-unity-android-scripting-backend-il2cpp/739/13 "2021-12-01T21:08:20Z")

</div>

Dear Sir,

Thank you so much for your offer… it’s working and it’s so good 🤗

 ![Screenshot_20211201-214533_Puls_1](https://discourse.kitware.com/uploads/default/original/1X/da68284a188f426800889c884f0a210a0c2b16a5.jpeg)

I download the plugin as you mention before, so I change my settings as in the pic and also attach the XML file.

 ![pulse](https://discourse.kitware.com/uploads/default/original/1X/3c2be218677a80cf5279e4c07fa3de866915c666.png)

and it’s working even in ARM64 😀, for anyone who sees this, you can check or uncheck “strip Engine code” still working, the reason that I uncheck is because of AR Scenes.

I have tested this on Samsung Galaxy S10 and S9 and it’s working.

thank you so much and happy new year 🙂
