• 大小: 12MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-07-26
  • 语言: Java
  • 标签: mPaaS  

资源简介

这是mPaaS官方Android的demo,是需要注册企业账号才可以下载的,我现在提供给你们供学习用.

资源截图

代码片段和文件信息

package com.mpaas.demo.analytics;

import android.content.Intent;
import android.os.Bundle;
import android.os.SystemClock;
import android.support.annotation.Nullable;
import android.view.View;
import android.widget.TextView;
import android.widget.Toast;

import com.alipay.mobile.antui.basic.AUtitleBar;
import com.alipay.mobile.antui.basic.AUToast;
import com.alipay.mobile.common.logging.api.LogContext;
import com.alipay.mobile.common.logging.api.LoggerFactory;
import com.alipay.mobile.common.logging.api.behavor.Behavor;
import com.alipay.mobile.common.logging.api.behavor.BehavorID;
import com.alipay.mobile.common.logging.api.monitor.Performance;
import com.alipay.mobile.common.logging.api.monitor.PerformanceID;
import com.alipay.mobile.framework.app.ui.baseActivity;
import com.mpaas.demo.sharedres.MenuPopupWindow;
import com.mpaas.mpaasadapter.api.MPLogger;

/**
 * Created by xingcheng on 2018/7/27.
 */

public class AnalyticsActivity extends baseActivity {

