Open a View of the Cross Platform project, from the Android Project Notification XAMARIN

0

I have a notification that I need to open a view that I have in the shared project, but the notification is processed in Android, then I have the click event of the notification in android and from there I have to open a view as I show in the case 3, but I do not know how to indicate it or how to carry out the process. I appreciate your help

 [BroadcastReceiver(Enabled = true)]
[IntentFilter(new[] { "ACTION_0", "ACTION_1", "ACTION_2", "ACTION_3", "ACTION_4" })]
public class NotificationReceiver : BroadcastReceiver
{
    public override void OnReceive(Context context, Intent intent)
    {
        try
        {
            string action = intent.Action;

            int NotId = intent.GetIntExtra("NotId", 1);
            string tipo = intent.GetStringExtra("TIPO");
            string tag = intent.GetStringExtra("TAG");
            string link = intent.GetStringExtra("LINK");
            string notificationId = intent.GetStringExtra("NOTIFICATION_ID");

            switch (tipo)
            {
                case "0":
                    { 

                        break;
                    }
                case "1":
                    { //POSPONER

                        break;
                    }
                case "2":
                    { //CANCELAR
                        break;
                    }
                case "3":
                    { //Aqui quiero abrir una view de crossPlataform

                  context.StartActivity(typeof(MiViewDeCrossPlataform));

                        break;
                    }
            }

            NotificationManager manager = (NotificationManager)context.GetSystemService(Context.NotificationService);
            manager.Cancel(NotId);
        }
        catch(Exception e)
        {
            Console.Write(e.Message);
        }
    }
    
asked by Ariel Octavio D'Alfeo 17.05.2018 в 15:47
source

0 answers