We have moved to a new Sailfish OS Forum. Please start new discussions there.
1 | initial version | posted 2014-03-18 20:53:33 +0200 |
I created a simple scripted workaround to view incoming mms messages. This script is created for Finnish DNA operator, but should be easy to modify it to any other operator that sends credentials trough sms, serves a web-page for viewing mms and passes arguments as GET.
/home/nemo/checkmms.sh (create as nemo, remember to chmod +x)
#!/bin/sh
#CHANGE YOUR NUMBER
tel=044XXXXXX
#substr(fieldName,position -fromEnd,stringLenght)
#14000 DNA number where the notification sms comes from
mmsid=$(sqlite3 /home/nemo/.local/share/commhistory/commhistory.db 'select substr(freeText,-29,13) from events where remoteuid="14000" order by id desc limit 1;')
#alter the URL according to your operators page just add $mmsid and $tel to appropriate places
url=https://www4.dna.fi/mms/Sivut/showmms.aspx?MessageId=$mmsid&TelephoneNo=$tel
#open browser
sailfish-browser $url
/usr/share/applications/checkmms.desktop (needs devel-su)
[Desktop Entry]
Type=Application
Name=Check MMS
Icon=icon-l-terminal
Exec=/home/nemo/checkmms.sh
Comment=Terminal application
It's ugly and probably violates all possible best practices, but it works for me. Might also serve as a starting point for a real app...
Hopefully it's helpful to someone...
2 | retagged |
I created a simple scripted workaround to view incoming mms messages. This script is created for Finnish DNA operator, but should be easy to modify it to any other operator that sends credentials trough sms, serves a web-page for viewing mms and passes arguments as GET.
/home/nemo/checkmms.sh (create as nemo, remember to chmod +x)
#!/bin/sh
#CHANGE YOUR NUMBER
tel=044XXXXXX
#substr(fieldName,position -fromEnd,stringLenght)
#14000 DNA number where the notification sms comes from
mmsid=$(sqlite3 /home/nemo/.local/share/commhistory/commhistory.db 'select substr(freeText,-29,13) from events where remoteuid="14000" order by id desc limit 1;')
#alter the URL according to your operators page just add $mmsid and $tel to appropriate places
url=https://www4.dna.fi/mms/Sivut/showmms.aspx?MessageId=$mmsid&TelephoneNo=$tel
#open browser
sailfish-browser $url
/usr/share/applications/checkmms.desktop (needs devel-su)
[Desktop Entry]
Type=Application
Name=Check MMS
Icon=icon-l-terminal
Exec=/home/nemo/checkmms.sh
Comment=Terminal application
It's ugly and probably violates all possible best practices, but it works for me. Might also serve as a starting point for a real app...
Hopefully it's helpful to someone...