|
||
|
![]() |
![]() |
Tasker Para hablar de todo lo relacionado con la aplicación tasker |
![]() |
|
Herramientas |
#1
|
||||
|
||||
Leer múltiples whatsApp en smartwatch
Hola a todos. Como algunos sabréis los smartwatch "baratos" (chinos son todos) y algunos no tan baratos, acostumbran a tener la limitación de solo mostrar el texto de un sólo mensaje de WhatsApp, o al menos ese era mi caso y no lo pude solucionar ni expandiendo notificaciones, ni con whatsApp +, ni gaitas. Para los que esteis en esta situación os dejo un proyecto que así presentado parece muy simple pero a mi me costó una temporadita ya que por ejemplo, no tenía ni idea de trabajar con matrices así que para mi supuso investigar y aprender muchas cosas.
El proyecto es tan chapucilla como funcional. Consigue mostrar una notificación para cada contacto con sus mensajes recibidos (está limitado a los cinco primeros contactos de los que se reciba mensaje pero se puede ampliar al gusto). Es chapucilla porque eché mano de pluings de terceros como whatstasker y autonotification y especialmente el segundo consume una cantidad de Ram exagerada por lo que me gustaría poder sustituirlos por comandos de tasker o algo así. Whatstasker sólo lo uso para recoger la variable de los mensajes recibidos y su contacto correspondiente, imagino que se podría sustituir por consultas sql directamente. En el caso de autonotification lo uso para crear la notificación nueva con el contenido de la matriz de mensajes recibidos por cada contacto, esto lo puede hacer tasker directamente pero lo que necesito es que al borrar la notificación se borren las variables y matrices correspondientes. Ese efecto, el de capturar la acción de borrar notificaciones es lo que no imagino como se podría hacer. Por tanto, además de que estos perfiles puedan ser útiles para alguien, también me gustaría que me ayudarais a depurarlos y mejorarlos en la media de lo posible. Si sabéis de alguna app que haga lo mismo pues mejor. Yo no la encontré. Os pego las descripciones de los perfiles. Son dos perfiles y dos tareas muy simples. Necesario root, tasker, whatstasker y autonotification. Perfil: AutoNotIntercept (95) Evento: AutoNotification Intercept [ Configuración:Event Behaviour: true Notification Type: Only Cancelled Notifications Persistency Type: Non-Persistent Only Has Reply Action: false Notification Apps: AutoNotification Get All Fields : true Get Internal Actions: false Get Internal Actions Big: false ] Entrada: limpar (96) A1: Si (if) [ %antitle ~ %Noti1 ] A2: Array Clear [ Nombre:%Noti1c ] A3: Limpiar variable [ Nombre:%Noti1 Coincidencia de Patrón:Apagado ] A4: Else Si (if) [ %antitle ~ %Noti2 ] A5: Array Clear [ Nombre:%Noti2c ] A6: Limpiar variable [ Nombre:%Noti2 Coincidencia de Patrón:Apagado ] A7: Else Si (if) [ %antitle ~ %Noti3 ] A8: Array Clear [ Nombre:%Noti3c ] A9: Limpiar variable [ Nombre:%Noti3 Coincidencia de Patrón:Apagado ] A10: Else Si (if) [ %antitle ~ %Noti4 ] A11: Array Clear [ Nombre:%Noti4c ] A12: Limpiar variable [ Nombre:%Noti4 Coincidencia de Patrón:Apagado ] A13: Else Si (if) [ %antitle ~ %Noti5 ] A14: Array Clear [ Nombre:%Noti5c ] A15: Limpiar variable [ Nombre:%Noti5 Coincidencia de Patrón:Apagado ] A16: Fin si (End if) Perfil: WhaTaskMessRec (91) Estado: WhatsTasker Message Received [ Configuración:Las notificaciones de WhatsApp serán interceptadas ] Entrada: noti up date (93) A1: Array Push [ Nombre:%Noti Posición:1 Valor:%wt_sendername Rellenar Espacios:Apagado ] A2: Procesar Array [ Variable:%Noti Tipo:Eliminar Duplicados ] A3: Procesar Array [ Variable:%Noti Tipo:Rotar Izq. ] A4: Si (if) [ %wt_sendername ~ %Noti1 ] A5: Array Push [ Nombre:%Noti1c Posición:1 Valor:%wt_message Rellenar Espacios:Apagado ] A6: Procesar Array [ Variable:%Noti1c Tipo:Rotar Izq. ] A7: AutoNotification [ Configuración:Use HTML: false Title: %Noti1 Text: %Noti1c() Id: %Noti1 Skip Picture Cache: false Text Expanded: %Noti1c() Update Notification: false Only on Phone: false Cuenta atrás (segundos):20 ] A8: Fin si (End if) A9: Si (if) [ %wt_sendername ~ %Noti2 ] A10: Array Push [ Nombre:%Noti2c Posición:1 Valor:%wt_message Rellenar Espacios:Apagado ] A11: Procesar Array [ Variable:%Noti2c Tipo:Rotar Izq. ] A12: AutoNotification [ Configuración:Use HTML: false Title: %Noti2 Text: %Noti2c() Id: %Noti2 Skip Picture Cache: false Text Expanded: %Noti2c() Update Notification: false Only on Phone: false Cuenta atrás (segundos):20 ] A13: Fin si (End if) A14: Si (if) [ %wt_sendername ~ %Noti3 ] A15: Array Push [ Nombre:%Noti3c Posición:1 Valor:%wt_message Rellenar Espacios:Apagado ] A16: Procesar Array [ Variable:%Noti3c Tipo:Rotar Izq. ] A17: AutoNotification [ Configuración:Use HTML: false Title: %Noti3 Text: %Noti3c() Id: %Noti3 Skip Picture Cache: false Text Expanded: %Noti3c() Update Notification: false Only on Phone: false Cuenta atrás (segundos):20 ] A18: Fin si (End if) A19: Si (if) [ %wt_sendername ~ %Noti4 ] A20: Array Push [ Nombre:%Noti4c Posición:1 Valor:%wt_message Rellenar Espacios:Apagado ] A21: Procesar Array [ Variable:%Noti4c Tipo:Rotar Izq. ] A22: AutoNotification [ Configuración:Use HTML: false Title: %Noti4 Text: %Noti4c() Id: %Noti4 Skip Picture Cache: false Text Expanded: %Noti4c() Update Notification: false Only on Phone: false Cuenta atrás (segundos):20 ] A23: Fin si (End if) A24: Si (if) [ %wt_sendername ~ %Noti5 ] A25: Array Push [ Nombre:%Noti5c Posición:1 Valor:%wt_message Rellenar Espacios:Apagado ] A26: Procesar Array [ Variable:%Noti5c Tipo:Rotar Izq. ] A27: AutoNotification [ Configuración:Use HTML: false Title: %Noti5 Text: %Noti5c() Id: %Noti5 Skip Picture Cache: false Text Expanded: %Noti5c() Update Notification: false Only on Phone: false Cuenta atrás (segundos):20 ] A28: Fin si (End if) Si alguien quiere el XML lo pongo sin problema. Gracias por todos vuestros comentarios. Slds. Última edición por benxamin Día 03/10/16 a las 03:12:25. Razón: Algunas correcciones |
Los siguientes 5 usuarios han agradecido a benxamin su comentario: | ||
|
![]() |
![]() |
||||||
|