From the Forum — Issue #25

From the Forum — Issue #25

From the ForumWelcome to the latest installment of From the Forum. In this series, guest blogger Alex Jackson highlights outstanding threads from the Corona Forum. The goal is to bring attention to the most captivating, interesting, and thought-provoking discussions taking place in our very own backyard.

Please visit the forum to join these conversations or start your own!


1. Posting images to Facebook

I’m not trying to make Facebook tips a regular fixture in this feature, but it seems like questions keep coming up and some really cool code snippets keep getting shared.

As of now, we’ve been provided with some good notes and interesting tidbits regarding code for posting screenshots to a Facebook timeline. Just remember that the code in the link below may or may not adhere to Facebook’s own approved method of posting information, so your results may vary. And, from a Corona standpoint, remember to use a directory to which files can be saved (use system.DocumentsDirectory).

Check out the original thread to get some tips, and if you have some of your own, please contribute so we can all gain from the knowledge.

http://forums.coronalabs.com/topic/42443-post-screenshot-to-facebook/#entry249532

2. How to check if a specific app is installed

Often, we as developers want to check if certain apps or games are already installed on a device during Runtime. I can even foresee a game that imports stats from the previous iteration, bulking up character statistics and fleshing out enemy interactions.

To this end, the information in the thread below will get you halfway there. Our friend ksan was looking for an extensible method to check for other apps on a mobile device, and fellow distinguished developer Icy Spark threw in his own method of checking for this very thing. This thread hit the sweet spot and is an easy way to accomplish exactly what many of us have been scratching our heads about.

http://forums.coronalabs.com/topic/48505-anyway-to-check-if-a-particular-app-is-installed-on-device/#entry251132

3. How to check if a device can make a phone call

Sometimes I read through the API documentation and wonder why we have calls for native.canShowPopup(). Shouldn’t you already know if you can run a certain function or have a certain option on the device you’re targeting? In this case, my ignorance shines through and the obvious usefulness of these calls becomes apparent.

Case in point — ksan was looking for a method to check if a device could make phone calls. There is no “canMakeCall()” API in Corona, but using the device ID and the native.canShowPopup(SMS) call, he was able to quickly determine the call functionality of the device while keeping the performance overhead of the process very low.

So, head over to the original post to read all the posts from those who helped out with this novel idea.

http://forums.coronalabs.com/topic/48636-how-can-i-tell-if-a-device-can-run-systemopenurltel/#entry251454


About Alex

Alex Jackson is an indie developer and the founder of Panc Software, specializing in retro-style gaming. He has created several mobile applications, enjoys long walks on the beach, pixel art, and reading the Corona forums. Contact him by email or follow him on Twitter: @pancsoftware. Check out his new game Crosstown Smash on iOS, Android, and Amazon devices!

Rob Miracle
[email protected]

Rob is the Developer Relations Manager for Corona Labs. Besides being passionate about helping other developers make great games using Corona, he is also enjoys making games in his spare time. Rob has been coding games since 1979 from personal computers to mainframes. He has over 16 years professional experience in the gaming industry.

3 Comments
  • Kerem
    Posted at 00:39h, 21 June

    Hey Alex, thanks for linking in my threads with questions. I appreciate all the help we get on the forums which in these occasions came from fellow devs @jonjonsson and @IcySpark. Very cool to have such a strong support group. Thank you very much!!!

    • IcySpark
      Posted at 02:07h, 21 June

      Hi Kerem, Alex.

      I’m glad to be of service on topic number 2. Hopefully it all worked out well for you.

      • Kerem
        Posted at 06:31h, 21 June

        I wish there was a clapping hands emoticon/gif here because I would have sent 3 of those your way right now! 🙂 Thank you so very much once again. Keep well.