<?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>Making NRF Connect Desktop app as standalone Electron App</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/66949/making-nrf-connect-desktop-app-as-standalone-electron-app</link><description>Hello fellow developers, 
 I&amp;#39;m developing the Bluetooth Low Energy (BLE) app with my own functions. Now I would like to pack it as a standalone Electron App, which can be started without running the nRF Connect Launcher app first. I have created the boilerplate</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 15 Oct 2020 13:55:10 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/66949/making-nrf-connect-desktop-app-as-standalone-electron-app" /><item><title>RE: Making NRF Connect Desktop app as standalone Electron App</title><link>https://devzone.nordicsemi.com/thread/275133?ContentTypeID=1</link><pubDate>Thu, 15 Oct 2020 13:55:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:669a3d8b-3781-4339-92f5-58cb69263f7d</guid><dc:creator>JONATHAN LL</dc:creator><description>&lt;p&gt;Hi ThienVu,&lt;br /&gt;&lt;br /&gt;I am a bit uncertain what you mean, could you clarify?&lt;/p&gt;
[quote user="ThienVu"]I have figured out what to do. [/quote][quote user="ThienVu"]and was successfully done during development.[/quote]
&lt;p&gt;Do these two statements mean you found a solution to the problem?&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Or&lt;/p&gt;
[quote user="ThienVu"]I cannot launch the BLE app anymore[/quote]
&lt;p&gt;In this you&amp;nbsp;reference that it will not work when packing the launcher app in and running &lt;strong&gt;npm run release&lt;/strong&gt;. Was this the intended way you planed on providing the full application or something you tried to see if it worked.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;We at Nordic try to help but some cases are a bit to specific for us to be able to provide good support.&lt;br /&gt;If you are struggling with expanding or implementing features to the&lt;a href="https://nordicsemiconductor.github.io/pc-nrfconnect-docs/"&gt; nrf connect for desktop apps&lt;/a&gt; we can be of more assistance then when building a custom stand alone app. But perhaps other in the community are able to help out.&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;Jonathan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Making NRF Connect Desktop app as standalone Electron App</title><link>https://devzone.nordicsemi.com/thread/274753?ContentTypeID=1</link><pubDate>Wed, 14 Oct 2020 02:14:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f5f0e213-a93d-44a0-9481-f0125fab0a1c</guid><dc:creator>ThienVu</dc:creator><description>&lt;p&gt;Hi Jonathan&lt;/p&gt;
&lt;p&gt;Thanks for replying.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Yes. I can confirm that my custom BLE app runs perfectly when launched from the nrf connect for desktop (launcher) app, both the launcher installed from binary and the one built from github source.&lt;/p&gt;
&lt;p&gt;Edit:&lt;br /&gt;I have figured out what to do. I am going to default the launcher app to run the BLE app that I am bundling with the launcher. However, while I was able to launch the BLE app bundled in the custom nrf connect launcher app during development, after packing the launcher app for release by running &amp;quot;npm run release&amp;quot; in the terminal, I cannot launch the BLE app anymore.&lt;/p&gt;
&lt;p&gt;What I did was to copy the packaged BLE App (tgz form) to the launcher app folder, get the path, and launch the app from that path, and was successfully done during development.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Making NRF Connect Desktop app as standalone Electron App</title><link>https://devzone.nordicsemi.com/thread/274347?ContentTypeID=1</link><pubDate>Mon, 12 Oct 2020 13:29:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2540027a-c8e1-44ce-9595-f697764fe7d7</guid><dc:creator>JONATHAN LL</dc:creator><description>&lt;p&gt;Hi ThienVu,&lt;br /&gt;&lt;br /&gt;I am no electron expert but i have a couple of questions before i can help you properly, so first to clarify does your electron&amp;nbsp;BLE app run/work successfully when the nrf connect for desktop (the launcher) app is running first?&lt;br /&gt;&lt;br /&gt;Have you seen this:&amp;nbsp;&lt;a href="https://github.com/NordicSemiconductor/pc-nrfconnect-ble"&gt;https://github.com/NordicSemiconductor/pc-nrfconnect-ble&lt;/a&gt;&amp;nbsp;and this&amp;nbsp;&lt;a href="https://github.com/NordicSemiconductor/pc-nrfconnect-launcher"&gt;https://github.com/NordicSemiconductor/pc-nrfconnect-launcher&lt;/a&gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;Jonathan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Making NRF Connect Desktop app as standalone Electron App</title><link>https://devzone.nordicsemi.com/thread/274126?ContentTypeID=1</link><pubDate>Sat, 10 Oct 2020 04:24:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cb820be3-42a9-45e5-bcc6-b1780dc9d228</guid><dc:creator>ThienVu</dc:creator><description>&lt;p&gt;Here is my code for the html and electron.js&lt;/p&gt;
&lt;p&gt;index.html&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="html"&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html&amp;gt;
&amp;lt;head&amp;gt;
    &amp;lt;meta charset=&amp;#39;UTF-8&amp;#39;/&amp;gt;
    &amp;lt;!-- &amp;lt;link rel=&amp;#39;stylesheet&amp;#39; type=&amp;#39;text/scss&amp;#39; href=&amp;#39;resources/css/styles.scss&amp;#39;&amp;gt; --&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
&amp;lt;div id=&amp;#39;webapp&amp;#39;&amp;gt;&amp;lt;/div&amp;gt;
&amp;lt;script src=&amp;quot;dist/bundle.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;electron.js&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="javascript"&gt;const electron = require(&amp;#39;electron&amp;#39;);
const app = electron.app;
const BrowserWindow = electron.BrowserWindow;

const path = require(&amp;#39;path&amp;#39;);
const url = require(&amp;#39;url&amp;#39;);
const isDev = require(&amp;#39;electron-is-dev&amp;#39;);

let mainWindow;

function createWindow() {
  mainWindow = new BrowserWindow({width: 900, height: 680});
//   mainWindow.loadURL(isDev ? &amp;#39;http://localhost:3000&amp;#39; : `file://${path.join(__dirname, &amp;#39;index.html&amp;#39;)}`);
  mainWindow.loadFile(`file://${path.join(__dirname, &amp;#39;index.html&amp;#39;)}`);
  mainWindow.on(&amp;#39;closed&amp;#39;, () =&amp;gt; mainWindow = null);
}

app.on(&amp;#39;ready&amp;#39;, createWindow);

app.on(&amp;#39;window-all-closed&amp;#39;, () =&amp;gt; {
  if (process.platform !== &amp;#39;darwin&amp;#39;) {
    app.quit();
  }
});

app.on(&amp;#39;activate&amp;#39;, () =&amp;gt; {
  if (mainWindow === null) {
    createWindow();
  }
});&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>