Wednesday, March 25, 2015

Refer to the former example of "Example of ViewPager with custom PagerAdapter": at start-up, instantiateItem() of MyPagerAdapter will be called twice, with position 0 and 1. When you you scroll page forward, extra instantiateItem() with position of the next invisible page will be called. And when you you scroll page backward, extra instantiateItem() with position of the former invisible page will be called.

So how can you know when page is scrolled, and which page is currently visible? One approach is to implement OnPageChangeListener for the ViewPager. The onPageSelected(int position) method will be called when a new page becomes selected. But not the first page at start-up.

Design user interfaces that can be shared across Android, iOS, and Windows Phone using Xamarin.Forms

Who This Book Is For
If you are a developer with experience in C# and are just getting into mobile development, this is the book for you. If you have experience with desktop applications or the Web, this book will give you a head start on cross-platform development.

In Detail
Developing a mobile application for just one platform is becoming a thing of the past. Companies expect their apps to be supported on both iOS and Android, while leveraging the best native features on both. Xamarin's tools help ease this problem by giving developers a single toolset to target both platforms.

This book is a step-by-step guide to building real-world applications for iOS and Android. The book walks you through building a chat application, complete with a backend web service and native features such as GPS location, camera, and push notifications. Additionally, you'll learn how to use external libraries with Xamarin and Xamarin.Forms to create shared user interfaces and make app-store-ready applications. This second edition has been updated with new screenshots and detailed steps to provide you with a holistic overview of the new features incorporated in Xamarin 3. By the end of the book, you will have gained expertise to build on the concepts learned and effectively develop a market-ready cross-platform application.

Wednesday, March 4, 2015

Written by an expert author team with years of hands-on experience in designing and building wearables, Professional Android Wearables covers how to use the Android Wear platform and other techniques to build real-world apps for a variety of wearables including smartbands, smartwatches, and smart glasses. In no time, you'll grasp how wearables can connect us to the Internet in more pervasive ways than with PCs, tablets, or mobile devices; how to build code using Google's Wear SDK for Android-enabled hardware devices; how Android Wear and other Android development techniques are capable of building several presented example projects; and much more.

Wearables are the next generation of smart mobile devices, it's no wonder you will want to master Android Wear SDK to build smart wearable apps for a multitude of form factors and applications.

Shows you how to navigate Android Wear SDK

Clearly explains how to use the Android Wear platform to build real-world apps

The companion website includes source code for all of the projects described in the book

If you're an experienced Android developer looking to master Android Wear SDK to build wearable apps, you've come to the right place.

Android is the fastest growing operating system (OS) with one of the largest installed bases of any mobile OS. Android uses one of the most popular programming languages, Java, as the primary language for building apps of all types. So, you should first obtain a solid grasp of the Java language and its foundation APIs to improve the chances of succeeding as an Android app developer.

This book will show you how to get your Android development environment set up and you will soon have your first working game. The difficulty level grows steadily with the introduction of key Java topics such as loops, methods, and OOP. You'll then use them in the development of games. You will learn how to build a math test game, a Simon-like memory game, a retro pong-style game, and for the grand finale, a Snake-style, retro arcade game with real Google Play leaderboards and achievements. The book has a hands-on approach and is packed with screenshots.

Build and enable current security enhancements from the SE for Android project onto a working embedded UDOO board.

Discover how to leverage SE for Android to secure your own projects in powerful ways using this step by step guide.

Who This Book Is For
This book is intended for developers and engineers with some familiarity of operating system concepts as implemented by Linux. A basic background in C code would be helpful. Their positions range from hobbyists wanting to secure their Android powered creations to OEM engineers building handsets to engineers of emerging areas where Android is seeing growth.

In Detail
You will start by exploring the nature of the security mechanisms behind Linux and SELinux, and as you complete the chapters, you will integrate and enable SE for Android into a System on Chip (SoC), a process that, prior to this book, has never before been documented in its entirety! Discover Android's unique user space, from its use of the common UID and GID model to promote its security goals to its custom binder IPC mechanism. Explore the interface between the kernel and user space with respect to SELinux and investigate contexts and labels and their application to system objects.

This book will help you develop the necessary skills to evaluate and engineer secured products with the Android platform, whether you are new to world of Security Enhanced Linux (SELinux) or experienced in secure system deployment.