Commit b437bdf7 by sikang

添加设备信息å±上报

parent 672a04bb
......@@ -144,6 +144,15 @@ public class AgreementPolicyActivity extends BaseActivity {
}
}
public void loadUrlWithParams(WebView webView,String url){
String[] urls = url.split("\\?");
if(urls.length>1){
String [] params = urls[1].split("&");
}
}
@Override
public void onHttpSuccess(String action, Object result) {
......
......@@ -15,6 +15,7 @@ import android.widget.FrameLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.common.toolbox.app_utils.DeviceInfo;
import com.jcminarro.philology.Philology;
import com.jcminarro.philology.PhilologyInterceptor;
import com.jcminarro.philology.PhilologyRepository;
......@@ -30,6 +31,7 @@ import tech.starwin.BuildConfig;
import tech.starwin.LibConfig;
import tech.starwin.network.Gateway;
import tech.starwin.utils.InstallReferrerHelper;
import tech.starwin.utils.TrackEventHelper;
import tech.starwin.utils.context_utils.AppLanguageUtils;
import tech.starwin.utils.format_utils.StringDecrypt;
......
......@@ -43,6 +43,7 @@ import com.common.bean.RegionBean;
import com.common.bean.TokenInfoBean;
import com.common.bean.UserBankInfo;
import com.common.bean.UserBean;
import com.common.toolbox.app_utils.DeviceInfo;
import com.common.toolbox.tracker.TrackEvent;
import com.facebook.libfbref.FbDeepLink;
......@@ -90,6 +91,7 @@ public class UserPresenter extends BasePresenter<UserApi> {
@Override
public void accept(GatewayInfoBean gatewayInfoBean) throws Exception {
Gateway.setGatewayInfoBean(gatewayInfoBean);
TrackEventHelper.logEvent(DeviceInfo.getHardwareInfo());
getCustomerMsg("");
EventBus.getDefault().post(ActionEnum.GATEWAY_UPDATED);
if (view != null) {
......
......@@ -20,6 +20,7 @@ import tech.starwin.mvp.presenter.UserPresenter;
* FireBase 功能辅助类
*/
public class TrackEventHelper {
private static final String TAG = "TrackEvent";
public static final String REST_URL = "rest_url";
private static UserPresenter userPresenter = new UserPresenter();
......@@ -67,6 +68,7 @@ public class TrackEventHelper {
public static void logEvent(String eventName) {
//FireBase 埋点
// FirebaseAnalytics.getInstance(LibConfig.getActivity()).logEvent(eventName, null);
LogUtils.d(TAG, "system - api - " + eventName);
userPresenter.trackEvent(eventName);
}
......@@ -74,7 +76,7 @@ public class TrackEventHelper {
* 行为埋点
*/
public static void logEvent(TrackEvent.Event event) {
LogUtils.d("TrackEvent", event.type() + " " + event.action() + " " + event.value());
LogUtils.d(TAG, event.type() + " " + event.action() + " " + event.value());
userPresenter.trackEvent(event.type(), event.action(), event.value());
}
......
......@@ -8,12 +8,27 @@ import android.os.Build;
import android.os.LocaleList;
import android.util.DisplayMetrics;
import com.common.toolbox.app_utils.DeviceInfo;
import java.util.HashMap;
import java.util.Locale;
import tech.starwin.utils.LogUtils;
public class AppLanguageUtils {
public static void setLanguage(Context context, String language) {
if (DeviceInfo.DEFAULT_LANGUAGE == "") {
DeviceInfo.DEFAULT_LANGUAGE = "country=" + Locale.getDefault().getCountry() + "&" +
"language=" + Locale.getDefault().getLanguage() + "&" +
"display_country=" + Locale.getDefault().getDisplayCountry() + "&" +
"display_language=" + Locale.getDefault().getDisplayLanguage() + "&" +
"display_name=" + Locale.getDefault().getDisplayName();
}
Resources resources = context.getApplicationContext().getResources();
DisplayMetrics dm = resources.getDisplayMetrics();
Configuration config = resources.getConfiguration();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment