Loaded twice ,I think it must be a bug.

0 favourites
  • 4 posts
From the Asset Store
Progress\Loading Bar. Now Load you game like a Professional.
  • 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)

  • 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.

  • 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.

    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.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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).

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)