Android
• MainActivity ʹ Attribute Ճ
// sakenomy-schemes://ayase.com/Sheeeeeeeep?id=1
[IntentFilter(
new[]{ Intent.ActionView },
Categories = new[]{ Intent.CategoryDefault, Intent.CategoryBrowsable },
DataScheme = "sakenomy-schemes",
DataHost = "ayase.com",
DataPathPrefix = “/Sheeeeeeeep",
DataPathPattern = “*")]
public class MainActivity : FormsApplicationActivity {
protected override void OnCreate(Android.OS.Bundle savedInstanceState) {
~~~
~~~
if (Intent.Data != null &&
!string.IsNullOrEmpty(Intent.Data.EncodedPath) &&
!string.IsNullOrEmpty(Intent.Data.EncodedQuery)) {
var prefix = Intent.Data.EncodedPath;
var id = Intent.Data.GetQueryParameter("id");
if (Intent.Data.EncodedPath.Equals(“/Sheeeeeeeep”) {
MessagingCenter.Send
(Xamarin.Forms.Application.Current as NSake.Core.App, "Ayase", id);
}
}
}