[PLUGIN] CocoonJS Android Back-button

Post your completed addons to share with the community

Post » Mon Dec 09, 2013 9:18 pm


Hi

I've tested this on few projects and it looks ok so far. Please let me know if you have any problems.



Instructions:
Download the zip file from
http://www.kaurismaa.com/scirraplugin/cocoonjsbackbutton.zip

and extract it to

C:\Program Files\Construct 2\exporters\html5\plugins

After unzipping the files, you should see four files at
C:\Program Files\Construct 2\exporters\html5\plugins\cocoonjsbackbutton\

Open your Scirra-project and select "Object types" from your project, right click your mouse and select "Insert new object".

From "Platform Specific", select "CocoonJSBackButton".

On your event sheet, add new event and select "CocoonJSBackButton". There is only one event available - "On back", which is triggered when user clicks Android phone back button.

Please note this disables CocoonJS normal back button behavior, so yo need to implement your own app exit function e.g. "Browser" object's "Close" method.

/timo


androidtimo2013-12-09 21:19:24
B
12
S
3
Posts: 25
Reputation: 1,430

Post » Sun Feb 16, 2014 7:19 am

Thanks for this! It works perfectly, no fuss. Only "issue" is that it only works in a compiled app, not in the CJS Launcher.
B
57
S
15
G
11
Posts: 912
Reputation: 12,626

Post » Tue Jul 29, 2014 6:26 pm

Could it be possible to directly integrate this into the CocoonJS plugin now that it's open source?

EDIT:
I can confirm that it works in the CocoonJS Launcher (2.0.2). @GeometriX
B
34
S
8
G
5
Posts: 32
Reputation: 5,404

Post » Fri Aug 15, 2014 3:13 pm

I guess it could be possible. I have not been using or developing the CocoonJS plugin. If some CocoonJS plugin developer can add it, it could be just great:)

/timo
B
12
S
3
Posts: 25
Reputation: 1,430

Post » Thu Sep 11, 2014 4:06 pm

I also confirm that it works in the CocoonJS Launcher (2.0.2).
B
159
S
27
G
17
Posts: 916
Reputation: 32,666

Post » Tue Dec 09, 2014 9:52 pm

Hi! I dont know why, but if i add the object CocoonJSBackButton, game starts with infinitely black screen (2.0.2), in version 2.1.1 infinitely black screen also flashes. Please help :((, what i am do wrong

UPD: all ok. it was my bad.
B
3
S
1
Posts: 6
Reputation: 337

Post » Mon Dec 29, 2014 12:27 pm

Hello,

Could you please explain me why this plugin is needed? I can't see the point.
In addition, if you want it to be included in the plugin, make a pull request and our developers will have a look at it.

Regards.
B
9
S
4
G
4
Posts: 383
Reputation: 3,616

Post » Sat Jan 10, 2015 4:29 pm

Hellou Ludei!

First of all, thanks for the cloud service! For my games, Ludei's CocoonJS service has been working mostly just great and I've been able to publish my games on Android and iOS.

I don't know the current CocoonJS plugin situation, but few months ago it was not possible to detect back button click event when compiling Construct 2 games on Android using CocoonJS service. Due the reason of that, my games did not pass tests at Samsung App Store.

If the back button is missing from current open source CocoonJS plugin and there is not too much trouble, I could be happy if it would be added there somehow.

br,

/timo

/timo
B
12
S
3
Posts: 25
Reputation: 1,430

Post » Tue Feb 17, 2015 1:20 pm

ludei wrote:Hello,

Could you please explain me why this plugin is needed? I can't see the point.
In addition, if you want it to be included in the plugin, make a pull request and our developers will have a look at it.

Regards.



There is a huge point why this would be important to be integrated: Google Play doesn't feature
any games that have the back button not integrated correctly into an app.
Correctly means that it must either work as a classic browser-ish back button (back to previous layout)
or open an in-game query.

Thanks for the plugin, I am going to try this one
B
7
S
1
Posts: 41
Reputation: 525

Post » Tue Feb 17, 2015 1:46 pm

beefor wrote:Hi! I dont know why, but if i add the object CocoonJSBackButton, game starts with infinitely black screen (2.0.2), in version 2.1.1 infinitely black screen also flashes. Please help :((, what i am do wrong

UPD: all ok. it was my bad.



Could you please explain why it was your bad? I am having the same issue. Game starts in a black screen after the Ludei splash logo when using the plugin.
Mind sharing what you did to solve this?
B
7
S
1
Posts: 41
Reputation: 525

Next

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 2 guests