Welcome to the fifth 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. Dude, Where’s my Car? Don’t Worry, This App Will Tell You!
Dated movie references aside, using map functionality within your app can be a great way to implement location-based functionality. Using maps can be useful with setting custom locations or instituting some interesting geolocation logic. Configuring this functionality, however, can be tricky.
Enter T and G Apps. They’ve created some interesting sample code which describes how best to implement these map features as HTML loaded in a webView. They started their development using code from the older Code Exchange (which is continued in the new Code Exchange) and improved upon it. The most recent update includes features such as:
- A non-clickable marker to display the user’s current location (updates once you reopen the map).
- The map center is now based off the user’s location.
- iOS-styled info boxes.
- Each marker can now have different custom images (URL-based).
Please visit the original thread (below) to get the code. For their act of generosity, all T and G asks is that, if you improve upon the code, you simply provide that code for the benefit of everyone. Tough to argue with that deal!
2. Kick Some Tires on the Business Side
We’re all working on ways to make Corona the de-facto SDK for anything and everything mobile. It’s great for games, as it implements an intelligent sprite library along with quality Box2D physics. We’ve also seen a plethora of eBooks created with Corona SDK.
But what about business apps? In October, Corona Labs released a “business sample app” that is packaged with the Corona SDK installation. This sample app “demonstrates several principles related to business apps including tabBar controllers, tableViews, buttons, networking, RSS feeds, webViews and mapViews.” Sounds fantastic, and along with some of the fantastic features other developers have added to the open-source Widget library, creating business apps is a snap.
Grab your caffeinated drink and follow the conversation that’s taking place in the original thread. And, if you have a new idea or suggestion, please add it to the thread!
3. My Touches Aren’t Detected! My App is Broken!!!
Often, new users come to Corona SDK and see the potential of a low entry barrier with a high ceiling of what can be accomplished. The sample apps, the proven completed projects, and the high-level functionality discussed by veterans in the forums bodes well for a new developer seeking to build amazing apps.
This being said, in the race to become Corona aficionados, some new users speed towards a completed app without understanding the functionality behind the “simple things” in the SDK. One case in point is how a lot of new users believe that touch functionality is “broken” when they first start implementing it. When I first started, I created some basic touch functionality and assumed it would work like a physical key — touch it and the behavior fires; move your finger away and the behavior stops. That’s not technically the case, however, because touch screens are not physical keys!
I’ve selected one of several threads which discusses this issue (link below). This one was chosen because it best encapsulates the issue and underlines the necessity to implement “focus” to best determine where and how the touch event is handled. Please head over to the thread: salvation lies within!
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.