Open .apk file from ionic2 app

Hey,

I’ve developed table football application for our office. We really need update functionality, but I don’t want to put it in Play store, because that opens whole set of new issues, regarding safety of my web-services, since I’m not expert when dealing with web-services either.

We are using custom update on some of our projects’ native apps, so I’m trying to implement it in Ionic2. Is it possible to open .apk file (for starters, I’ll try to implement it for ios too, later), so that standard android install dialog would appear?

Thank you,.

Use FileOpener

FileOpener.open(
  path,
  'application/vnd.android.package-archive'
).then((success) => {
  console.log('success: ', success);
}, (err) => {
  console.log('err: ', err);
});
1 Like

Thanks a lot, this

application/vnd.android.package-archive

is working perfectly fine for updating an app from device files.

I guess you then also need to have the user change the security settings? To install apps via APK, right?

Yes, security settings are more important.