چه کسانی این کتاب را می‌خوانند

دانشجوعلاقه‌مند یادگیری
کتابخوان حرفه‌ایلذت مطالعه
نویسندهالهام‌گیری

Android Native Development Kit cookbook: a step-by-step tutorial with more than 60 concise recipes on Android NKD development skills

Feipeng Liu

قیمت نهایی

۴۹٬۰۰۰ تومان

نسخه اصلی و اورجینال

بلافاصله پس از خرید، فایل کتاب روی دستگاه شما آمادهٔ دانلود است.

تحویل فوری
پرداخت امن
ضمانت فایل
پشتیبانی

مشخصات کتاب

نویسنده
Feipeng Liu
سال انتشار
۲۰۱۳
فرمت
PDF
زبان
انگلیسی
تعداد صفحات
۵ صفحه
حجم فایل
۷٫۲ مگابایت

دربارهٔ کتاب

A step-by-step tutorial with more than 60 concise recipes on Android NDK development skills Overview Build, debug, and profile Android NDK apps Implement part of Android apps in native C/C++ code. Optimize code performance in assembly with Android NDK. In Detail Building Android applications would usually mean that you spend all of your time working in Java. There are however times when this is not the most efficient or best method for the application being built. This is where Android NDK comes in. Android NDK allows the developer to write in Native C/C++, giving you the power to reuse code and libraries and also, in most cases, increase the speed and efficiency of your application. The «Android Native Development Kit Cookbook» will help you understand the development, building, and debugging of your native Android applications. We will discover and learn JNI programming and essential NDK APIs such as OpenGL ES, and the native application API. We will then explore the process of porting existing libraries and software to NDK. By the end of this book you will be able to build your own apps in NDK apps. «Android Native Development Kit Cookbook» begins with basic recipes that will help you in the building and debugging of native apps, and JNI programming. The recipes cover various topics of application development with Android NDK such as OpenGL programming and Multimedia programming. We will begin with a simple recipe, Hello NDK, before moving on to cover advanced topics with recipes on OpenGL ES that focus on 2D and 3D graphics, as well as recipes that discuss working with NDK and external APIs. If you are looking for ways to make your application available in Android and take measures to boost your application’s performance, then this Cookbook is for you. What you will learn from this book Develop Android apps in C/C++ without a single line of Java. Program 2D/3D graphics with both OpenGL ES 1x and 2.0 in Android NDK. Write multi-threaded Android apps in Android NDK. Port existing C/C++ libraries and applications to Android with NDK. Develop multimedia Android apps with Android NDK. Cover 1 Copyright 3 Credits 4 About the Author 5 About the Reviewers 6 www.PacktPub.com 7 Table of Contents 8 Preface 12 Chapter 1: Hello NDK 18 Introduction 18 Setting up an Android NDK development environment in Windows 19 Setting up an Android NDK development environment in Ubuntu Linux 27 Setting up an Android NDK development environment in Mac OS 30 Updating Android NDK 31 Writing a Hello NDK program 33 Chapter 2: Java Native Interface 38 Introduction 39 Loading native libraries and registering native methods 40 Passing parameters and receiving returns in primitive types 45 Manipulating strings in JNI 50 Managing references in JNI 54 Manipulating classes in JNI 61 Manipulating objects in JNI 64 Manipulating arrays in JNI 68 Accessing Java static and instance fields in the native code 73 Calling static and instance methods from native code 78 Caching jfieldID, jmethodID, and referencing data to improve performance 84 Checking errors and handling exceptions in JNI 87 Integrating assembly code in JNI 91 Chapter 3: Build and Debug NDK Applications 94 Introduction 94 Building an Android NDK application at the command line 95 Building an Android NDK application in Eclipse 104 Building an Android NDK application for different ABIs 108 Building an Android NDK applications for different CPU features 113 Debugging an Android NDK application with logging messages 117 Debugging an Android NDK application with CheckJNI 121 Debugging an Android NDK application with NDK GDB 124 Debugging an Android NDK application with CGDB 127 Debugging an Android NDK application in Eclipse 130 Chapter 4: Android NDK OpenGL ES API 134 Introduction 134 Drawing 2D Graphics and applying transforms with OpenGL ES 1.x API 138 Drawing 3D graphics and lighting up the scene with the OpenGL ES 1.x API 144 Mapping texture to 3D objects with the OpenGL ES 1.x API 151 Drawing 3D graphics with the OpenGL ES 2.0 API 156 Displaying graphics with EGL 163 Chapter 5: Android Native Application API 170 Introduction 170 Creating a native activity with the native_activity.h interface 172 Creating a native activity with the Android native app glue 177 Managing native windows at Android NDK 185 Detecting and handling input events at Android NDK 189 Accessing sensors at Android NDK 192 Managing assets at Android NDK 197 Chapter 6: Android NDK Multithreading 202 Introduction 202 Creating and terminating native threads at Android NDK 203 Synchronizing native threads with mutex at Android NDK 206 Synchronizing native threads with conditional variables at Android NDK 211 Synchronizing native threads with reader/writer locks at Android NDK 217 Synchronizing native threads with semaphore at Android NDK 223 Scheduling native threads at Android NDK 228 Managing data for native threads at Android NDK 239 Chapter 7: Other Android NDK API 244 Introduction 244 Programming with the jnigraphics library in Android NDK 245 Programming with the dynamic linker library in Android NDK 249 Programming with the zlib compression library in Android NDK 252 Programming audio with the OpenSL ES audio library in Android NDK 258 Programming with the OpenMAX AL multimedia library in Android NDK 270 Chapter 8: Porting and Using the Existing Libraries with Android NDK 276 Introduction 276 Porting a library as a shared library module with the Android NDK build system 277 Porting a library as a static library module with the Android NDK build system 282 Porting a library with its existing build system using the Android NDK toolchain 286 Using a library as a prebuilt library 291 Using a library in multiple projects with import-module 293 Porting a library that requires RTTI, exception, and STL support 296 Chapter 9: Porting an Existing Application to Android with NDK 304 Introduction 304 Porting a command-line executable to Android with an NDK build system 305 Porting a command-line executable to Android with an NDK standalone compiler 309 Adding GUI to a ported Android app 316 Using background threads at porting 321 Index 330 Create Android apps using Native C/C++ with the expert guidance contained in this cookbook. From basic routines to advanced multimedia development, it helps you harness the full power of Android NDK. Overview In Detail Building Android applications would usually mean that you spend all of your time working in Java. There are however times when this is not the most efficient or best method for the application being built. This is where Android NDK comes in. Android NDK allows the developer to write in Native C/C++, giving you the power to reuse code and libraries and also, in most cases, increase the speed and efficiency of your application. The "Android Native Development Kit Cookbook" will help you understand the development, building, and debugging of your native Android applications. We will discover and learn JNI programming and essential NDK APIs such as OpenGL ES, and the native application API. We will then explore the process of porting existing libraries and software to NDK. By the end of this book you will be able to build your own apps in NDK apps. "Android Native Development Kit Cookbook" begins with basic recipes that will help you in the building and debugging of native apps, and JNI programming. The recipes cover various topics of application development with Android NDK such as OpenGL programming and Multimedia programming. We will begin with a simple recipe, Hello NDK, before moving on to cover advanced topics with recipes on OpenGL ES that focus on 2D and 3D graphics, as well as recipes that discuss working with NDK and external APIs. If you are looking for ways to make your application available in Android and take measures to boost your applications performance, then this Cookbook is for you. What you will learn from this book Approach This book is written in a Cookbook style, beginning with recipes which focus on helping developers make their software/application available in Android. Who this book is written for Android developers who want to learn Android NDK programming, or develop multimedia and games in Android NDK will benefit from this book.

