0

I have tried to implement the code in monodroid for this question here Android: install .apk programmatically, which deals with how to implement what I want on Android with Java. I want to do it with monodroid.

Anyone any idea how I keep getting an error...

File apkFile = new File({path to APK});
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(Uri.fromFile(apkFile), "application/vnd.android.package-archive");
startActivity(intent);
Community
  • 1
  • 1

1 Answers1

0

For this line: intent.setDataAndType(Uri.fromFile(apkFile), "application/vnd.android.package-archive");

Did you try: intent.setDataAndType(Uri.fromFile(new Java.IO.File("pathToAPK"), "application/vnd.android.package-archive");

im_not_josh
  • 483
  • 3
  • 10