WakefulBroadcastReceiver no se puede resolver en un tipo
Mi proyecto muestra un mensaje de error queWakefulBroadcastReceiver cannot be resolved to a type
. Miré hacia arriba por todas las razones posibles que se me ocurren. he puestoandroid-support-library
ygoogle play services
El camino. Incluso mi mapView funciona (si comento debajo del código) eso significagoogle play service
Se agrega correctamente al proyecto.
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);
}
}
¿Alguna idea de por qué esto da error?