показать активность после уведомления Android
Я пытаюсь открыть действие после получения уведомления PUSH.
Я получаю уведомление, но когда я выбираю его, ничего не происходит!
Трассировка проблемы:
W/InputMethodManagerService(771): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@438ae618 attribute=null, token = android.os.BinderProxy@4319aab8
Вот мой код
public class GCMIntentService extends IntentService {
private static final int NOTIF_ALERTA_ID = 1;
public GCMIntentService() {
super("GCMIntentService");
}
@Override
protected void onHandleIntent(Intent intent)
{
GoogleCloudMessaging gcm = GoogleCloudMessaging.getInstance(this);
String messageType = gcm.getMessageType(intent);
Bundle extras = intent.getExtras();
if (!extras.isEmpty())
{
if (GoogleCloudMessaging.MESSAGE_TYPE_MESSAGE.equals(messageType))
{
mostrarNotification(extras.getString("message"));
}
}
GCMBroadcastReceiver.completeWakefulIntent(intent);
}
private void mostrarNotification(String msg)
{
NotificationManager mNotificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
Intent notIntent = new Intent(this, OpenByNotificationActivity.class);
PendingIntent contIntent = PendingIntent.getActivity(this, 1, notIntent, 0);
NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(this)
.setSmallIcon(android.R.drawable.stat_sys_warning)
.setContentTitle("Notificación AppMovil")
.setContentText(msg)
.setContentIntent(contIntent);
mNotificationManager.notify(NOTIF_ALERTA_ID, mBuilder.build());
}
и я поместил свою активность в манифест
<activity android:name="es.blabla.appmovil.activity.OpenByNotificationActivity" >
</activity>
Где ошибка ???
Спасибо всем!!
Редактировать:
Исправлена добавлениеandroid:exported="true"
моей деятельности в Манифесте