Loaded twice ,I think it must be a bug.

Bugs will be moved here once resolved.

Post » Wed Jul 23, 2014 6:26 am

Problem Description
Hi,

I have a strange issue,can sb help me,thx.

1.This is a simple C2 project: one layout,one event:click and alert("ok");
2.My all games wrapped with phonegap and cordova are all like above project (but crosswark is ok);

3. I exported this project to phonegap or android;
4.I built it with phonegap build service(http://build.phonegap.com) or built it locally with CLI of phonegap(or cordova),
the index.html loaded twice,the two pages overlap partly, and the game event fired twice;
5. But phonegap sample project has no this issue, and if i newed a html without all C2's js files ( ie. c2runtime.js,ect),
it worked fine too;
6.c2runtime.js is too complex to me,can sb help me to solved it

Attach a Capx
see the attchement

Description of Capx
This is a simple C2 project: one layout,one event:click and alert("ok");

Steps to Reproduce Bug
  • Step 1: expot to phonegap
  • Step 2: build with build.phonegap.com or CLI of phonegap
  • Step 3:install in android phone

Observed Result
the index.html loaded twice ,events fired twice


Expected Result
the index.html loaded once,events fired once only

Affected Browsers
    android webview

Operating System and Service Pack
_ android 4.1.2

Construct 2 Version ID
release 175(32-bit)
You do not have the required permissions to view the files attached to this post.
B
23
S
5
Posts: 4
Reputation: 1,467

Post » Thu Jul 24, 2014 4:05 pm

PhoneGap is really poor for Android versions older than 4.4.3, we may not be able to fix this. Consider using Crosswalk instead.

Does it still happen if you remove the 'alert'? Alert can cause some bugs by itself.
Scirra Founder
B
387
S
230
G
88
Posts: 24,251
Reputation: 192,454

Post » Fri Jul 25, 2014 1:53 am

alert is just a test ,all game event fired twice.

crosswalk wrapped apk 'size is too big,and must has two packages:arm and x86.

and the most important:

From android 4.4, it's webView is based on Chromium, this means C2 project dosn't need to be wapped chromium with crosswalk( file size is so big). C2 game project will be more useful for android( amazon webview is based on Chromium too ). https://developer.android.com/guide/web ... ating.html

so ,it is not the best choice that you give up phonegap or cordova.

Best regards.







Ashley wrote:PhoneGap is really poor for Android versions older than 4.4.3, we may not be able to fix this. Consider using Crosswalk instead.

Does it still happen if you remove the 'alert'? Alert can cause some bugs by itself.
B
23
S
5
Posts: 4
Reputation: 1,467

Post » Tue Aug 05, 2014 4:08 pm

Closing, please post a repro which does not involve 'alert' to prove that 'alert' is not the cause of the problem (it has caused some weird bugs before).
Scirra Founder
B
387
S
230
G
88
Posts: 24,251
Reputation: 192,454


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 1 guest