안녕하세요 ^^
Gcm 노티랑 팝업알람을 받기에 성공은했는데 아무리 수정해도 따로오네요; 팝업창은 거의 제가 원격으로(php) 실행하자마자 바로 오는데 노티는 한 10초? 정도 뒤에 옵니다; 둘다 리시버에 집어넣은상태인데; 어떻게 해야지 같이오나요?ㅠㅠ
Intent intent_ = new Intent(context, PopupActivity.class);
intent_.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_SINGLE_TOP); //이거안해주면안됨
context.startActivity(intent_);
이게 리시버에 들어있는 푸시 팝업 실행인데 이걸 GcmIntentService에 집어 넣을수도 없지 않나요??
public class GcmBroadcastReceiver extends WakefulBroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
// Explicitly specify that GcmIntentService will handle the intent.
ComponentName comp = new ComponentName(context.getPackageName(),
GcmIntentService.class.getName());
// Start the service, keeping the device awake while it is launching.
startWakefulService(context, (intent.setComponent(comp)));
setResultCode(Activity.RESULT_OK);
Intent intent_ = new Intent(context, PopupActivity.class);
intent_.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_SINGLE_TOP); //이거안해주면안됨
context.startActivity(intent_);
}}
리시버 전체 코드입니다
고수님들 알려주세요~ ㅠㅠ