Cocos2d-JS - Emails / Web APIs / Reachability

  • rich_hall_
    Likes 0

    Problem Description
    I'm writing an app in Cocos2d-JS that needs to work on multiple platforms (iOS, Android & Web).
     
    I have a few questions about Cocos2d-JS that I have not been able to find the answers to myself.

    I’ve lumped them together as they are all related.
    1. Can you send an email somehow?
    2. Can you call a web API? (mailgun for example, in case #1 is not possible)
    3. Can you check if a device is online? (like reachability in iOS)
    I'd really appreciate any advice you can offer.
  • Sonar Systems admin
    Likes 0

    An XHR request will allow you to call a website on which you could have a script to email or do anything theoretically that you can do online.

    Do you want to check if a device is connected to the internet.

  • efares
    Likes 0

    Hmm ya but what if you want your cocos JS project to open the device’s emailing client to send you the email?

  • Sonar Systems admin
    Likes 0

    Then you will need to do native code for opening the email client then create a wrapper so it can be called in Cocos2d-x.

Login to reply