    private static final String TAG = “AnalyticsActivity“;
    private String userId;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_analytics);

        // userId 这里根据不同设备生成了唯一的id,实际由业务方自定义
        userId = MPLogger.getInstance().getUserId();

        initView();
    }

    private void initView() {
        final AUtitleBar autitleBar = (AUtitleBar) findViewById(R.id.analytics_title);
        autitleBar.settitleText(getString(R.string.analytic_title) (int)getResources().getDimension(com.mpaas.demo.sharedres.R.dimen.text_size)
                 getResources().getColor(com.mpaas.demo.sharedres.R.color.title_color));
        autitleBar.getRightButtonIconView().setonclickListener(new View.onclickListener() {
            @Override
            public void onclick(View v) {
                MenuPopupWindow popupWindow = new MenuPopupWindow(AnalyticsActivity.this);
                popupWindow.showAsDropDown(autitleBar.getRightButtonIconView() 0 0);
            }
        });

        ((TextView) findViewById(R.id.user_active_tips)).setText(getResources().getString(R.string.user_active_tips userId));

        findViewById(R.id.user_active_btn).setonclickListener(new View.onclickListener() {
            @Override
            public void onclick(View v) {
                testUserActive();
            }
        });

        findViewById(R.id.behavior_log_btn).setonclickListener(new View.onclickListener() {
            @Override
            public void onclick(View v) {
                testBehaviorLog();
            }
        });

        findViewById(R.id.performance_log_btn).setonclickListener(new View.onclickListener() {
            @Override
            public void onclick(View v) {
                testPerformanceLog();
            }
        });

        findViewById(R.id.crash_log_btn).setonclickListener(new View.onclickListener() {
            @Override
            public void o

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2018-10-30 06:43  mpaas_demo_android-master-f5ed434736b5e8c28ba90121c3c5037f526594ab\
     文件          71  2018-10-30 06:43  mpaas_demo_android-master-f5ed434736b5e8c28ba90121c3c5037f526594ab\.gitignore
     目录           0  2018-10-30 06:43  mpaas_demo_android-master-f5ed434736b5e8c28ba90121c3c5037f526594ab\Analytics\
     文件         585  2018-10-30 06:43  mpaas_demo_android-master-f5ed434736b5e8c28ba90121c3c5037f526594ab\Analytics\.gitignore
     目录           0  2018-10-30 06:43  mpaas_demo_android-master-f5ed434736b5e8c28ba90121c3c5037f526594ab\Analytics\api\
     文件           7  2018-10-30 06:43  mpaas_demo_android-master-f5ed434736b5e8c28ba90121c3c5037f526594ab\Analytics\api\.gitignore
     文件         648  2018-10-30 06:43  mpaas_demo_android-master-f5ed434736b5e8c28ba90121c3c5037f526594ab\Analytics\api\build.gradle
     文件         669  2018-10-30 06:43  mpaas_demo_android-master-f5ed434736b5e8c28ba90121c3c5037f526594ab\Analytics\api\proguard-rules.pro
     目录           0  2018-10-30 06:43  mpaas_demo_android-master-f5ed434736b5e8c28ba90121c3c5037f526594ab\Analytics\api\src\
     目录           0  2018-10-30 06:43  mpaas_demo_android-master-f5ed434736b5e8c28ba90121c3c5037f526594ab\Analytics\api\src\main\
     文件         235  2018-10-30 06:43  mpaas_demo_android-master-f5ed434736b5e8c28ba90121c3c5037f526594ab\Analytics\api\src\main\AndroidManifest.xml
     目录           0  2018-10-30 06:43  mpaas_demo_android-master-f5ed434736b5e8c28ba90121c3c5037f526594ab\Analytics\api\src\main\res\
     目录           0  2018-10-30 06:43  mpaas_demo_android-master-f5ed434736b5e8c28ba90121c3c5037f526594ab\Analytics\api\src\main\res\values\
     文件          24  2018-10-30 06:43  mpaas_demo_android-master-f5ed434736b5e8c28ba90121c3c5037f526594ab\Analytics\api\src\main\res\values\strings.xml
     目录           0  2018-10-30 06:43  mpaas_demo_android-master-f5ed434736b5e8c28ba90121c3c5037f526594ab\Analytics\app\
     文件           7  2018-10-30 06:43  mpaas_demo_android-master-f5ed434736b5e8c28ba90121c3c5037f526594ab\Analytics\app\.gitignore
     文件        1690  2018-10-30 06:43  mpaas_demo_android-master-f5ed434736b5e8c28ba90121c3c5037f526594ab\Analytics\app\build.gradle
     文件         204  2018-10-30 06:43  mpaas_demo_android-master-f5ed434736b5e8c28ba90121c3c5037f526594ab\Analytics\app\metainfo.xml
     文件         669  2018-10-30 06:43  mpaas_demo_android-master-f5ed434736b5e8c28ba90121c3c5037f526594ab\Analytics\app\proguard-rules.pro
     目录           0  2018-10-30 06:43  mpaas_demo_android-master-f5ed434736b5e8c28ba90121c3c5037f526594ab\Analytics\app\src\
     目录           0  2018-10-30 06:43  mpaas_demo_android-master-f5ed434736b5e8c28ba90121c3c5037f526594ab\Analytics\app\src\main\
     文件         309  2018-10-30 06:43  mpaas_demo_android-master-f5ed434736b5e8c28ba90121c3c5037f526594ab\Analytics\app\src\main\AndroidManifest.xml
     目录           0  2018-10-30 06:43  mpaas_demo_android-master-f5ed434736b5e8c28ba90121c3c5037f526594ab\Analytics\app\src\main\java\
     目录           0  2018-10-30 06:43  mpaas_demo_android-master-f5ed434736b5e8c28ba90121c3c5037f526594ab\Analytics\app\src\main\java\com\
     目录           0  2018-10-30 06:43  mpaas_demo_android-master-f5ed434736b5e8c28ba90121c3c5037f526594ab\Analytics\app\src\main\java\com\mpaas\
     目录           0  2018-10-30 06:43  mpaas_demo_android-master-f5ed434736b5e8c28ba90121c3c5037f526594ab\Analytics\app\src\main\java\com\mpaas\demo\
     目录           0  2018-10-30 06:43  mpaas_demo_android-master-f5ed434736b5e8c28ba90121c3c5037f526594ab\Analytics\app\src\main\java\com\mpaas\demo\analytics\
     文件        7411  2018-10-30 06:43  mpaas_demo_android-master-f5ed434736b5e8c28ba90121c3c5037f526594ab\Analytics\app\src\main\java\com\mpaas\demo\analytics\AnalyticsActivity.java
     文件         928  2018-10-30 06:43  mpaas_demo_android-master-f5ed434736b5e8c28ba90121c3c5037f526594ab\Analytics\app\src\main\java\com\mpaas\demo\analytics\AnalyticsMicroApp.java
     文件        2293  2018-10-30 06:43  mpaas_demo_android-master-f5ed434736b5e8c28ba90121c3c5037f526594ab\Analytics\app\src\main\java\com\mpaas\demo\analytics\AutomationActivity.java
     目录           0  2018-10-30 06:43  mpaas_demo_android-master-f5ed434736b5e8c28ba90121c3c5037f526594ab\Analytics\app\src\main\java\com\mpaas\demo\analytics\fragment\
............此处省略1525个文件信息

评论

共有 条评论

相关资源