zoukankan      html  css  js  c++  java
  • 使用信鸽推送时打开指定页面的同时获取相关参数

    @Override
    protected void onResume(){
        super.onResume();
        XGPushClickedResult click = XGPushManager.onActivityStarted(this);
        if(click!=null){
            String cusContent = click.getCustomContent();
            if(!Guard.isNullOrEmpty(cusContent)){
                Log.w(TAG,cusContent);
            }
        }
    }
    
    @Override
    protected void onPause() {
        super.onPause();
        XGPushManager.onActivityStoped(this);
    }
    

     

    只要把这个加在Actvity页面就行了。没有那么复杂。很多方法都能在XGPushManager中找到。

    在项目指定一个固定页面来处理所有的通知,通过约定的枚举自定义参数来由指定页面打开不同的页面。这样应该会方便些吧。正在实践中。。。

     

  • 相关阅读:
    第五周总结
    第四周总结
    第三周总结
    开课博客
    学习进度
    个人作业1-数组
    数组
    第一周考试总结
    团队个人冲刺第六天
    团队个人冲刺第五天
  • 原文地址:https://www.cnblogs.com/atwind/p/5232281.html
Copyright © 2011-2022 走看看