[V2.2] You can set up receipt of notifications when iRidium minimized on iOS. This "Local" background notifications works from 2 to 19 minutes, so we do not recomend to use it to inform about important events.
When the app cloased, you cannot get a notification at all
How to setup:
var in_BG = false;
IR.AddListener(IR.EVENT_TAG_CHANGE, IR.GetDevice("DRIVER"), function(name, value)
{
if(name == 'STATUS' && in_BG)
{
// Sound identifiers
SOUND_ID = {
None : 0, // without sound
Default : 1, // standard notification sound on iOS
Ringing : 2, // standard ringtone
}
// Creation of required variables
string = "DRIVER " + name + " VALUE = " + value;
id = "" + name;
delay = 0; // seconds
sound_id = SOUND_ID.Default;
// badge – the numeric icon on the app icon
badge_increment_num = 1;
IR.SendNotification(string, delay, sound_id, badge_increment_num, id);
}
});
// when the application goes to the background
IR.AddListener(IR.EVENT_APP_ENTER_BACKGROUND, 0, function()
{
in_BG = true;
});
// when the application comes to the foreground
IR.AddListener(IR.EVENT_APP_ENTER_FOREGROUND, 0, function()
{
in_BG = false;
});
Operating System | Location |
---|---|
Mac OS X: | ~/Library/Logs/CrashReporter/MobileDevice/ |
Windows XP | C:\Documents and Settings\\Application Data\Apple Computer\Logs\CrashReporter\MobileDevice\ |
Windows Vista or 7 | C:\Users\\AppData\Roaming\Apple Computer\Logs\CrashReporter\MobileDevice\ |
IR.Log ("message");are output in the text format.
2. If the project is created in iRidium GUI Editor
then for changing the connection settings you can use the iRidium
Script command which is formed in the Script Editor tab of iRidium GUI
Editor.
Syntax of the command for switching properties in iRidium GUI Editor:
IR.GetDevice("AMX").SetParameters({Host: "<host>", Port: "<port>", DeviceID: "<panel_id>", Login: "<login>", Password: "<password>"});