Fork us on GitHub

Can Execute

Runtime.exec is pretty familiar to Java developers (and the p...

Can Execute

Runtime.exec is pretty familiar to Java developers (and the process builder in later versions), however for mobile applications we usually don't have access to an executable. The solution is to invoke a URL which is bound to a particular application, this works rather well assuming the application is installed and you can activate quite a few things e.g. this is a partial list of URL's that work on iOS . (notice that a lot of these are redundant since we have builtin portable functionality to address those features).
Normally on iOS you would do something like canOpenURL followed by openURL assuming the can message returned true. However, Android et al doesn't have anything quite like that. To enable this at least for iOS if not elsewhere we added a Display.canExecute() method to go with the Display.execute() method. However, canExecute returns a Boolean instead of a boolean which allows us to support 3 result states:
1. Boolean.TRUE - the URL can be executed.
2. Boolean.FALSE - the URL can be executed.
3. null - we have no idea whether this will work on this platform.

We've added an experimental BigInteger/BigDecimal implementation to the util package. This is a very basic implementation lifted from the Bouncy Castle work, but these are big omissions in our current code which should allow more business/scientific code to be ported.

We also have an experimental (deprecated) port of the MiG layout in place. We ported it due to a long standing RFE but it doesn't seem to be working as expected, its hard to tell the source of the problem and we aren't sure if we want to go in that direction. If this is something that is interesting to you let us know and also check out if you can spot our mistakes in the port.

Notice: This post was automatically converted using a script from an older blogging system. Some elements might not have come out as intended.... If that is the case please let us know via the comments section below.

Share this Post:

Posted by Shai Almog

Shai is the co-founder of Codename One. He's been a professional programmer for over 25 years. During that time he has worked with dozens of companies including Sun Microsystems.
For more follow Shai on Twitter & github.