Mobile Developer's Guide to the Galaxy
Total Page:16
File Type:pdf, Size:1020Kb
Don’t Panic MOBILE DEVELOPER’S GUIDE TO THE GALAXY ly upd te ate le d p m o c 6 E S E R TI F LL FOR published by: We create Apps. Enough Software GmbH + Co. KG Stavendamm 22 28195 Bremen Germany www.enough.de 16th Edition February 2016 This Developer Guide is licensed under the Creative Commons Some Rights Reserved License. Please send your feedback, questions or sponsorship requests to: [email protected] Follow us on Twitter: @MobileDevGuide Art Direction and Design by Cornelius Kwietniak Mladenka Vrdoljak Editors: Marco Tabor Mladenka Vrdoljak www.mobiledevelopersguide.com Mobile Developer’s Guide Contents 1 Prologue 4 The Galaxy of Mobile: An Introduction by Robert Virkus & Marco Tabor 18 From Idea To Concept by Sebastian Meyer 28 User Experience & User Interface Design by Anna Alfut 42 Android by Andre Schmidt & Vikram Kriplaney 60 iOS by Alex Repty 74 Windows by Robert Virkus 84 Going Cross-Platform by Robert Virkus 96 Mobile Sites & Web Technologies by Daniel Kranz 112 Enterprise Apps by Ian Thain & Davoc Bradley 124 Mobile Gaming by Oscar Clark 150 Mobile Development & the Internet of Things by Alex Jonsson 160 Apps for Wearables by Robert Virkus 168 Application Security by Dean Churchill 180 Accessibility by Sally Cain 200 Testing by Julian Harty & Marc van’t Veer 224 Mobile Analytics by Julian Harty 236 Collecting & Understanding User Feedback by Julian Harty 246 Monetisation by Michel Shuqair 262 Epilogue 263 About the Book Prologue Another year, another big round of changes: Mozilla stopped Firefox OS and Jolla went through financial crisis that almost put an end to the project. BlackBerry released its first Android device (but promised to continue its support of BlackBerry 10). Google is now a part of their own family company “Alphabet”. Apple released Swift as Open Source and Microsoft released its “operating system as a service” Windows 10. So the mobile universe keeps evolving - and starts merging with wearable sector. Due to these changes we decided to say goodbye to the dedicated Firefox OS, Java ME, BlackBerry 10 and Tizen chapters in this book and to focus even more on strategic and conceptual topics. One of the main progresses of the mobile industry in the younger past is that the user got more and more into the focus. Developers and app providers have understood that user feedback is a key factor of success. So we have extended the user-related content of this book even further with this edition: The concept and the design chapters are outlining how to involve users early and a completely new chapter about user feedback explains how to deal with your end-customers once you have gone public. Prologue 1 We would like to thank our dedicated authors - you all rock! Another big thanks goes to our printing sponsor Microsoft - please visit their developer offerings at dev.windows.com and azure.com. And now go ahead: Dive into the mobile universe and let us help you to find your very own place in it! Robert + Marco / Enough Software Bremen, February 2016 PS: Please follow us on Twitter @MobileDevGuide and visit mobiledevelopersguide.com to obtain the electronic edition of this booklet, which is available in several languages. 1 Prologue 2 MOBILE DEVELOPER’S GUIDE TO THE GALAXY 1 PLAYER GAME 2 PLAYER GAME The Galaxy of Mobile: An Introduction Welcome to the world of mobile development, a world where former giants stumble and new stars are seemingly born on a Robert Virkus & Marco Tabor Robert Virkus & Marco regular basis. BY The focus of this book is on developing mobile apps, which encompasses a number of phases including: planning and specification, prototyping and design, implementation, internal testing and deployment, deployment to an app store, discovery by users, installation, use and feedback. Ultimately, we want our users to enjoy using our apps and to give us positive ratings to encourage other users to do likewise. Keep reading to learn how to develop apps for the major platforms. Should this be the first time that you have con- sidered getting involved, don't delay; mobile has become the predominant form of computing in many areas already. Time spent on mobile app usage even surpassed the good old TV1- at least in the US. While developing mobile apps shares many common feature with developing other software, it has specific characteristics. We will cover some of these next. 1 dminc.com/blog/mobile-app-usage-surpasses-tv The Galaxy of Mobile: An Introduction 4 Topology: Form Factors and Use Patterns Traditionally we app developers only targeted phones. Then tablets followed, and today our apps can span across a complete range of device types: smartwatch, smart glass, phone, tablet, PC, TV and automotive. Other form factors might follow. Each form factor poses its own usability challenges; for instance, a tablet demands different navigation to a phone, input on TV systems can be cumbersome, and so on. Use patterns in an Android app, of course, differ from those on iOS, which also differ from those for Windows apps, et cetera. You should, therefore, refrain from providing an identi- cal experience on all form factors or even all you target are smartphones. Otherwise, you risk delivering a mediocre service to various sections of your target user base. Star Formation: Creating a Mobile Service There are several ways to realise a mobile service: — App — Website — SMS, USSD2 and STK3 App Apps run directly on the device. You can realise them as native, web-based or hybrid apps. 2 en.wikipedia.org/wiki/USSD 3 en.wikipedia.org/wiki/SIM_Application_Toolkit The Galaxy of Mobile: An Introduction 5 Native Apps A native app is programmed in a platform specific language with platform specific APIs. It is typically purchased, down- loaded and upgraded through the platform specific central app store. Native apps usually offer the best performance, the deepest integration and the best overall user experience compared to other options. However, native development is often also the most complex development option. Web Apps A web app is based on HTML5, JavaScript and CSS and does not rely on any app store. It is a locally stored mobile site that tries to emulate the look-and-feel of an app. A famous example of a web app is the Financial Times4, which left the app store in order to keep all subscriber revenue to themselves for the web world; conversely, the web-based Facebook iOS app was revamped into native app in order to dramatically improve its performance and usability. There are several web app frameworks available to build a native wrapper around such apps so that you can publish them in app stores, such as Phonegap5. Hybrid Apps For many mobile app developers a hybrid approach to app development has become quite common: an app can use native code for enhanced performance and integration of the app with the platform, while using a webview together with HTML5- based content for other parts of the app. Parts of the resulting app behave like a native app, while other parts are powered by web technologies. The web-based part can use Internet 4 apps.ft.com/home/web-app 5 www.phonegap.com 5 The Galaxy of Mobile: An Introduction 6 connectivity to offer up-to-date content. While this could be viewed as a drawback, the use of web technologies enables developers to revise content and features without the need to submit updates to app stores. The key challenge is to combine the unique capabilities of native and web technologies to create a truly user-friendly and attractive app. Website A website runs on your server but you can access various phone features on the device with JavaScript, for example to store data locally or to request the current location of the device. In contrast to apps, mobile websites are inherently cross-platform. Historically mobile websites often catered for WebKit based browsers such as the Mobile Safari. Nowadays, WebKit and Chromium are the dominant mobile rendering engines with Internet Explorer's Trident engine and others fol- low behind in the mobile space. For the sake of an open web, aim to use HTML5 standards as much as possible and refrain from rendering engine-specific code. SMS, USSD and STK Simple services can be realised with SMS, USSD or STK. Every- one knows how SMS (Short Message Service) text messaging works and every phone supports SMS, but you need to convince your users to remember textual commands for more complex services. USSD (Unstructured Supplementary Service Data) is a GSM protocol used for pushing simple text based menus, the capabilities depend on the carrier and the device. In Sri Lanka, visitors can receive a free SIM card which is registered using USSD menus. STK (SIM Application Toolkit) enables the implementation of low-level, interactive apps directly on the SIM card of a 7 phone. STK may appear irrelevant when so much focus is on smartphone apps; however, for example, M-Pesa is an STK app which is transforming life and financial transactions in Kenya and other countries.6 The Universe of Mobile Operating Systems The mobile space is much more diverse than other areas in IT. When you are developing software for personal computers, you basically have 3 operating systems to chose from. When it comes to mobile, there are many more. This book provides an introduction to the mobile operating systems that are currently the most relevant. Be aware, the mobile space changes continuously and at a speed that you will seldom observe in other businesses. We have seen many promising technolo- gies appear and quickly disappear, regardless of how big the companies behind them are, or the historic market relevance of those companies.