List of not supported condtions and actions on Android?

0 favourites
  • 5 posts
From the Asset Store
2D fighting template based in the game that defined the fighting games genre.
  • Hi! Is there a list of not supported features for Android exports? I know about Browser > Downloads not working. And I tried Went Online/Offline conditions today and it seems they are not working on android exports.

    The condition "is Online" seems to work but the Went Online/Offline triggers do not seem to do anything. I tried it a few times and got nothing. (enabled airplane mode to go online/offline a few times)

    /Edit: Just tried it with a short Timer and on Timer > Is Online > X does not work either.

    It works in preview on PC but the exported version does not seem to update the online status.

    But "Is Online" seems to work once at launch cause actions are executed. Is online status not updated on Android exports?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Such lists are usually too difficult to maintain, since they change regularly, and vary across specific devices, Android versions, and browsers. The best way is probably just to test it yourself.

    I would not advise using "Is online" anyway. It's surprisingly difficult to determine if you are actually online or not - there are lots of common, grey-area states like suddenly going offline but the system hasn't noticed yet so it still says it's online, or being partially online and able to access some parts of the Internet but not others, etc. Reducing this to an on/off state is kind of misleading. Further you often don't need it anyway - for example there's no point checking if you are online before attempting an AJAX request. Just make the AJAX request, and see if it succeeds or fails.

  • I just went down this rabbit hole of trying to check internet connection on mobile.

    The Browser Object conditions dont work to check internet connection on Android.

    'Is Online', 'On Went Online' and 'On Went Offline' all fail.

    The condition 'Is Online' works at start of app only, but fails if internet connection is lost or regained while app is open.

    The PlatformInfo plugin has some relevent conditions and actions.

    I found the condition 'PlatformInfo > On Network Changed' DOES reliably trigger on Android when your connection is lost and regained. But It doesnt tell you if you have connectivity or not, just that connection changed. And I couldnt get any of the other PlatformInfo conditions to reliably tell me if I had connectivity.

    Chadori has a plugin in his collection called MobileNetwork which is designed to return the internet connection status for Android and iOS, but Chadori says it currently isnt working properly because the underlying Cordova plugin on which MobileNetwork relies has a bug... so his plugin is currently unreliable too.

    ---

    There is good discussion in these two threads about this topic.

    construct.net/en/forum/construct-3/how-do-i-8/check-start-internet-off-146515

    construct.net/en/forum/construct-2/how-do-i-18/check-internet-connection-146516

    The second thread discusses how you can test for internet connectivity by sending an AJAX request to a website that is always on. That method seemed to work for many people in that thread, but for me it always returned true, even when I had no connection. I have no idea why, but anyway it might work for you.

    ---

    Ashley has been queried about the Browser Object failing to detect internet connection and his response is:

    There's probably no point checking if you're online anyway. Just go ahead and do whatever networking you need to do, and if that fails, you're probably offline. Detecting "is online" is tricky since it's hard to class intermittent connections, and may result in situations like telling the user they're offline when it would actually work.

    See these two links:

    github.com/Scirra/Construct-3-bugs/issues/3087

    construct.net/en/forum/construct-3/general-discussion-7/mobile-device-detect-internet-150495

    ---

    So I suppose it comes down to what you are trying to achieve. Ashley's suggests dont bother attempting to check for internet. Just do your network stuff and if it fails assume no connectivity.

    I followed this advice setting up events for the MobileAdvert and MobileIAP plugins.

    In Mobile Advert the condition 'On Video Fails to Load' works, so when it triggers I assume no internet connectivity and show an error screen instructing the user to check their connection.

    In MobileIAP theres a difference between Android and iOS. On Android the MobileiAP plugin throws up its own popup window saying 'error' if theres no connection. This is perfect, you can rely on that.

    On iOS that doesnt happen so I made my own system that relies of the conditions 'Is Product Available' and 'On any Purchase Failed' to indicate if the device has internet.

    Its far from ideal doing it this way, and it feels totally hacky but it works I guess.

  • Thank you very much for the detailed answers.

    I wanted to use it to display a message on an iframe that you need an internet connection and it set visibility to the loading animation to invisible. Right now if you are offline iframe shows an error with black text on black background and the loafing anim is showing forever.

    And to change a svg icon if online/offline which displays server status.

    Some actions / expressions for iframe would be handy. Like a trigger when loading is complete, or a way to get what URL or code is shown in the iframe. Ashley

    Or a loading progress to show a timeout message after x sec.

  • If it's a cross-domain iframe, browsers expose virtually no information at all about it for security reasons. Not even if it loaded or failed to load.

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