Defold 1.2.134 has been released

Defold 1.2.134

This release makes it possible to specify a screen position and size of webviews on mobile, it’s now also possible to display multiple webviews simultaneously. The webview callback now also receive the current URL loaded on both Android and iOS.

Native extensions for Android can now hook into the onActivityResult method of the main activity.

Engine

  • DEF-1973 - Added: API to set position and size of webviews.
  • DEF-2878 - Added: Support for onActivityResult callbacks for Android NE.
  • DEF-3368 - Fixed: Supply current webview URL in the callback for iOS.
  • DEF-3249 - Fixed: Mismatch in precision keywords between builtin model.vp and model.fp.
  • DEF-3383 - Fixed: Editor now builds custom engine if only an app manifest is specified.
  • DEF-3298 - Fixed: null accesses crash in the Android IAP module.
  • DEF-3381 - Fixed: Crash issue when getting default sample rate from AudioManager (Android).
  • DEF-3316 - Fixed: Crash if Android READ_PHONE_STATE permission is missing.
  • DEF-3283 - Fixed: Google Chrome AutoPlay Policy Change breaks audio playback.
10 Likes

There’s a problem in the webview documentation (DEF-3394). The documentation shows the function webview.set_size(id, width, height). This function does not exist. The way to change size and position of a webview is like this:

webview.set_position(id, x, y, width, height)
1 Like

Some documentation missing. New functionality (@sven and @Mathias_Westerdahl, correct me if I’m wrong).

In dmsdk/graphics/graphics_native.h:

In dmsdk/extension/extension.h:

/**
 * Activity result callback function type. Monitors events from the main activity.
 * Used with RegisterOnActivityResultListener() and UnregisterOnActivityResultListener()
 */
typedef void (*OnActivityResult)(void* env, void* activity, int32_t request_code, int32_t result_code, void* result);
 /**
 * Registers an activity result callback. Multiple listeners are allowed.
 * @note [icon:android] Only available on Android
 * @param [type:OnActivityResult] listener
 */
void RegisterAndroidOnActivityResultListener(OnActivityResult listener);
 /**
 * Unregisters an activity result callback
 * @note [icon:android] Only available on Android
 * @param [type:OnActivityResult] listener
 */
void UnregisterAndroidOnActivityResultListener(OnActivityResult listener);
2 Likes

Don’t know if it’s a coincidence, but after this upgrade build times are taking ages on OSX. Maybe it was another change on my project, not sure yet.

1 Like

Apparently it was just the first time that took a long while. Now it seems fine! Sorry to bother.

2 Likes

If you use native extensions they need to be built once and then cached for the new version.

2 Likes

I seem to have lost console output upgrading from 1.2.133->1.2.134


(Image of both after each building app)
Previous version 1.2.133, still works. I am on Win7 x64 Platform.

1 Like

Can you please try resizing the console pane? Also restarting? Try a new empty project with a script and a print in init().

1 Like

It seems to be an issue with my current project, perhaps.

The console does work with an empty project, as a well as a few others that I have. But not this one…

Actually, I think I found something. I am declaring an App Manifest in game.project. If I remove the declaration of a custom manifest, the console works… :thinking:

1 Like

Ah, you’re likely removing the debug version of the engine and always replacing it with the release version. A release version of the engine will not print anything to the console. This is the same as checking the Release checkbox of the Bundle dialog when building without any native extensions.

2 Likes

Yes. That sounds correct - and now I see and understand.

DEF-3383 - Fixed: Editor now builds custom engine if only an app manifest is specified.

2 Likes