Please add SQLite storage support.

Post your feature requets for new triggers, conditions, actions and other improvements.

Moderator: Martin

Locked
psydex
Posts: 11
Joined: 19 Jun 2015 07:46

Please add SQLite storage support.

Post by psydex » 19 Jun 2015 10:44

Internal variables is good, but in some cases i need to store very much records, so storing data in SQLite base would be perfect decision for that purposes.

dah
Posts: 20
Joined: 25 Feb 2014 17:15

Re: Please add SQLite storage support.

Post by dah » 01 Jul 2015 13:56

Yes, this would be really useful and I missed this feature a few times in the past.

It's possible to use SQLite using the command line action but this was more difficult than it could be with a dedicated Automagic action (if I remember correctly, escaping strings was a pain).

SQLite has a ton of useful features that Automagic users could benefit from.

psydex
Posts: 11
Joined: 19 Jun 2015 07:46

Re: Please add SQLite storage support.

Post by psydex » 19 Aug 2015 11:45

or maybe add ContentProvider://automagic/TargetName/Request*
and triggers for Targetname ?

User avatar
jassing
Posts: 94
Joined: 16 Jul 2017 01:42
Location: SF Bay Area

Re: Please add SQLite storage support.

Post by jassing » 14 Dec 2019 19:42

I was just looking for sqlite solutions...
I tried&failed at using a Tasker plugin...
Would be really nice if Automagic supported sqlite natively, the libraries must already exist with Android...

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: Please add SQLite storage support.

Post by Desmanto » 15 Dec 2019 10:19

There is SQLite binary, that you can take from other app such as Titanium Backup. But you still need root to do that. Maybe putting it to busybox no root can make it executable without root. But I never try it.

I don't know your main purpose with the SQLite. But if you need to store something as database, I have posted several solutions : viewtopic.php?f=6&t=7802&p=24342&hilit=database#p23213
Nowadays, I back more to the csv side, although I still use nested map/list. It is because I realized the json is just a pivoted csv. So I still can convert csv to json vice versa, as long I understand the structure. This makes my flow speech database way way much simpler, because I can easily edited it excel or edit it in Automagic without any lost in formatting.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

User avatar
jassing
Posts: 94
Joined: 16 Jul 2017 01:42
Location: SF Bay Area

Re: Please add SQLite storage support.

Post by jassing » 15 Dec 2019 13:43

On my phone, of the files I can see (non rooted) there are 8 separate apps that use sqlite as their data storage. I find it hard to believe that they are developing their own implementation for various platforms. Seems more likely that a common file works a cross the board.
Text file solutions are not ideal for random access & searching data.

sqlite android doc
android developer documentation
And lastly... the answer to the question: is sqlite built into android?

It seems as easy as implementing it into a windows application... I find there's three types of wrappers that will handle most cases...
Open/close a database file
Execute a command (like create table, insert, update, etc)
& queries. For AM, this could be returned as a json string...

As a request, I think it's reasonable to want a database feature... But it's no over-the-weekend implementation.

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: Please add SQLite storage support.

Post by Desmanto » 15 Dec 2019 16:03

Oh. That's right. I can find java function to do all SQL stuff, but I don't know how to utilize that yet. This seems to be a reasonable request. Maybe create an action element for the SQL stuff, where you can create, query, delete and do many things. Or maybe if it is possible, create the script function with the sqlquery() and different other function.

SQLite can store blob/binary data, which may be totally different variable type. But that is actually can be similar to image_data that Automagic already have. So I will just wait for the best suited implementation.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

anuraag
Posts: 371
Joined: 24 Jan 2015 02:06

Re: Please add SQLite storage support.

Post by anuraag » 16 Dec 2019 01:56

@desmanto can you link to functions you find.?
Some months back when i tried i failed using java script. I want to try again.

Edit: https://stackoverflow.com/a/3914899 working. Similar what tasker's SQL QUERY do. But i don't know how to implement DatabaseHelper so that i can close database.

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: Please add SQLite storage support.

Post by Desmanto » 16 Dec 2019 17:57

@anuraag : I just use function calljava, either the method or static method, then find "sql". I founds tons of them but don't know how to put them in use.

Ever tried to grasp the idea of the SQL, and actually I need it too in some program. But it seems csv and json is easier to be implemented in Automagic, so never try it. But if Automagic support it, I might started to using it too for some big database that require indexing.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

anuraag
Posts: 371
Joined: 24 Jan 2015 02:06

Re: Please add SQLite storage support.

Post by anuraag » 17 Dec 2019 00:37

I think it's not possible to implement it using java functions available. We need @Martin to add it.

Locked