// This is called from runtime.scm when a "close screen" block is executed. public static void finishActivity() { if (activeForm != null) { activeForm.closeForm(null); } else { throw new IllegalStateException("activeForm is null"); } }
// This is called from runtime.scm when a "close screen with result" block is executed. public static void finishActivityWithResult(String result) { if (activeForm != null) { Intent resultIntent = new Intent(); resultIntent.putExtra(RESULT_NAME, result); activeForm.closeForm(resultIntent); } else { throw new IllegalStateException("activeForm is null"); } }