Operation on SMS
Moderator: Martin
-
- Posts: 109
- Joined: 16 Apr 2014 04:57
Operation on SMS
Is there a way by which Automagic can pull a specific sms from my inbox?
Something similar to "Init Variable File List" wherein automagic returns a list of all the files inside a specified folder and then I can perform various operations on the desired file(s).
Something similar to "Init Variable File List" wherein automagic returns a list of all the files inside a specified folder and then I can perform various operations on the desired file(s).
Re: Operation on SMS
Do you want only the body text of the messages?
Use Action Query Content Provider. I think some of the init variable action also use this method under the hood.
Content URI : content://sms/inbox
Projection : body (or you can choose other field using the ellipsis)
Result Type : List or Table
Use Action Query Content Provider. I think some of the init variable action also use this method under the hood.
Content URI : content://sms/inbox
Projection : body (or you can choose other field using the ellipsis)
Result Type : List or Table
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.
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
-
- Posts: 109
- Joined: 16 Apr 2014 04:57
Re: Operation on SMS
What I want to accomplish is that as soon as any sms arrives, Automagic should generate a notification for that in the ststus bar (exactly like andriod does). However, android doesn't provide any option of deleting the received sms straightaway from the notification. I want the notification generated by Automagic to have a "Delete SMS" button right below the sms body. On pressing that "Delete SMS" button, the SMS should get deleted from my inbox.Desmanto wrote:Do you want only the body text of the messages?
Re: Operation on SMS
Hi. You could use trigger sms received to build your notification.
However actually deleting it is not simple.
I tried using Java functions but it doesn't work. No error,just no record deleted.
Maybe it has something to do with the fact that an app has to be the default sms app to do this.
Maybe Martin could clarify that.
I know there has been a thread about this some time ago. Didn't find it.
Are you rooted? Maybe then you could delete the sms directly from the database.
However actually deleting it is not simple.
I tried using Java functions but it doesn't work. No error,just no record deleted.
Maybe it has something to do with the fact that an app has to be the default sms app to do this.
Maybe Martin could clarify that.
I know there has been a thread about this some time ago. Didn't find it.
Are you rooted? Maybe then you could delete the sms directly from the database.
Re: Operation on SMS
Content provider only provide you the content. For SMS, it doesn't allow you to delete it. So you can only use execute root command to delete the row directly using sqlite3. Removing notification and replacing it with automagic's one with additional action button is easy. The hardest part is with the sms deleting. I haven't tried yet with the sqlite3 command, but I know it can be done.
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.
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
-
- Posts: 109
- Joined: 16 Apr 2014 04:57
Re: Operation on SMS
Can you help guide me with it?Desmanto wrote:Content provider only provide you the content. For SMS, it doesn't allow you to delete it. So you can only use execute root command to delete the row directly using sqlite3. Removing notification and replacing it with automagic's one with additional action button is easy. The hardest part is with the sms deleting. I haven't tried yet with the sqlite3 command, but I know it can be done.
Akhilesh Chandra Gairola
Re: Operation on SMS
Hi. I'M currently making a flow for this which is gonna be a proof of concept,not very polished
Your phone has to be rooted and you would have to do a couple of modifications to the flow maybe for it to work on your particular device.
so...
install sqlite3 with this app from the play store
https://play.google.com/store/apps/deta ... ato.sqlite
find out the location of the sms database using a root explorer
mine is located here (Android 7.1.1)
/data/user_de/0/com.android.providers.telephony/databases/mmssms.db
I recommend that you copy this file to an easy location and give this path to the flow to protect your actual messages.
Download the flow. Running it manually should get your last received SMS and display it. If there are errors maybe sqlite isn't set up properly or the path is incorrect.
If you get a dialog box with a valid sms and you click OK afterwards it WILL DELETE IT.
If everything works we can do the other requirements.
Your phone has to be rooted and you would have to do a couple of modifications to the flow maybe for it to work on your particular device.
so...
install sqlite3 with this app from the play store
https://play.google.com/store/apps/deta ... ato.sqlite
find out the location of the sms database using a root explorer
mine is located here (Android 7.1.1)
/data/user_de/0/com.android.providers.telephony/databases/mmssms.db
I recommend that you copy this file to an easy location and give this path to the flow to protect your actual messages.
Download the flow. Running it manually should get your last received SMS and display it. If there are errors maybe sqlite isn't set up properly or the path is incorrect.
If you get a dialog box with a valid sms and you click OK afterwards it WILL DELETE IT.
If everything works we can do the other requirements.
-
- Posts: 109
- Joined: 16 Apr 2014 04:57
Re: Operation on SMS
Thanks a lot brother.
I'm in.
But where's the flow?
I'm in.
But where's the flow?
Re: Operation on SMS
Did you to the first steps?:)
http://automagic4android.com/flow.php?i ... 7b163c3d3e
http://automagic4android.com/flow.php?i ... 7b163c3d3e
-
- Posts: 109
- Joined: 16 Apr 2014 04:57
Re: Operation on SMS
"Sqlite Installer for root" apk installed.
Downloading your flow.
Let me try my hand @ it.
Downloading your flow.
Let me try my hand @ it.