1. Home
  2. Mobile Built Services
  3. CocoonIO
  4. Tutorials
  5. 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.

  CocoonIO - Make an on exit message in Construct 2

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 2736 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 341 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 447 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 490 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

Need Support?
Can’t find the answer you’re looking for? Don’t worry we’re here to help!
Contact Support

Leave a Comment

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