谷歌包强制不获取推广码

This commit is contained in:
18142669586 2022-10-21 13:23:16 +08:00
parent be735d9ca6
commit 11aeb95fd7
3 changed files with 10 additions and 6 deletions

View File

@ -5,9 +5,7 @@ import android.os.Handler;
import android.os.Looper;
import android.util.Log;
import android.widget.Toast;
import com.yunbao.common.utils.FileUtil;
import java.io.File;
import java.io.PrintWriter;
import java.io.StringWriter;

View File

@ -157,7 +157,12 @@ public class CustomMessageReceiver extends PushMessageReceiver {
// 设置通知的点击行为这里启动一个 Activity
Intent intent = new Intent(context, MainActivity.class);
intent.setFlags(FLAG_ACTIVITY_CLEAR_TOP);
PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, intent, 0);
PendingIntent pendingIntent;
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.S) {
pendingIntent = PendingIntent.getActivity(context, 0, intent, PendingIntent.FLAG_IMMUTABLE);
} else {
pendingIntent = PendingIntent.getActivity(context, 0, intent, PendingIntent.FLAG_ONE_SHOT);
}
String channelId = createNotificationChannel(context, "my_channel_ID", "my_channel_NAME", NotificationManager.IMPORTANCE_HIGH);
// 构建 remoteView
RemoteViews remoteView = new RemoteViews(context.getPackageName(), R.layout.notification_message);

View File

@ -122,7 +122,7 @@ public class EntryActivity extends AppCompatActivity {
private TwitterLoginButton tt_login_button;
public static Activity activity;
private static String mLoginType = Constants.MOB_PHONE;//登录方式
private String mPromoCode = "";//推广码
public String mPromoCode = "";//推广码
private String mUuidDevice = "";//手机唯一标识符
private static boolean mFirstLogin;//是否是第一次登录
private static boolean mShowInvite;//显示邀请码弹窗
@ -672,8 +672,9 @@ public class EntryActivity extends AppCompatActivity {
*/
private void loginBuyThird(LoginData data) {
mLoginType = data.getType();
if(CommonAppConfig.IS_GOOGLE_PLAY==true) {
mPromoCode = "";
}
MainHttpUtil.loginByThird(data.getOpenID(), mPromoCode, mUuidDevice, data.getNickName(), data.getAvatar(), data.getType(), new HttpCallback() {
@Override
public void onSuccess(int code, String msg, String[] info) {