In Detail

Building Android applications would usually mean that you spend all of your time working in Java. There are however times when this is not the most efficient or best method for the application being built. This is where Android NDK comes in. Android NDK allows the developer to write in Native C/C++, giving you the power to reuse code and libraries and also, in most cases, increase the speed and efficiency of your application.

The "Android Native Development Kit Cookbook" will help you understand the development, building, and debugging of your native Android applications. We will discover and learn JNI programming and essential NDK APIs such as OpenGL ES, and the native application API. We will then explore the process of porting existing libraries and software to NDK. By the end of this book you will be able to build your own apps in NDK apps.

"Android Native Development Kit Cookbook" begins with basic recipes that will help you in the building and debugging of native apps, and JNI programming. The recipes cover various topics of application development with Android NDK such as OpenGL programming and Multimedia programming. We will begin with a simple recipe, Hello NDK, before moving on to cover advanced topics with recipes on OpenGL ES that focus on 2D and 3D graphics, as well as recipes that discuss working with NDK and external APIs. If you are looking for ways to make your application available in Android and take measures to boost your application's performance, then this Cookbook is for you.

Approach

This book is written in a Cookbook style, beginning with recipes which focus on helping developers make their software/application available in Android.

Who this book is for

Android developers who want to learn Android NDK programming, or develop multimedia and games in Android NDK will benefit from this book.

