首页 > 移动平台 > 详细

mono touch中app进入后台和被唤醒时的监听事件

时间:2014-02-18 00:55:31      阅读:533      评论:0      收藏:0      [点我收藏+]
//当前app被唤醒
            NSNotificationCenter.DefaultCenter.AddObserver (UIApplication.DidBecomeActiveNotification,(notity)=>{
                if (moviePlayerCtrl != null) {
                    //btnPlay.ReloadInputViews();
                    //btnPlay.SetNeedsDisplay();
                    string _url = CurrentCourseTag < 0 ? CourseWebUrl: RelationCourse [CurrentCourseTag, 1];
                    ResetPlayerElement (_url);
                }
            });
            //当前app进入后台
            NSNotificationCenter.DefaultCenter.AddObserver (UIApplication.DidEnterBackgroundNotification,(notity)=>{
                if (moviePlayerCtrl != null) {
                    moviePlayerCtrl.Pause ();
                    if (CCTimer != null) {
                        CCTimer.Invalidate ();
                        CCTimer.Dispose ();
                        CCTimer = null;
                    }
                    PlayerCenter.SetLocalPlaybackProEnd (CourseNumber, CT);
                }
            });

mono touch中app进入后台和被唤醒时的监听事件

原文:http://blog.csdn.net/joyhen/article/details/19325057

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!