0 votes

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...


in Engine by (847 points)

2 Answers

+2 votes
Best answer

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());
by (9,694 points)
edited by

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 ?


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.

+2 votes

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.

by (72 points)

How about iOS ?

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

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.