Book Image

LiveCode Mobile Development Beginner's Guide

By : Colin Holgate
Book Image

LiveCode Mobile Development Beginner's Guide

By: Colin Holgate

Overview of this book

LiveCode is a tool for developing mobile apps designed for those who don't want to use Objective-C, C++ or Java. Although it is a tool full of rich features to create apps it can be challenging to get beyond the basics and build interactive and fun apps. Using this book, you can develop various apps and this book guides you through "till you upload the apps in the appstore."LiveCode Mobile Development Beginner's Guide" will explain how to create applications with the easiest, most practical cross platform framework available, Livecode Mobile and upload the apps to the appstore with minimal effort.Throughout the book, you'll learn details that will help you become a pro at mobile app development using LiveCode. You begin with simple calculator application and quickly enhance it using LiveCode Mobile. Start by learning the interface controls for videos and images of LiveCode's environment. Dig into configuring devices, building user interfaces, and making rich media applications, then finish by uploading the mobile applications to App Stores. You will learn how to build apps for devices such as iPhone, Android with the recently developed LiveCode Mobile through sample applications of increasing complexity.
Table of Contents (16 chapters)
LiveCode Mobile Development Beginner's Guide
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Preface

Everyone you know has a smart mobile device of some kind. You probably own several! The general idea of having utility applications on a phone is not new, and even cell phone and PDA games have existed for years, but the way that the iPhone used touch instead of a stylus or keyboard, and gestures to reduce the number of steps to do something, was a game changer.

The iPhone was released in June 2007, and Android OS in September 2008. If you wanted to create something that worked on both platforms you had to learn two development environments and languages; Objective-C for iPhone, and Java for Android.

In the desktop world there are several development tools that do allow you to publish to both Mac and Windows, as well as Linux in the case of LiveCode. The most successful of these tools are Adobe Director, Adobe Flash, Unity, and LiveCode. Publishing to iOS is being worked on for Director, which will mean that all four tools are also suitable for developing for mobile.

Those tools have different strengths. In some cases the strengths relate to the nature of the applications you can make, and in other cases it relates to how accessible the tool is to people who are not hardcore programmers. If you want to make a high quality 3D game, Unity would be the best choice, with Director and then Flash as other choices. If you need a lot of character animations, then Flash would be the best choice, with Director being a good alternate.

If the important thing is how approachable the tool is, then LiveCode wins easily. It's also just as valid a choice for making the majority of apps you might wish to. In fact, for apps that are a set of single screens, as would be the case for most utility apps, as well as for board and puzzle games, LiveCode is better suited than the other tools. It also has better access to native interface elements; with the other tools you usually have to create graphics that resemble the look of native iOS and Android controls, instead of accessing the real thing.

With its easy to use English-like programming language, and the "stack of cards" metaphor, LiveCode lets you concentrate more on creating the app you want to make, and less on the technicalities of the development environment.

What this book covers

Chapter 1, LiveCode Fundamentals, will introduce you to the LiveCode environment, and to its English-like programming language. Experienced LiveCode users can skip this chapter, but for someone new to LiveCode this chapter will take you through creating a simple calculator app as a way to make you familiar with the various tools and hierarchy of LiveCode.

Chapter 2, Getting Started with LiveCode Mobile, describes in detail how to set up your Mac or Windows computer so that you are ready to develop and publish mobile apps. This chapter will take you all the way from signing up as an iOS and Android developer, to creating and testing your first LiveCode mobile app.

Chapter 3, Building User Interfaces, shows how to use some of the standard mobile features, such as date pickers, photo album, and camera. This chapter will also show how to make your own buttons with an iOS look to them, and how to use the LiveCode add-on, MobGUI, to make your life easier!

Chapter 4, Using Remote Data and Media, discusses the structure of your apps, where to place your code, and how to read from and write to external text files. You will also create a mobile app that is a "web-scraper", capable of extracting links and media from a web page, and to show or play media from that page.

Chapter 5, Making a Jigsaw Puzzle Application, will show you how to process image data, and to use the information to create a color picker, detect regions, and to make a collision map. You will then create a full jigsaw puzzle application that takes its image from the photo album or device camera.

Chapter 6, Making a Reminders Application, examines what information is needed to represent a "reminder", and how to set up notification events so that you are alerted at a specified date and time. You will make a reminders app that can create a list of such events, and even list those events based on your current location.

Chapter 7, Deploying to Your Device, is a reference chapter that describes all of the mobile publishing settings. The chapter also shows how to send apps to beta testers, and how to get started with submitting your finished app to the various app stores.

Appendix A, Extending LiveCode, describes add-ons to LiveCode that will make your mobile apps look better, or that extend the mobile capabilities of LiveCode.

What you need for this book

In addition to LiveCode itself, you would need a Mac or PC, iOS and/or Android devices, and an amount of money if you follow the parts about signing up as a mobile developer! For iOS development you will need access to an Intel based Mac for some of the steps. The example code requires LiveCode version 5.5 or later.

Who this book is for

The ideal reader for this book would be someone who already knows LiveCode, is interested in creating mobile apps, and wants to save the many hours it would take to track down all of the information on how to get started! Chapter 1, LiveCode Fundamentals, will help readers who know programming but are not familiar with LiveCode enough for them to benefit from the remainder of the book.

Conventions

In this book, you will find several headings appearing frequently.

To give clear instructions of how to complete a procedure or task, we use:

Time for action – heading

  1. Action 1

  2. Action 2

  3. Action 3

Instructions often need some extra explanation so that they make sense, so they are followed with:

What just happened?

This heading explains the working of tasks or instructions that you have just completed.

You will also find some other learning aids in the book, including:

Pop quiz – heading

These are short multiple choice questions intended to help you test your understanding.

Have a go hero – heading

These set practical challenges and give you ideas for experimenting with what you have learned.

You will also find a number of styles of text that distinguish different kinds of information. Here are some examples of these styles, and an explanation of their meaning.

Code words in text are shown as follows: "In the empty line between on mouseUp and end mouseUp, type numberPressed the label of me."

A block of code is set as follows:

on clearPressed
   put true into newNumber
   put 0 into field "display"
   put 0 into currentTotal
   put 0 into currentValue
   put empty into currentCommand
end clearPressed

Any command-line input or output is written as follows:

export PATH=$PATH:/Users/yourusername/Documents/android-sdk-macosx/platform-tools

New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: "Take note of the items on the right-hand side, User Samples, Tutorials, Resources, and Dictionary.".

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or may have disliked. Reader feedback is important for us to develop titles that you really get the most out of.

To send us general feedback, simply send an e-mail to , and mention the book title through the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide at www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the example code

You can download the example code files for all Packt books you have purchased from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you would report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/support, selecting your book, clicking on the errata submission form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded to our website, or added to any list of existing errata, under the Errata section of that title.

Piracy

Piracy of copyright material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works, in any form, on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at with a link to the suspected pirated material.

We appreciate your help in protecting our authors, and our ability to bring you valuable content.

Questions

You can contact us at if you are having a problem with any aspect of the book, and we will do our best to address it.