1. Home
  2. Knowledge Base
  3. Mobile Built Services
  4. CocoonIO
  5. Tutorials
  6. Cordova Dialog – Make an exit message in Construct 2

Cordova Dialog – Make an exit message in Construct 2

Exit Message

If you’re using CocoonIO, you can switch to this Tutorial. But you also can use the additional plugin Cordova Dialog by Cranberrygame.

[creativ_button url=”https://shatter-box.com/knowledgebase/cocoonio-make-a-on-exit-message-in-construct-2/” icon=”book” label=”CocoonIO – Make an on exit message in Construct 2″ colour=”blue” colour_custom=”” size=”medium” edge=”straight” target=”_blank”]

Install the plugin

For this tutorial you need the Cordova Dialog plugin by Cranberrygame. You get them in the scirra store.

Icon

Cranberrygame - Cordova Plugins 150 MB 5109 downloads

Download the awesome Cordova Plugin Package provided by Cranberrygame. The package...

 

Download the package and drag & drop the

[code]cranberrygame_CordovaDialog_1.0.14.c2addon[/code]

 

file into Construct 2.

onExit_Cordova_Dialog_install

Then restart Construct 2.

Code

Then start coding the dialog function. An easy example is shown below.

onExit_Code_Dialogs

The result will look like that then.

onExit_Dialogs

Demo (Android file)

You can try the demo android application file to see it in action. Just download it here.

Icon

Cocoon - On Exit Dialog 6 MB 1322 downloads

Download our demo application for the Cocoon On Exit Dialog game template. ...

Source file

Moreover you can download the capx example over here. But remember to install the plugins “CocoonCanvas+” & “CordovaDialogs” first.

Icon

Cocoon - Exit Message (CordovaDialog) 0.2 MB 1689 downloads

Download our free game template Cocoon Exit Message. This template uses the plugin...

Additionally you can use the CocoonCanvasPlus plugin to make an exit dialog.

Icon

Cocoon - On Exit Message 0.2 MB 1581 downloads

Download our free game template Cocoon On Exit Message. This template shows you how...

File is for learning purposes only!

Compilers

For this example you must also install the core plugin “Dialogs” in CocoonIO and Intel XDK.

CocoonIO

Go to cocoon.io and select your project. Then click on the “Plugin” tab and select “Core“.

onExit_Cordova_Dialog_install_cio

Find “Dialogs” and click install. Don’t forget to save your settings then.

Intel XDK

If you use Intel XDK there are no further steps required. In this case the plugin is included in the config.xml file.

Updated on May 6, 2018
Was this article helpful?

Related Articles

Not the solution you were looking for?
Click the link below to submit a support ticket
Visist our Forum!

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.