version:1.1
fix: add:应用使用数据统计
This commit is contained in:
32
app/src/main/java/com/uiui/sn/jpush/TestActivity.java
Normal file
32
app/src/main/java/com/uiui/sn/jpush/TestActivity.java
Normal file
@@ -0,0 +1,32 @@
|
||||
package com.uiui.sn.jpush;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.ViewGroup.LayoutParams;
|
||||
import android.widget.TextView;
|
||||
|
||||
import cn.jpush.android.api.JPushInterface;
|
||||
|
||||
public class TestActivity extends Activity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
TextView tv = new TextView(this);
|
||||
tv.setText("用户自定义打开的Activity");
|
||||
Intent intent = getIntent();
|
||||
if (null != intent) {
|
||||
Bundle bundle = getIntent().getExtras();
|
||||
String title = null;
|
||||
String content = null;
|
||||
if(bundle!=null){
|
||||
title = bundle.getString(JPushInterface.EXTRA_NOTIFICATION_TITLE);
|
||||
content = bundle.getString(JPushInterface.EXTRA_ALERT);
|
||||
}
|
||||
tv.setText("Title : " + title + " " + "Content : " + content);
|
||||
}
|
||||
addContentView(tv, new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user