<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>OTA-DFU packaged into a Unity Application</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/17288/ota-dfu-packaged-into-a-unity-application</link><description>Hi There, 
 I was wondering if anyone had any insight into whether the OTA-DFU (Android/iOS) LIbraries can be integrated into a Unity application? Is it possible to combine them into a plugin to do updates from within an application? 
 Thanks and best</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 12 May 2021 11:26:46 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/17288/ota-dfu-packaged-into-a-unity-application" /><item><title>RE: OTA-DFU packaged into a Unity Application</title><link>https://devzone.nordicsemi.com/thread/309463?ContentTypeID=1</link><pubDate>Wed, 12 May 2021 11:26:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2967e8b1-1ee1-46cb-bb35-b49937d1fd3b</guid><dc:creator>Robert Haddad</dc:creator><description>&lt;p&gt;Has anyone implemented a unity plugin for this yet? Would be great to get that.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks in advance,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Robert&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: OTA-DFU packaged into a Unity Application</title><link>https://devzone.nordicsemi.com/thread/144389?ContentTypeID=1</link><pubDate>Wed, 15 Aug 2018 21:23:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:560ad04c-c504-477b-a34d-0b9453d7ac04</guid><dc:creator>phoenixperry</dc:creator><description>&lt;p&gt;This is such a well written reply. I assume this is the same process for even just using the bluetooth stack? I am just getting started and any advice on integrating into my game is very welcome. I have a few sensors and leds and I want to be able to read them in my game and fire the LEDs from there. Thanks in advance for any other infos.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: OTA-DFU packaged into a Unity Application</title><link>https://devzone.nordicsemi.com/thread/66432?ContentTypeID=1</link><pubDate>Tue, 25 Oct 2016 08:27:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:303527b0-e2a1-4857-a972-a689fc522cd0</guid><dc:creator>Mostafa Berg</dc:creator><description>&lt;p&gt;That is a very interesting question, even though we haven&amp;#39;t done that personally, it is indeed very possible to implement it in Unity3D players.&lt;/p&gt;
&lt;p&gt;Unity3d does support communicating with native code and send messages back and forth between your GameObjects and your native classes.&lt;/p&gt;
&lt;p&gt;To do that as a plugin or by manually extending the unity player is up to you, but both are doable.&lt;/p&gt;
&lt;p&gt;take a look at iOS for example, you&amp;#39;ll basically need to set a scene that contains a game object that will handle the DFU process. it&amp;#39;ll have a method to start the DFU Process, a method to receive progress updates and a method to be called upon completion.&lt;/p&gt;
&lt;p&gt;When you build your project, you&amp;#39;ll be building an XCode project, you&amp;#39;ll then import our iOSDFULibrary &amp;#39;available as a Cocoapod or Carthage&amp;#39; into that project as you would with any other project, create your implementation class there that will handle the DFU Process and then create a static method to be called by Unity (Using the GameObject&amp;#39;s script that you created earlier), once this is fired, our library will run as normal and flash your peripheral, when setting the delegates you&amp;#39;ll simply forward the delegate messages to the unity GameObject that will be handling the callbacks.&lt;/p&gt;
&lt;p&gt;for android it&amp;#39;s pretty similar, instead you&amp;#39;ll generate an Eclipse project instead of an APK, then using the same GameObject class that you have you&amp;#39;ll import our DFU library for android from JCenter &amp;#39;no.nordicsemi.android:dfu:1.0.3&amp;#39; and add a new activity to your manifest that will be able to do similar communication from the native library to your GameObject.&lt;/p&gt;
&lt;p&gt;it is a bit of a tricky process but it is surely doable, here are some references:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://docs.unity3d.com/Manual/PluginsForIOS.html"&gt;Native iOS Plugins&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://docs.unity3d.com/Manual/PluginsForAndroid.html"&gt;Native Android Plugins&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;if you have more questions please let us know !&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>