Questions about Java Scripting On android devices

Questions about Java Scripting On android devices

I am fairly new to Java but I know enough to see what a javascript is doing and how to manipulate it to do what I need to get done.

I would like to convert some of my legacy scripts to Java because they are a bit more robust and give me a few more options.

Here is an example  of one of my legacy scripts 

var MyApp = 'com.test.mobile'; var location = 'some.location'   kill_application %MyApp% sendintent -a "test.AppConfig://Config?BaseAddress=http://%location%:8080/testingapp&SystemName=TestApi&DeviceId=%MCDEVICENAME%&PinUsername=True&PinPassword=True"   My question is how do I use Java to send mobicontrol commands like "sendintent" or "kill_application". Is it possible to call and set mobicontrol variables like in the previous example?  

5 Answers

Order By:   Standard | Newest | Votes
Matt Dermody | posted this 14 January 2021

Try this

 

https://www.soti.net/mc/help/javascriptapi/en/index.html

  • 1
  • 0
davaga | posted this 13 January 2021

Exactly what Matt said,

It would be incredibly useful to be able to reference or call a legacy command within Java. It would open the door to a million possibilities. You could run "if-then" statements, while-loops, set vars, or pass string variables. Endless Possibilities!!!  

  • 1
  • 0
Matt Dermody | posted this 13 January 2021

It would be nice to be able to reference legacy scripts within javascript somehow but at present they are two different scripting layers with only partial overlap in capability. The javascript route has the promise of being more capable with conditional logic an really anything you can accomplish with javascript, but the number of controls and actions are still a little lacking. 

  • 1
  • 0
davaga | posted this 13 January 2021

by the way, www.soti.net/mc/help/javascriptapi/mobicontrol.html redirects to  https://www.soti.net/mc/help/javascriptapi/mobicontrol.html and it does not exist. 

I get "The resource you are looking for has been removed, had its name changed, or is temporarily unavailable."

  • 0
  • 0
Raymond Chan | posted this 13 January 2021

What are supported in MobiControl javascript engine can all be found in the documentation at

  https://www.soti.net/mc/help/javascriptapi/mobicontrol.html

 

Currently, there is no javascript functions that provide the same functions as either killapplication or sendintent legacy script commands.

 

  • 0
  • 0

Give us your feedback
Give us your feedback
Feedback