谷歌包强制不获取推广码
This commit is contained in:
parent
be735d9ca6
commit
11aeb95fd7
@ -5,9 +5,7 @@ import android.os.Handler;
|
|||||||
import android.os.Looper;
|
import android.os.Looper;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
import com.yunbao.common.utils.FileUtil;
|
import com.yunbao.common.utils.FileUtil;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.PrintWriter;
|
import java.io.PrintWriter;
|
||||||
import java.io.StringWriter;
|
import java.io.StringWriter;
|
||||||
|
@ -157,7 +157,12 @@ public class CustomMessageReceiver extends PushMessageReceiver {
|
|||||||
// 设置通知的点击行为:这里启动一个 Activity
|
// 设置通知的点击行为:这里启动一个 Activity
|
||||||
Intent intent = new Intent(context, MainActivity.class);
|
Intent intent = new Intent(context, MainActivity.class);
|
||||||
intent.setFlags(FLAG_ACTIVITY_CLEAR_TOP);
|
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);
|
String channelId = createNotificationChannel(context, "my_channel_ID", "my_channel_NAME", NotificationManager.IMPORTANCE_HIGH);
|
||||||
// 构建 remoteView
|
// 构建 remoteView
|
||||||
RemoteViews remoteView = new RemoteViews(context.getPackageName(), R.layout.notification_message);
|
RemoteViews remoteView = new RemoteViews(context.getPackageName(), R.layout.notification_message);
|
||||||
|
@ -122,7 +122,7 @@ public class EntryActivity extends AppCompatActivity {
|
|||||||
private TwitterLoginButton tt_login_button;
|
private TwitterLoginButton tt_login_button;
|
||||||
public static Activity activity;
|
public static Activity activity;
|
||||||
private static String mLoginType = Constants.MOB_PHONE;//登录方式
|
private static String mLoginType = Constants.MOB_PHONE;//登录方式
|
||||||
private String mPromoCode = "";//推广码
|
public String mPromoCode = "";//推广码
|
||||||
private String mUuidDevice = "";//手机唯一标识符
|
private String mUuidDevice = "";//手机唯一标识符
|
||||||
private static boolean mFirstLogin;//是否是第一次登录
|
private static boolean mFirstLogin;//是否是第一次登录
|
||||||
private static boolean mShowInvite;//显示邀请码弹窗
|
private static boolean mShowInvite;//显示邀请码弹窗
|
||||||
@ -672,8 +672,9 @@ public class EntryActivity extends AppCompatActivity {
|
|||||||
*/
|
*/
|
||||||
private void loginBuyThird(LoginData data) {
|
private void loginBuyThird(LoginData data) {
|
||||||
mLoginType = data.getType();
|
mLoginType = data.getType();
|
||||||
|
if(CommonAppConfig.IS_GOOGLE_PLAY==true) {
|
||||||
|
mPromoCode = "";
|
||||||
|
}
|
||||||
MainHttpUtil.loginByThird(data.getOpenID(), mPromoCode, mUuidDevice, data.getNickName(), data.getAvatar(), data.getType(), new HttpCallback() {
|
MainHttpUtil.loginByThird(data.getOpenID(), mPromoCode, mUuidDevice, data.getNickName(), data.getAvatar(), data.getType(), new HttpCallback() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(int code, String msg, String[] info) {
|
public void onSuccess(int code, String msg, String[] info) {
|
||||||
|
Loading…
Reference in New Issue
Block a user