[mono-android] AndroidManifest - intent filter to launch app from URL

devbuzz derek at fieldmetrix.com
Mon Jan 30 21:23:48 UTC 2012


Thanks a million!!

I've been battling with this for a few hours.

Also for anyone else in the future; this is how you get any query string
parameters off the incoming link.

Add the following to your main launcher activity onCreate():

			if (Intent.Data != null)
			{

				Android.Net.Uri data = Intent.Data;
				String scheme = data.Scheme; // "http"
				String host = data.Host; // "android.devbuzz.com"
				IList<String> queryStrings = data.PathSegments;
				String first = queryStrings[0]; // "status"

				var msg = string.Format("scheme: {0} host: {1} first:{2}", scheme, host,
first);

				Toast.MakeText(this, msg, ToastLength.Long).Show();

			}


--
View this message in context: http://mono-for-android.1047100.n5.nabble.com/AndroidManifest-intent-filter-to-launch-app-from-URL-tp5441404p5442699.html
Sent from the Mono for Android mailing list archive at Nabble.com.


More information about the Monodroid mailing list