Messagebox Usege with Android

Messagebox Usege with Android

Hi;

I want to send a message to the device with the "yes" and "no" options using the "Messagebox" command from the script sending screen. If the user chooses "yes", restart the device. If the user chooses "no", the message window will close. Is this possible ?

Thanks

  • 22 June 2018
  • SOTI MobiControl
  • 8 Answers
  • 0 Upvote
  • 2 Followers
  • 1.6K Views
    • 8 Answers
    • 0 Upvote
    • 2 Followers

8 Answers

Order By:   Standard | Newest | Votes
Raymond, Chan | posted this 22 June 2018

As far as I know, no documented Android script commands can be used to support what you want to achieve.  Let's see if Soti support team gives a different answer officially.

 

If not, maybe you can make a feature request. 

  • 0
  • 0
SMod@Soti | posted this 25 June 2018

Hi Kaan,

 

The MobiControl messages are only used for notification purposes as they are stateless.

 

Currently conditional scripting to accomplish your query is not supported. However, I would suggest you to create a support ticket here and add a Feature Request for this functionality to be added to the product.

 

Please let me know if you have any questions. 

 

Thanks

Technical Support | SOTI Inc. |1.905.624.9828 | support@soti.net | soti.net |

 

  • 1
  • 0
Matt Dermody | posted this 25 June 2018

It would be nice to have an option beyond Automatic and Self-Serve for Profile application that was something more like "Prompt on Startup". It would be great for things that are relatively invasive like a firmware update (eg. Zebra Lifeguard patch) or a business app update to give users the ability to opt in or choose to install when an event condition like a device startup occurs. 

  • 2
  • 0
Gerald Gilmore | posted this 06 May 2019

Have any other MobiControl users reported issues when using the 'showmessagebox' script when used inside a package?

I have created a package for a Zebra TC52 which consists of the following:

1) 400Mb Lifeguard OS update

2) Pre-Install script with 'showmessagebox "OS UPDATE STARTING. Please save your work" 300'

3) Post-Install script that contains basic Mobi logging to the Web Console

 

I'm finding that the message pop-up is not being triggered at the time the profile is assigned to the device/s - sometimes as the OS install is happening and other times post reboot. Is there something that I am maybe missing here? My understanding is that the pre-install configuration is applied first in sequence.

  • 0
  • 0
Raymond, Chan | posted this 07 May 2019

MobiControl recently does add support for extra arguments in showmessagebox command to get input from device end-user.  However, the following should be noted:

- Make sure you are using the server and agent version with such support

- The syntax of the command is  

      showmessagebox message [timer] [type] [default button]

Script Commands for Android Plus Devices


with type = 2 to get Yes/No prompt window.     (Reference : https://www.soti.net/mc/help/v14.0/en/scriptcmds/helpindex.html)   - The whole script should be completed within 5 minutes, or otherwise it will be killed to avoid possible hanging to the system.  So setting a timer value of 300 is likely a problem.  

 

- Some script commands may have extra limitation(s) when run in pcg/file-sync pre-/post-script.  While I have tested the Yes/No prompt to work fine when sending a script with showmessage of type 2 from the web-console,  using such script in pcg pre-script has not be fully tested yet (and I am not from Soti).      

 

 

The first thing you probably should do is to test sending the script with the right command syntax on your server and make sure the agent can handle the command properly.  

  • 1
  • 0
Gerald Gilmore | posted this 07 May 2019

Good advice there but I ran another test this morning after updating the package.

1) Copy the 400Mb .zip Lifeguard file to the SDCARD

2) Pre-install Script now includes only 'showmessagebox "MESSAGE" ' with no timer

3) Post-install Script includes only the install_system_update

 

It appears that the showmessagebox doesn't appear on the screen until the full .zip has been copied to the device. At that point it briefly displays the message and immediately installs the update.

 

The intent for the message is to give the end user a heads up that this device is about to reboot, but displaying it just before the reboot occurs is of little use.

Wondering if anyone came across a similiar scenario before?

  • 0
  • 0
Matt Dermody | posted this 07 May 2019

For LifeGuard and firmware updates for the Zebra devices you may want to consider leveraging a File Sync Rule instead. File Sync rules can also include Pre-install and Post-install scripts but the way the files are delivered to the devices are slightly different from Packages. File Sync rules deliver the files directly to the install path whereas Package delivery first goes to temporary storage before copying the files at the client level, thats at least how I've observed it happening. SOTI support has also suggested that large file deliveries leverage the File Sync rule because it leverages the hard drive storage on the server rather than using the database which is where the packages are stored. 

  • 1
  • 0
Gerald Gilmore | posted this 14 May 2019

Will need to do some more testing around the File Sync options, have only used this previously to deliver smaller sized files <1Mb.

What I ended up doing was this.

Pre-Install Script:

showmessagebox "OS UPDATE STARTING. Please save your work. Device will reboot in 5 minutes"

Post-Install Script:

sleep 300
install_system_update /sdcard/CTC/EFDConfig/HE_INCREMENTAL_UPDATE_13_20_U22.zip

 

The only issue with this approach is that when the devices rebooted post installation, it seems that a number of them displayed the message box after the OS upgrade, rather than before. 


Will add a timer to the showmessage box and report back.

 

 

  • 0
  • 0

Give us your feedback
Give us your feedback
Feedback