¿Cómo conectar un formulario creado en tasker con una base de datos?

261 views
Skip to first unread message

mlesir

unread,
Mar 26, 2013, 12:39:35 PM3/26/13
to tas...@googlegroups.com
Pues a mi también me interesaría. Parece difícil. No creo que te sea de ayuda pero... Has probado lo de leer archivo de Tasker? Según creo tasker los puede leer y escribir. Aunque supongo que lo suyo seria emplear un shell y programarlo directamente.

Carlos T

unread,
Mar 27, 2013, 6:44:32 AM3/27/13
to tas...@googlegroups.com
Estoy probando lo del fichero. Lo que me gustaría conseguir es que ese fichero estuviera colgado en un servidor de manera que puedas acceder a él desde varios dispositivos y así tener la información actualizada en todos...

mlesir

unread,
Apr 18, 2013, 12:48:17 PM4/18/13
to tas...@googlegroups.com
Y con dropbox o alguna asi no lo puedes hacer? Modificas el archivo, tasker lo esccribe y lo guarda. Luego me parece que tasker lo puede mandar sincronizar, si no hay aplicaciones que la sincronizan.
Lo más dificil va  a ser relacionar la base de datos o archivo con variables de tasker.

El miércoles, 27 de marzo de 2013 11:44:32 UTC+1, Carlos T escribió:

Carlos T

unread,
Apr 19, 2013, 9:52:16 AM4/19/13
to tas...@googlegroups.com
Estoy probando con todo lo que se me ocurre y encuentro por los foros pero no me funciona....

¿Alguna idea?

GermainZ

unread,
Apr 19, 2013, 10:07:07 AM4/19/13
to tas...@googlegroups.com
Do you speak English or French? I can do my best to explain in English and translate with Google Translate otherwise.

Also, just to make sure I got it right: you want to:
1- Tap a name
2- Get that name's number from the SQL database (in /data/data/com.android.provider.....)
3- Display the number

Correct?

On Tuesday, March 26, 2013 5:13:41 PM UTC+2, Carlos T wrote:
Me gustaría saber cómo puedo conectar (si se puede) con una base de datos, como por ejemplo, nombre usuario, dirección, teléfono, etc...

Se trata de tener un menú en una pantalla y al pulsar sobre uno de los nombres que contiene en la lista que la aplicación recupere la información de una base de datos y muestre un popup con los datos requeridos.

Carlos T

unread,
Apr 19, 2013, 10:09:57 AM4/19/13
to tas...@googlegroups.com
Yes, that's it....

GermainZ

unread,
Apr 19, 2013, 10:42:46 AM4/19/13
to tas...@googlegroups.com
Try something like this (do not translate it, copy it as it is):
sqlite3 /data/data/com.providers.contacts/databases/contacts2.db "SELECT number FROM view_v1_phone WHERE name='%number'"
%number is the variable that has the number (e.g. %number = 112233445566).

Carlos T

unread,
Apr 19, 2013, 10:54:16 AM4/19/13
to tas...@googlegroups.com
Doesn´t work... :(


2013/4/19 GermainZ <germ...@gmail.com>
--
You received this message because you are subscribed to a topic in the Google Groups "Tasker" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tasker/9XuEVnCYApM/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to tasker+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

GermainZ

unread,
Apr 19, 2013, 11:02:31 AM4/19/13
to tas...@googlegroups.com
Sorry, try this (Run Shell, Root: yes):
sqlite3 /data/data/com.providers.contacts/databases/contacts2.db "SELECT number FROM view_v1_phone WHERE name='%%name'"

%name = contact's name
Note that it's %%name and not %name in the Run Shell command.

mlesir

unread,
Apr 19, 2013, 1:30:39 PM4/19/13
to tas...@googlegroups.com
Doesn´t work for me your second script. Err in Tasker execution log.

GermainZ

unread,
Apr 19, 2013, 1:46:01 PM4/19/13
to tas...@googlegroups.com
Try running in a terminal emulator (replace the variable by an actual name), and tweak it till it works.

Carlos T

unread,
Apr 19, 2013, 1:46:54 PM4/19/13
to tas...@googlegroups.com

Not working... :(

mlesir

unread,
Apr 19, 2013, 2:26:17 PM4/19/13
to tas...@googlegroups.com
Carlos i see in EX explorer and i see my contacts are in /data/data/com.android.providers.contacts/databases ....
 
but even change this it dont fix. Perhaps you can do it. Well I give up ....at the moment. Buena suerte compañero.
 
Thanks Germanz

El martes, 26 de marzo de 2013 16:13:41 UTC+1, Carlos T escribió:

Carlos T

unread,
Apr 19, 2013, 2:44:04 PM4/19/13
to tas...@googlegroups.com

I'll try it tonight... Thank you very much. ;)

--

mlesir

unread,
Apr 19, 2013, 10:58:28 PM4/19/13
to tas...@googlegroups.com
I found that I have not installed sql3 in my phone so I installed it from Google play. Now in tasker run shell tasker show me ok in the log, but only if I write the script without select..... "if I include this part returns to show me Err. I tried a lot of ways to write the command but nothing fix. And I know nothing
About Linux and scripts. Could be the sintaxis? Carlos comprueba que se no te pase com a mi. Prueba a ejecutar en una consola sqlite3 tal cual a ver. No se si tu sabrás de Linux.

GermainZ

unread,
Apr 20, 2013, 1:25:50 PM4/20/13
to tas...@googlegroups.com
Probably, I didn't try it on my device yet. I'll let you know when I do.
@Carlos T, what's the error (when running in the terminal)?

Carlos T

unread,
Apr 20, 2013, 3:45:16 PM4/20/13
to tas...@googlegroups.com

Everytime. It doesn't work....

I'm trying everything but it can't.connect...

--
Reply all
Reply to author
Forward
Message has been deleted
Message has been deleted
0 new messages