public async Task <JsonResult> GetMyPlan()
        {
            try
            {
                PlanesServices planService = new PlanesServices();
                if (UserLoggedIn().CodigoPlanUsuario > 0)
                {
                    Result <PlanesUsuariosDTO> result = new Result <PlanesUsuariosDTO>();
                    PlanesUsuariosDTO          myPlan = new PlanesUsuariosDTO();
                    myPlan.Consecutivo             = UserLoggedIn().CodigoPlanUsuario;
                    myPlan.CodigoIdiomaUsuarioBase = UserLoggedIn().PersonaDelUsuario.CodigoIdioma;
                    result.obj = await planService.BuscarPlanUsuario(myPlan);

                    if (result.obj != null)
                    {
                        return(Json(result, JsonRequestBehavior.AllowGet));
                    }
                    return(Json(Helper.returnErrorObj(UserLoggedIn().PersonaDelUsuario.CodigoIdioma), JsonRequestBehavior.AllowGet));
                }
                else
                {
                    Result <PlanesDTO> result = new Result <PlanesDTO>();
                    result.obj = await planService.BuscarPlanDefaultDeUnPerfil(new PlanesDTO()
                    {
                        TipoPerfil = UserLoggedIn().TipoPerfil
                    });

                    if (result.obj != null)
                    {
                        return(Json(result, JsonRequestBehavior.AllowGet));
                    }
                    return(Json(Helper.returnErrorObj(UserLoggedIn().PersonaDelUsuario.CodigoIdioma), JsonRequestBehavior.AllowGet));
                }
            }
            catch (Exception)
            {
                return(Json(Helper.returnErrorObj(UserLoggedIn().PersonaDelUsuario.CodigoIdioma), JsonRequestBehavior.AllowGet));
            }
        }
        public override async void Init(object initData)
        {
            base.Init(initData);

            try
            {
                await CargarItemsNotificaciones(0, 3);

                LastRefresh = DateTime.Now;
            }
            catch (Exception)
            {
            }

            ChatsServices.NotificacionRecibida += async(obj, evt) =>
            {
                if (evt.NotificacionRecibida != null)
                {
                    using (await _lockeable.LockAsync())
                    {
                        LastRefresh = DateTime.Now;
                        bool notificacionYaExiste = false;

                        // Verificamos que la notificacion ya existe, tomando en cuenta que el consecutivo debe ser valido para descartar las notificaciones de otros sources que no sea la tabla de Notificaciones (Como las noticias del admin)
                        if (TimeLine != null && TimeLine.Count > 0)
                        {
                            notificacionYaExiste = TimeLine.Where(x => x.ConsecutivoNotificacion == evt.NotificacionRecibida.ConsecutivoNotificacion && x.ConsecutivoNotificacion > 0).Any();
                        }

                        // Si la notificacion no existe, procedo a agregarla
                        if (!notificacionYaExiste)
                        {
                            evt.NotificacionRecibida = BuildearNotificacionesTraducidas(evt.NotificacionRecibida);
                            evt.NotificacionRecibida.EsNuevoMensaje = true;

                            Device.BeginInvokeOnMainThread(() =>
                            {
                                if (TimeLine != null)
                                {
                                    TimeLine = new ObservableRangeCollection <TimeLineNotificaciones>(new List <TimeLineNotificaciones> {
                                        evt.NotificacionRecibida
                                    });
                                }
                                else
                                {
                                    TimeLine.Insert(0, evt.NotificacionRecibida);
                                }
                            });

                            // Aumentamos el contador del Badge
                            App.InteractuarValorBadgeNotificacion(1);

                            //Set or Get the state of the Effect sounds.
                            _audioManager.EffectsOn = true;

                            //Set the volume level of the Effects from 0 to 1.
                            _audioManager.EffectsVolume = 0.4f;

                            try
                            {
                                //await _audioManager.PlaySound("notificationSound.mp3");
                                await _audioManager.PlayNotificationDefaultSound();
                            }
                            catch (Exception)
                            {
                            }

                            if (evt.NotificacionRecibida.TipoDeLaNotificacion == TipoNotificacionEnum.PlanAprobado)
                            {
                                PlanesUsuariosDTO planUsuario = new PlanesUsuariosDTO
                                {
                                    Consecutivo = App.Usuario.CodigoPlanUsuario,
                                    IdiomaBase  = App.IdiomaPersona
                                };

                                PlanesUsuariosDTO planDelUsuario = await _planService.BuscarPlanUsuario(planUsuario);

                                if (planDelUsuario != null)
                                {
                                    App.Usuario.PlanesUsuarios = planDelUsuario;
                                }
                            }
                            if (evt.NotificacionRecibida.TipoDeLaNotificacion == TipoNotificacionEnum.PersonaEliminada)
                            {
                                if (evt.NotificacionRecibida.CodigoPersonaOrigen > 0)
                                {
                                    PerfilPageModel.DispararEventoPersonaBorrada(this, evt.NotificacionRecibida.CodigoPersonaOrigen);
                                }
                            }
                        }
                    }
                }
            };

            ConnectionChanged += async(sender, args) =>
            {
                if (args.IsConnect && NecesitaRefrescar)
                {
                    try
                    {
                        await CargarItemsNotificaciones(0, 100, true, true);

                        NecesitaRefrescar = false;
                    }
                    catch (Exception)
                    {
                    }
                }

                if (!args.IsConnect)
                {
                    NecesitaRefrescar = true;
                }
            };
        }