title: Performance considerations when getting license information for WP app
body: <h1>Introduction</h1>
  <p>I have a <code>Windows Phone 8.1 Silverlight</code> (WP8.1 SL) based app in the store. Some users complain about performance issues when they have a bad network connection. I searched a bit and came up with the idea that it might be related to <code>new LicenseInformation()</code> that gives me the information of whether the app is running in Trial mode or not. The question is, whether this requires network information or not, and whether <code>CurrentApp.LicenseInformation</code> is a suitable replacement for a WP8.1 SL app.</p>
  <h1>Background and What I did so far</h1>
  <p>In general, the app does not need a network connection (no data to load, no advertisements, ...). To confirm that I used Fiddler to watch over the network sent by my phone. The result was that no network traffic is generated. However, the problem still persists.</p>
  <p>After a lot of research and playing around I got the feeling that this issue might be related to the code part that checks on whether the app is in trial mode or not. I use the following code to check that.</p>
  <pre><code>var li = new LicenseInformation();
  if (li.IsTrial()) {
      ...
  }
  </code></pre>
  <p>I do this a couple of times during startup. So in case <code>IsTrial()</code> requires a network connection this could be the actual issue when there is only a bad connection available. But again, I couldn't find anything using Fiddler. The documentation (<a href="https://msdn.microsoft.com/en-us/library/windows/apps/windows.applicationmodel.store.licenseinformation.aspx" rel="nofollow noreferrer">see here</a>) for <code>LicenseInformation</code> does not mention whether a network connection is required or not.</p>
  <p>Searching around I found that there is an updated interface available for both WP 8.1 SL and also W10M UWP.</p>
  <pre><code>var li = CurrentApp.LicenseInformation;
  if (li.IsTrial) {
      ...
  }
  </code></pre>
  <p>Its documentation clearly states that there is no network connection required for that (<a href="https://msdn.microsoft.com/en-us/library/windows/apps/windows.applicationmodel.store.currentapp.licenseinformation.aspx" rel="nofollow noreferrer">see here</a>).</p>
  <p>Even though the docs say that <code>CurrentApp.LicenseInformation</code> is also available on WP8 I also found some references that say that you only get a reliable answer for the IsTrial-question when using <code>new LicenseInformation()</code> (e.g. <a href="https://github.com/markedup-mobi/CurrentAppProxy/blob/master/src/CurrentAppProxy.WinRT/CurrentAppProxy.cs" rel="nofollow noreferrer">here</a>).</p>
  <h1>Actual Questions</h1>
  <ul>
  <li>Is <code>new LicenseInformation()</code> required on WP8.1 SL, or can I use <code>CurrentApp.LicenseInformation</code> as well?</li>
  <li>Does <code>new LicenseInformation()</code> require a network connection compared to <code>CurrentApp.LicenseInformation</code>?</li>
  </ul>