|
|
@@ -1,30 +1,30 @@
|
|
|
package com.atmob.flutter_umeng;
|
|
|
|
|
|
import android.content.Context;
|
|
|
+import android.util.Log;
|
|
|
+
|
|
|
import androidx.annotation.NonNull;
|
|
|
+
|
|
|
import com.atmob.channelreader.ChannelReader;
|
|
|
import com.umeng.analytics.MobclickAgent;
|
|
|
import com.umeng.commonsdk.UMConfigure;
|
|
|
+
|
|
|
import java.util.Map;
|
|
|
|
|
|
public class UmengHelper {
|
|
|
|
|
|
+ private static final String TAG = "UmengHelper";
|
|
|
|
|
|
private UmengHelper() {
|
|
|
|
|
|
}
|
|
|
|
|
|
- public static void initCommon(@NonNull Context context,String appKey) {
|
|
|
- if (BuildConfig.DEBUG) {
|
|
|
- return;
|
|
|
- }
|
|
|
- initAfterGrantedAgreement(context,appKey);
|
|
|
+ public static void initCommon(@NonNull Context context, String appKey) {
|
|
|
+ Log.d(TAG, "initCommon");
|
|
|
+ initAfterGrantedAgreement(context, appKey);
|
|
|
}
|
|
|
|
|
|
public static void initAfterGrantedAgreement(@NonNull Context context, String appKey) {
|
|
|
- if (BuildConfig.DEBUG) {
|
|
|
- return;
|
|
|
- }
|
|
|
UMConfigure.init(context, appKey, ChannelReader.getChannel(context), UMConfigure.DEVICE_TYPE_PHONE, null);//last param is PushSecretKey
|
|
|
}
|
|
|
|
|
|
@@ -35,6 +35,7 @@ public class UmengHelper {
|
|
|
* @param granted 是否同意
|
|
|
*/
|
|
|
public static void submitPolicyGrantResult(Context context, boolean granted) {
|
|
|
+ Log.d(TAG, "submitPolicyGrantResult:granted=" + granted);
|
|
|
UMConfigure.submitPolicyGrantResult(context.getApplicationContext(), granted);
|
|
|
}
|
|
|
|