public unsafe WearableNotificationWithVoice(global::Android.Support.V4.App.NotificationCompat.Builder p0, int p1, int p2, int p3, int p4) : base(IntPtr.Zero, JniHandleOwnership.DoNotTransfer) { if (((global::Java.Lang.Object) this).Handle != IntPtr.Zero) { return; } try { JValue *__args = stackalloc JValue [5]; __args [0] = new JValue(p0); __args [1] = new JValue(p1); __args [2] = new JValue(p2); __args [3] = new JValue(p3); __args [4] = new JValue(p4); if (((object)this).GetType() != typeof(WearableNotificationWithVoice)) { SetHandle( global::Android.Runtime.JNIEnv.StartCreateInstance(((object)this).GetType(), "(Landroid/support/v4/app/NotificationCompat$Builder;IIII)V", __args), JniHandleOwnership.TransferLocalRef); global::Android.Runtime.JNIEnv.FinishCreateInstance(((global::Java.Lang.Object) this).Handle, "(Landroid/support/v4/app/NotificationCompat$Builder;IIII)V", __args); return; } if (id_ctor_Landroid_support_v4_app_NotificationCompat_Builder_IIII == IntPtr.Zero) { id_ctor_Landroid_support_v4_app_NotificationCompat_Builder_IIII = JNIEnv.GetMethodID(class_ref, "<init>", "(Landroid/support/v4/app/NotificationCompat$Builder;IIII)V"); } SetHandle( global::Android.Runtime.JNIEnv.StartCreateInstance(class_ref, id_ctor_Landroid_support_v4_app_NotificationCompat_Builder_IIII, __args), JniHandleOwnership.TransferLocalRef); JNIEnv.FinishCreateInstance(((global::Java.Lang.Object) this).Handle, class_ref, id_ctor_Landroid_support_v4_app_NotificationCompat_Builder_IIII, __args); } finally { } }
public static void NotifySound(Context context) { /*NotificationCompat.Builder builder = new NotificationCompat.Builder(this); builder.SetSound(Notification.DEFAULT_SOUND); notificationManager.Notify(1234, builder.Build());*/ global::Android.Support.V4.App.NotificationCompat.Builder builder = new global::Android.Support.V4.App.NotificationCompat.Builder(context) .SetDefaults(1) .SetAutoCancel(true); NotificationManager notificationManager = (NotificationManager)context.GetSystemService(Context.NotificationService); notificationManager.Notify(1234, builder.Build()); }
public global::Android.Support.V4.App.NotificationCompat.Builder LocalyticsWillShowPushNotification(global::Android.Support.V4.App.NotificationCompat.Builder p0, global::LocalyticsXamarin.Android.PushCampaign p1) { var __h = WillShowPushNotification; if (__h != null) { return(__h(p0, p1)); } return(p0); }