Tizen and back button behaviour

Discussion and feedback on Construct 2

Post » Mon Oct 14, 2013 12:46 pm

Hi,

We have been trying to implement the back button behaviour in Tizen but there seems to be a problem with it being overridden by the default Tizen back button behaviour.

Here is a capx as an example:

https://dl.dropboxusercontent.com/u/41218343/BackButtonBug.capx

When running the project in the Tizen IDE the yellow square should change to a red square when you press the back button. This is what is expected and indeed what happens but the application also displays the following dialogue:



Has anyone else come across this issue? Is there some way of removing the default Tizen behaviour?

EDIT: Exported using r147.

RESOLVED: We resolved this by removing the OR and creating two separate events. This is a possible bug?

Many thanks

Simonsimwhi2013-10-14 16:33:11
B
26
S
5
G
5
Posts: 151
Reputation: 6,279

Post » Tue Oct 15, 2013 8:41 pm

We just wanted to add here the easiest way to add the required button functionality. You can add this:

    document.addEventListener('tizenhwkey', function(e) {
    alert(e.keyName);
        if(e.keyName == "back"){
           tizen.application.getCurrentApplication().exit();
        }
        if(e.KeyName == "menu"){
        alert("MENU");
        }

    });

B
3
S
1
Posts: 26
Reputation: 377

Post » Wed Oct 16, 2013 3:38 am

@appbackr

Given that we do not generally have access to the actual javascript code when developing games using C2, where would we put the code snippet that you posted into the exported C2 project?

Any in case, the issue has been worked around for C2 games developers.

Many thanks for your input though.

Simon
B
26
S
5
G
5
Posts: 151
Reputation: 6,279

Post » Wed Oct 16, 2013 12:01 pm

@simwhi - post a bug report about the behavior in an OR block and I'll take a look.
Scirra Founder
B
399
S
236
G
89
Posts: 24,519
Reputation: 195,361


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 10 guests

cron