Android Open Source - BaiduPush Custom Activity






From Project

Back to project page BaiduPush.

License

The source code is released under:

Apache License

If you think the Android project BaiduPush listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.baidu.push.example;
//from w  w w.ja v a  2  s.  c  o  m
import android.app.Activity;
import android.content.res.Resources;
import android.os.Bundle;

/**
 * 
 * ?????????????????activity? ??????????????????????->????????->?????????????????
 * intent:#Intent;component=com.baidu.push.example/com.baidu.push.example.
 * CustomActivity;end ?????????????????????????????CustomActivity
 * 
 * ?????rest api??sdk???????????????????????open_type?pkg_content??????????????api??
 * ?????http:
 * //developer.baidu.com/wiki/index.php?title=docs/cplat/push/faq#.E4.B8.
 * BA.E4.BD.95.E9.80.9A.E8.BF.87Server_SDK.E6
 * .8E.A8.E9.80.81.E6.88.90.E5.8A.9F.EF.BC.8CAndroid.E7.AB.AF.E5.8D.B4.E6.94.B6.E4.B8.8D.E5.88.B0.E9.80.9A.E7.9F.A5.EF.BC.9
 * F
 */
public class CustomActivity extends Activity {
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        Resources resource = this.getResources();
        String pkgName = this.getPackageName();

        setContentView(resource.getIdentifier("custom_activity", "layout",
                pkgName));
    }
}




Java Source Code List

com.baidu.push.example.CustomActivity.java
com.baidu.push.example.DemoApplication.java
com.baidu.push.example.LoginActivity.java
com.baidu.push.example.MyPushMessageReceiver.java
com.baidu.push.example.PushDemoActivity.java
com.baidu.push.example.Utils.java
info.peoce.BuildConfig.java