Diagnostic Plugin


I am using ionic 2 Diagnostic Plugin, I did not find any page describe how to use requestRuntimePermission method

I did my own implementation

Diagnostic.requestRuntimePermission().then((status) => {
if (Diagnostic.permissionStatus.GRANTED === status) {
} else {
alert(‘Allow the requested permission’);
}, (err) => {

}, Diagnostic.runtimePermission.WRITE_EXTERNAL_STORAGE);

I have two problems

  1. Property ‘runtimePermission’ does not exist on type 'typeof Diagnost
  2. Is this implementation right?

Your system information:

Cordova CLI: 6.4.0
Ionic Framework Version: 2.0.0-rc.1
Ionic CLI Version: 2.1.4
Ionic App Lib Version: 2.1.2
Ionic App Scripts Version: 0.0.36
OS: Windows 7 SP1
Node Version: v6.9.1