OS.alert() not working on Android

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By GameVisitor
:warning: Old Version Published before Godot 3 was released.

Hi all,

Any ideas why OS.alert() won’t work on Android ? but runs fine under Linux and mac OS ?

I am using Android 5.0 Lollipop (official from manufacturer) and the call is silently ignored…

Thx.

:bust_in_silhouette: Reply From: volzhs

For 2.1.1, OS.alert() just prints in log.

from os_android.cpp

void OS_Android::alert(const String& p_alert) {
	print("ALERT: %s\n",p_alert.utf8().get_data());
}

Ok, so this is planned for version 3.0 which has no official due date…

Any unofficial / estimation of when this version will be released ?

Thx.

GameVisitor | 2016-11-28 14:55

I guess 2.1.2 or something will be release soon or later, because of 2.1.1 has some bugs which was not in 2.1.
I hope next 2.1.x release have this patch.

volzhs | 2016-11-28 20:32

:bust_in_silhouette: Reply From: xyzzyx

Confirmed: OS.alert(…) works now with 2.1.2 on Android as a popup with title, text and an OK button.

void alert ( String text, String title=”Alert!” )

Displays a modal dialog box utilizing the host OS.

How about iOS ?

GameVisitor | 2017-05-06 15:57

It’s already implemented. It should be included in v. 2.1.4.

RandomShaper | 2017-05-27 03:03