Android+ write to an .ini file to have Geofence name as Custom Data?

Android+ write to an .ini file to have Geofence name as Custom Data?

Hi,

I have a geofence rule set up that starts an application to send an SMS message when the geofence is entered/exited.  I've tried to find a way to include which geofence name in the SMS but am unable to get that information on to the device for the application to read.  The application doesn't support intent extras, but this may be the way to go if MC can't do it.

What I want is to have a script run when the geofence is entered that updates an .ini file with the name of the geofence, e.g.

   [Geofence]

   value=LocationNamehere

 

Has anyone tried this?  Any solutions?

We're using MobiControl v13 and the devices are mostly running Kitkat.

I want a simple, elegant  solution. I don't want to use relocation/file sync rules if possible.

 

Thanks in advance

 

Adam.

2 Answers

Order By:   Standard | Newest | Votes
Raymond Chan | posted this 29 April 2021

The Android geofence alert rules for MobiControl v13.x support running predefined script on entry/exit of the geofence of interest.  If you have all the .ini template files for all the geofences deployed to a device (say with .pcg package or file-sync rule), then each script can just copy/overwrite the .ini file with the required .ini template file.

 

Also, there is standare Android intent for sending SMS message, but I myself haven't tried using Soti script to send SMS message.   In theory, it should be possible, unless there are some tricky paramenters (e.g. too complicated or with data-type that is not supported by android "sendintent" script, etc.) required for related intent.

 

  • 0
  • 0
Adam Davidson | posted this 30 April 2021

Thanks Raymond.  I did think about doing it this way but hoped it was possible for MC to edit the file via a script.  Anyway, I've implimented the del, copy, run programme then del again script.  testing it today.  

 

Thanks for the help.

  • 0
  • 0

Give us your feedback
Give us your feedback
Feedback