Create Android apps using Native C/C++ with the expert guidance contained in this cookbook. From basic routines to advanced multimedia development, it helps you harness the full power of Android NDK. Build, debug, and profile Android NDK apps Implement part of Android apps in native C/C++ code Optimize code performance in assembly with Android NDK In Detail Building Android applications would usually mean that you spend all of your time working in Java. There are however times when this is not the most efficient or best method for the application being built. This is where Android NDK comes in. Android NDK allows the developer to write in Native C/C++, giving you the power to reuse code and libraries and also, in most cases, increase the speed and efficiency of your application. The "Android Native Development Kit Cookbook" will help you understand the development, building, and debugging of your native Android applications. We will discover and learn JNI programming and essential NDK APIs such as OpenGL ES, and the native application API. We will then explore the process of porting existing libraries and software to NDK. By the end of this book you will be able to build your own apps in NDK apps. "Android Native Development Kit Cookbook" begins with basic recipes that will help you in the building and debugging of native apps, and JNI programming. The recipes cover various topics of application development with Android NDK such as OpenGL programming and Multimedia programming. We will begin with a simple recipe, Hello NDK, before moving on to cover advanced topics with recipes on OpenGL ES that focus on 2D and 3D graphics, as well as recipes that discuss working with NDK and external APIs. If you are looking for ways to make your application available in Android and take measures to boost your application's performance, then this Cookbook is for you In Detail The number of mobile apps has grown exponentially in the last two years. If you want to join the crowd, Google's App Inventor is the easiest and best tool for you to get started with. It is a tool to create Android phone apps and uses a graphical user interface, and drag and drop methods to create apps. It's so simple that anyone can build an app. Learn how Google App Inventor eliminates the mystery around programming. It is a visual language, where we simply drag and drop blocks (graphic elements representing blocks of code) in various combinations to give us applications that run on our phones or other Android-based devices. No programming background is required. Playing with blocks has never been more fun! The emphasis is on creating apps that work and that you understand fully. The first part of the book gives you a sound foundation in the basics, and lots of tips on how to use App Inventor. The second part is all about creating complete apps ready for real world use. The book includes apps that communicate, use databases to remember, surf the Web and other networks, use GPS and various sensors on your phone, and let you write or play games.Approach This book is written in the Beginner's Guide format that takes the reader through a series of steps to build exciting apps using Google's App Inventor.Who this book is for This book is perfect for people with little or no experience, not just Android developers. No matter your level of experience, you will find plenty of information that you can use to create powerful apps, apps that can be published on Android Market and other places Annotation An enjoyable, understandable, and eye-catching user interface is a key part of getting users to love your app. Users today expect a polished multimedia experience on their mobile device, and animation is a core part of that. The Android operating system is at the forefront of tablet and smartphone technology, and there is a plethora of opportunities for developing exciting applications with animation. Android 3.0 Animations Beginners Guide will introduce each of the most popular animation techniques to you. Using step-by-step instructions, you will learn how to create interactive dynamic forms, moving graphics, and 3D motion. You will be taken on a journey from simple stop motion animations and fades, through to moving input forms, then on to 3D motion and game graphics. In this book, you will create standalone animated graphics, three-dimensional lifts, fades, and spins. You will become adept at moving and transforming form data to bring boring old input forms and displays to life. Learn how game programmers create fast animations on the fly, and also build live wallpapers to liven up your users home-screens!If you are tired of writing lifeless interfaces and want to add some animated excitement, this is the book for you!A step-by step guide for creating, testing, and making use of stunning animations for android applications and games This is a practical hands-on book with clear instructions and lot of code examples. It takes a simple approach, guiding you through different architectural topics using realistic sample projects. A single project is implemented using different architectural styles to make the reader understand the details of each style. There are also many small independent code samples to explain design patterns, WCF, and localization. This book is for people familiar with the ASP.NET framework using either C# or VB.NET. You don't need to be an ASP.NET guru – the book is ideal for novice and intermediate developers. If reading about application architecture usually confuses you or sends you to sleep, then this book will be perfect for you! In short, any ASP.NET programmer who is confused or disoriented reading different books or materials on architectures wondering how and what to implement in their application, will definitely benefit from this book! Written in Packt's Beginner's Guide series, this book takes a step-by-step approach with each chapter made up of three to five tutorials that introduce and explain different animation concepts. All concepts are explained with real-world examples that are fun to read and work with. If you are familiar with developing Android applications and want to bring your apps to life by adding smashing animations, then this book is for you. The book assumes that you are comfortable with Java development and have familiarity with creating Android Views in XML and Java. The tutorials assume that you will wa

قیمت نهایی

۴۹٬۰۰۰ تومان