title: How to open the secure settings of the android phone with my ionic 2 app?
body: <p>I'm using Ionic 2 and the secureStorage plugin. The problem is that with Android, the device has to be secured with a code to use secure storage.</p>
  
  <p>In the documentation it has:</p>
  
  <pre><code>var ss;
  var _init = function () {
      ss = new cordova.plugins.SecureStorage(
          function () {
              console.log('OK');
          },
          function () {
              navigator.notification.alert(
                  'Please enable the screen lock on your device. This app cannot operate securely without it.',
                  function () {
                      ss.secureDevice(
                          function () {
                              _init();
                          },
                          function () {
                              _init();
                          }
                      );
                  },
                  'Screen lock is disabled'
              );
          },
          'my_app');
  };
  _init();
  </code></pre>
  
  <p>But I'm not using ionic 1 but ionic 2. How to call the secureDevice method?</p>
  
  <p>I do anything like: </p>
  
  <pre><code>this.secureStorage.create('myStorage')
                  .then((storage: SecureStorageObject) =&gt; {
                      storage.set('var', 'toto')
                          .then(
                          () =&gt; console.log('ok),
                          (e) =&gt; console.log('error');
                          );
                  }).catch((err) =&gt; {
                      console.error('The device is not secured');
                  })
  </code></pre>
  
  <p>I can detect in the catch that the device is not secured. But how can I add next to my console.err a call to the secureDevice method?</p>
  
  <p>The documentation: <a href="https://ionicframework.com/docs/native/secure-storage/" rel="noreferrer">https://ionicframework.com/docs/native/secure-storage/</a></p>