User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 12

Thread: Can you test if the device has internet connection (+issues around that)

  1. #1
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export Module

    Join Date
    Jan 2012
    Posts
    95
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Can you test if the device has internet connection (+issues around that)

    in the ios extension you can test if there is internet, is there something similar for android?
    there is "network access" but does this cover a wifi connection too.

    Some of my actions aren't completing, im not sure if this is because of the api im using or because its not connecting to the internet properly, so would be nice to debug this

    Thanks

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleInstall Creator Pro
    SoftWarewolf's Avatar
    Join Date
    Jul 2006
    Location
    Norway
    Posts
    949
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Not sure what you are doing, but if the get object retrieves "" (blank), then you know it's not connected to the internet.

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export Module

    Join Date
    Jan 2012
    Posts
    95
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    True but if my api limit has run out I'll get the same so not a great error check

  4. #4
    Clickteam Clickteam
    Fernando's Avatar
    Join Date
    Dec 2006
    Posts
    7,376
    Mentioned
    298 Post(s)
    Tagged
    4 Thread(s)
    you have a condition in android object does it work for you?
    Regards,


    Fernando Vivolo

    ... new things are coming ...

  5. #5
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export Module

    Join Date
    Jan 2012
    Posts
    95
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I can only see is there a network connection

    i only get an error when i'm in airplane mode, but when I have no signal and wifi - its not connecting to anything

  6. #6
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export Module

    Join Date
    Jan 2012
    Posts
    95
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok it turns out its an issue when theres a " " in the url im getting, so "london " or "new york" is there a work around for this?

  7. #7
    Clickteam Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Simon's Avatar
    Join Date
    Jun 2006
    Location
    UK
    Posts
    2,743
    Mentioned
    65 Post(s)
    Tagged
    3 Thread(s)
    Use the URL encode function of string parser if characters are causing you issues.

  8. #8
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export Module

    Join Date
    Jan 2012
    Posts
    95
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    How would I do that, I have a look and i'm not sure how i'd do that.

    so its http://etcetc + "text from text box" + rest of url

    Would I need to write that to a string then parse it? I'm not sure how I put that url back into the "get" object.

  9. #9
    Clickteam Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Simon's Avatar
    Join Date
    Jun 2006
    Location
    UK
    Posts
    2,743
    Mentioned
    65 Post(s)
    Tagged
    3 Thread(s)
    It is the expression:

    Code:
    urlEncode$( "String Parser" )
    This will return a string which is URL encoded and safe for transmission over the web. To use it, you need to first set the input string of the string parser. There are two ways to achieve this - firstly you can use the action "Set String". Following this you would then retrieve the urlEncode$ result using that expression.

    Alternatively, and much of the time more usefully, you can use:

    Code:
    set$( "String Parser", "some string" )
    This allows you to set the input string from inside an expression, so that you don't have to do it as a separate action. So for example you could set the URL of the GET object to:

    Code:
    set$( "String Parser", "http://www.yourdomain.com/somepage.php?text=This is some text with spaces to be encoded" ) + urlEncode$( "String Parser" )
    That expression is called: Set String, Return "" and there is also one Set String, Return 0 (that's a zero character, not a letter 'o')

  10. #10
    Clickteam Clickteam
    Fernando's Avatar
    Join Date
    Dec 2006
    Posts
    7,376
    Mentioned
    298 Post(s)
    Tagged
    4 Thread(s)
    after this great example and help from Simon, that should work.

    GET object have a url encode for android that was tested

    space in android shoudl be translated as %20 (which should works) or as "+" without the quotes
    Regards,


    Fernando Vivolo

    ... new things are coming ...

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Check for internet connection
    By DTownTony in forum SWF/Flash Export Module Version 2.0
    Replies: 0
    Last Post: 31st December 2012, 10:12 PM
  2. Question about Internet connection
    By Lord_Wezel in forum Lacewing
    Replies: 6
    Last Post: 13th June 2011, 12:41 AM
  3. Checking if there is connection to the internet
    By JohnZ in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 19th May 2011, 10:48 AM
  4. internet connection status?
    By EasySite in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 23rd February 2010, 06:10 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •