ni me había dado cuenta de que había cambiado ese parámetro. Lo acabo de probar este es el error que me muestra cuando entro dentro de un radio de amenaza
Código:
08-31 14:58:59.423: ERROR/LocationManagerService(52): Exception in LocationWorkerHandler.handleMessage:
08-31 14:58:59.423: ERROR/LocationManagerService(52): java.lang.NullPointerException
08-31 14:58:59.423: ERROR/LocationManagerService(52): at com.android.server.LocationManagerService$ProximityListener.onLocationChanged(LocationManagerService.java:1227)
08-31 14:58:59.423: ERROR/LocationManagerService(52): at com.android.server.LocationManagerService$Receiver.callLocationChangedLocked(LocationManagerService.java:291)
08-31 14:58:59.423: ERROR/LocationManagerService(52): at com.android.server.LocationManagerService.handleLocationChangedLocked(LocationManagerService.java:1569)
08-31 14:58:59.423: ERROR/LocationManagerService(52): at com.android.server.LocationManagerService.access$1600(LocationManagerService.java:81)
08-31 14:58:59.423: ERROR/LocationManagerService(52): at com.android.server.LocationManagerService$LocationWorkerHandler.handleMessage(LocationManagerService.java:1623)
08-31 14:58:59.423: ERROR/LocationManagerService(52): at android.os.Handler.dispatchMessage(Handler.java:99)
08-31 14:58:59.423: ERROR/LocationManagerService(52): at android.os.Looper.loop(Looper.java:123)
08-31 14:58:59.423: ERROR/LocationManagerService(52): at com.android.server.LocationManagerService.run(LocationManagerService.java:600)
08-31 14:58:59.423: ERROR/LocationManagerService(52): at java.lang.Thread.run(Thread.java:1060)
ahora me esta fallando esta linea:
notificationmanager.notify(ALERT_ID, notificacion);
Tengo 2 notificaciones y he definido:
Código:
private static final int HELLO_ID = 1;
private static final int ALERT_ID= 90;
mira el error
Código:
08-31 15:40:35.229: ERROR/AndroidRuntime(215): Uncaught handler: thread main exiting due to uncaught exception
08-31 15:40:35.239: ERROR/AndroidRuntime(215): java.lang.IllegalArgumentException: contentIntent required: pkg=com.proyecto.android id=2 notification=Notification(vibrate=[0,100,200,300],sound=null,defaults=0x2)
08-31 15:40:35.239: ERROR/AndroidRuntime(215): at android.os.Parcel.readException(Parcel.java:1222)
08-31 15:40:35.239: ERROR/AndroidRuntime(215): at android.os.Parcel.readException(Parcel.java:1206)
08-31 15:40:35.239: ERROR/AndroidRuntime(215): at android.app.INotificationManager$Stub$Proxy.enqueueNotification(INotificationManager.java:152)
08-31 15:40:35.239: ERROR/AndroidRuntime(215): at android.app.NotificationManager.notify(NotificationManager.java:94)
08-31 15:40:35.239: ERROR/AndroidRuntime(215): at com.proyecto.android.localizacionmanual.iniciaralerta(localizacionmanual.java:895)
08-31 15:40:35.239: ERROR/AndroidRuntime(215): at com.proyecto.android.localizacionmanual$5.onLocationChanged(localizacionmanual.java:821)
08-31 15:40:35.239: ERROR/AndroidRuntime(215): at android.location.LocationManager$ListenerTransport._handleMessage(LocationManager.java:180)
08-31 15:40:35.239: ERROR/AndroidRuntime(215): at android.location.LocationManager$ListenerTransport.access$000(LocationManager.java:113)
08-31 15:40:35.239: ERROR/AndroidRuntime(215): at android.location.LocationManager$ListenerTransport$1.handleMessage(LocationManager.java:129)
08-31 15:40:35.239: ERROR/AndroidRuntime(215): at android.os.Handler.dispatchMessage(Handler.java:99)
08-31 15:40:35.239: ERROR/AndroidRuntime(215): at android.os.Looper.loop(Looper.java:123)
08-31 15:40:35.239: ERROR/AndroidRuntime(215): at android.app.ActivityThread.main(ActivityThread.java:4203)
08-31 15:40:35.239: ERROR/AndroidRuntime(215): at java.lang.reflect.Method.invokeNative(Native Method)
08-31 15:40:35.239: ERROR/AndroidRuntime(215): at java.lang.reflect.Method.invoke(Method.java:521)
08-31 15:40:35.239: ERROR/AndroidRuntime(215): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791)
08-31 15:40:35.239: ERROR/AndroidRuntime(215): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549)
08-31 15:40:35.239: ERROR/AndroidRuntime(215): at dalvik.system.NativeStart.main(Native Method)
que tengo que hacer, uno distinto para cada notificación?? ¿el mismo para todas las notificaciones??