1

Do you know how I can launch external application in my application ? For exemple, in my application I have a button "Launch calculator" and they open the calculator.apk (calculator.apk is not downloaded from the store)

If you have the answer for Xamarin I want too.

Thanks

maskedman
  • 31
  • 6

2 Answers2

1

This is a native feature. Maybe this plugin help you.

https://github.com/lampaa/com.lampa.startapp

0

Xamarin.Android

var intent = new Intent();
intent.SetClassName("com.android.calculator2", "com.android.calculator2.Calculator");
StartActivity(intent);

Note: This assumes that the default Android calculator is installed, some providers install their own "wiz-bang feature loaded" calculator instead of the default one from the ASOP.

Community
  • 1
  • 1
SushiHangover
  • 73,120
  • 10
  • 106
  • 165
  • Well I would like to launch my own calculator (downloaded from my application) – maskedman Sep 03 '16 at 02:02
  • @maskedman Then you would have the package and the activity (class) that you need to open, so `SetClassName` takes two arguments: `string packageName`, `string className` – SushiHangover Sep 03 '16 at 02:05
  • That is a Android specific method using an Intent to start an Activity (external app or not) within your app... You might want to look at `App Links`, there is a Nuget by Xamarin called `Rivets` that assists in cross-platform url linking: https://developer.xamarin.com/recipes/cross-platform/app-links/ https://github.com/xamarin/Rivets – SushiHangover Sep 03 '16 at 02:20