Welcome 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.
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.
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.
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!
Posted by Rob Miracle. Thanks for reading...