public override void OnCreate()
        {
            base.OnCreate();
            PushAgent pushAgent = PushAgent.GetInstance(this);

            pushAgent.SetDebugMode(false);
            pushAgent.MessageHandler = new MyMsgHandler();
            pushAgent.Register(new MyRegister(this));
        }
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            SetContentView(Resource.Layout.Main);
            PushAgent mPushAgent = PushAgent.GetInstance(this);

            mPushAgent.Enable();
            new TaskFactory().StartNew(() =>
            {
                mPushAgent.AddAlias("15050851037", "test");
            });

            PushAgent.GetInstance(this).OnAppStart();
        }
Example #3
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            SetContentView(Resource.Layout.Main);

            recever = new MyReceiver();
            var filter = new IntentFilter();

            filter.AddAction(MainApplication.UPDATE_STATUS_ACTION);
            RegisterReceiver(recever, filter);

            PushAgent pushAgent = PushAgent.GetInstance(this);

            pushAgent.OnAppStart();
            var id = pushAgent.RegistrationId;

            if (bundle == null)
            {
                InAppMessageManager.GetInstance(this).ShowCardMessage(this, "main", new MyUmengAppMsgCloseCallback());
            }
        }
Example #4
0
    public static void Initialize()
    {
        if (isInit)
        {
            return;
        }

        AccountAgent       = new AccountAgent();
        ShareAgent         = new ShareAgent();
        PushAgent          = new PushAgent();
        StatisticsAgent    = new StatisticsAgent();
        CustomServiceAgent = new CustomServiceAgent();

        CustomServiceAgent.Init();
        AccountAgent.Init();

        if ((Application.platform == RuntimePlatform.Android &&
             (AppConfig.Instance.channel == "SSEA" || AppConfig.Instance.channel == "STW")))
        {
            PayAgent = new PayAgentGooglePlay();
        }
        else if ((Application.platform == RuntimePlatform.Android && AppConfig.Instance.isChinese == "true") ||
                 AppConfig.Instance.isJailbreak)
        {
            //安卓和越狱iOS
            if (Channel.IsTencent)
            {
                PayAgent = new PayAgentTencent();
            }
            else
            {
                PayAgent = new PayAgent();
            }
        }
        else if (Application.platform == RuntimePlatform.IPhonePlayer && !AppConfig.Instance.isJailbreak)
        {
            //PayAgent = new PayAgentIOS();
            PayAgent = new PayAgentMyIOS();
        }
        else
        {
            PayAgent = new PayAgentEditor();
        }

        string starWay = GalaSDKBaseFunction.GetAPPStartWay();

        if (starWay.Contains("lianouneedlog") && starWay.Contains("true"))
        {
            AppConfig.Instance.paySandbox = true;

            string idfa = GalaSDKBaseFunction.GetDeviceId();
            GUIUtility.systemCopyBuffer = idfa;
        }
        else
        {
            AppConfig.Instance.paySandbox = false;
        }

        Debug.LogWarning("AppConfig.Instance.paySandbox=>" + AppConfig.Instance.paySandbox);

        isInit = true;
    }
Example #5
0
        private void InitUpush()
        {
            PushAgent mPushAgent = PushAgent.GetInstance(this);

            mPushAgent.Register(new UmengRegisterCallback());
        }