Hi,
I tried to develop an app for my personal use. My idea was to make a medicine reminder for me because I have the Parkinson decease and I have to take medicine every 3 hours. The app was meant to alarm 5 times every day: in the morning 9:00, 12:00, 15:00, 18:00 and 21:00. My app works now but it needs two features that I don’t know how to write: 2/2. how to make my app to output audio at the alarm time? Now it works like this: The audio is working only if I start the app with the USB-cable connected between my phone and my PC (Linux Mint & Qt Creator & Sony XPERIAX rooted to SailfishOS) After the app installation I can disconnect the USB cable and the app keeps on running. I can minimice the app worls and restore again and it still works. But if I close the app and disconnect the USB cable and run then animation etc. in App UI works but the audio does not work (The first question in another topic)
Below I have only the audio parts in the code not the alarm timings.
The UI is very simple: three words visible: “Tango” “Mute” “News”
It works like this:
Finger-click “Tango” and the app starts streaming audio from a net radio that plays Tango Agentino music.
Finger-click “News” and the app starts streaming audio from a net radio that plays news audio.
import QtQuick 2.0
import Sailfish.Silica 1.0
import QtMultimedia 5.6
Page {
id: page
allowedOrientations: Orientation.All
Item {
id: palikka
}
Text {
text: “tango”;
font.pointSize: 44;
width: 140; height: 1500; x:180; y:200; color:“white”
Audio {
id: playMusica
autoLoad: true
volume: 0.5
}
MouseArea {
id: playArea
anchors.fill: parent
onPressed: {
playMusica.stop(1,1)
playMusica.source= “https://ais-sa2.cdnstream1.com/2202_128.mp3”
playMusica.play(1,1)
}
}
}
Text {
text: “Mute”;
font.pointSize: 44;
width: 140; height: 1500; x:359; y:200; color:“white”
Audio {
id: stopMusic
}
MouseArea {
id: stopArea
anchors.fill: parent
onPressed: {
playMusica.stop(1,1) }
}
}
Text {
text: “news”;
font.pointSize: 44;
width: 140; height: 1500; x:690; y:200; color:“white”
MouseArea {
id: clockArea2
anchors.fill: parent
onPressed: {
playMusica.stop(1,1)
playMusica.source = “https://edge8.audioxi.com/NT”
playMusica.play(1,1)
}
}
}
Timer {
interval: 10000
running: true
repeat: true
}
}