public static JSONObject buildTitleAndScreenName(Activity activity) {
        JSONObject propertyJSON = new JSONObject();
        try {
            propertyJSON.put("$screen_name", activity.getClass().getCanonicalName());
            String activityTitle = SensorsDataUtils.getActivityTitle(activity);
            if (!TextUtils.isEmpty(activityTitle)) {
                propertyJSON.put("$title", activityTitle);
            }
        } catch (Exception ex) {
            com.sensorsdata.analytics.android.sdk.SALog.printStackTrace(ex);
            return new JSONObject();
        }
        return propertyJSON;
    }
@Test
    public void buildTitleAndScreenName() {
        TextView textView1 = new TextView(mApplication);
        textView1.setText("child1");
        SensorsDataUtilsTest.TestActivity activity = Robolectric.setupActivity(SensorsDataUtilsTest.TestActivity.class);
        SAViewUtils.buildTitleAndScreenName(activity);
    }