示例#1
0
        protected override void OnNewIntent(Intent intent)
        {
            base.OnNewIntent(intent);

            string notification = intent.GetStringExtra("notification");

            if (notification == "measurement")
            {
                Bundle bundle = new Bundle();
                bundle.PutInt("id", intent.GetIntExtra("id", 0));
                bundle.PutInt("type", intent.GetIntExtra("type", 0));
                addMeasurementFragment.Arguments = bundle;
                ReplaceFragment(addMeasurementFragment);
            }
            else if (notification == "visit" || notification == "medicine")
            {
                EventFromNotificationFragment eventFragment = new EventFromNotificationFragment();
                Bundle bundle = new Bundle();
                bundle.PutInt("id", intent.GetIntExtra("id", 0));
                eventFragment.Arguments = bundle;
                ReplaceFragment(eventFragment);
            }
        }