You can use system.util.sendMessage to send a message from the gateway to Perspective sessions and then use a message handler in Perspective to vibrate the device. On the other hand, you could probably do this without the message by having Perspective look at the alarm status.
Note that this will only work if the device is using the Perspective application to launch the session; mobile devices using a generic browser do not have access to this functionality.
After the alarm active, I see the Status tag was write to 1 by the scriping
I have one ZEBRA TC21 andorid system, running the APP:(HTC_WareHouseScan)(not by IE)
The hardware not vibrate
Can you help to tell me , what I have made a mistake?
Ah, there was a typo in the “code” I provided. If you looked at your gateway logs you would see that session does not have a property id, and that you should instead have something like this:
No, I’m pretty sure the session is more-or-less “disconnected” when you lock the screen. When you re-open, the session needs to re-connect to the Gateway. What you’re looking for at that point is actually more of a “push” notification, which Ignition/Perspective does not offer at this time.
Before what I can’t understand is the SMS can send the message and also the perspective message handler also have similar function, after your explain , I understand, SMS can send message to client no need the mobile end point is open while the session need, thanks a lot
First off, the boolean values in Python are True and False, notice the capitalization. Secondly, since the visible property is a boolean by default, you don't need the comparison. (I take it that this is a change script that is not on the visible property itself, otherwise it would be if currentValue.value:, or is this in an event script?)
if self.meta.visible:
system.perspective.vibrateDevice(1000)