Ionic native webintent plugin BUG

Hey, I’m not sure if this is the right place to report it, so redirect me if it needed.

I’m trying to open .apk using webintent plugin on Ionic2 typescript project. I’m using Ionic native.

official webintent docs shows this example:

window.plugins.webintent.startActivity({
  action: window.plugins.webintent.ACTION_VIEW,
  url: theFile.toURL(),
  type: 'application/vnd.android.package-archive'
},
function() {},
function() {
  alert('Failed to open URL via Android Intent.');
  console.log("Failed to open URL via Android Intent. URL: " + theFile.fullPath)
}
);

options takes 3 parameters: action, url and type.

When I try to use it in project it only accepts two: action and url.

  WebIntent.startActivity({
  action: WebIntent.ACTION_VIEW,
  url: this.uri,
}).then(() => {
  alert("Success. URL: " + this.uri);
},
() => {
  alert("Failed to open URL via Android Intent. URL: " + this.uri);
  console.log("Failed to open URL via Android Intent. URL: " + this.uri)
});

If i use it like that it tries to open apk as pdf file and fails. If i add 3rd parameter it says, that it only accepts two parameters (basically).

If I go to node_modules/ionic-native/dist/plugins/webintend.d.ts and change

static startActivity(options: {
    action: any;
    url: string;
}):

to

static startActivity(options: {
    action: any;
    url: string;
    type: string;
}):

it successfully opens the .apk and tries to install it.

I’m new to ionic, so I might be missing something, but maybe it might help someone else, since I googled, but didn’t find any ionic2 “open .apk file” examples.