Android NDK: Beginner's Guide - Second Edition
eBook - ePub

Android NDK: Beginner's Guide - Second Edition

Sylvain Ratabouil

Partager le livre
  1. 494 pages
  2. English
  3. ePUB (adapté aux mobiles)
  4. Disponible sur iOS et Android
eBook - ePub

Android NDK: Beginner's Guide - Second Edition

Sylvain Ratabouil

DĂ©tails du livre
Aperçu du livre
Table des matiĂšres
Citations

À propos de ce livre

About This Book

  • Create high performance mobile applications with C/C++ and integrate with Java
  • Exploit advanced Android features such as graphics, sound, input, and sensing
  • Port and reuse your own or third-party libraries from the prolific C/C++ ecosystem

Who This Book Is For

Are you an Android Java programmer who needs more performance? Are you a C/C++ developer who doesn't want to bother with the complexity of Java and its out-of-control garbage collector? Do you want to create fast intensive multimedia applications or games? If you've answered yes to any of these questions then this book is for you. With some general knowledge of C/C++ development, you will be able to dive headfirst into native Android development.

Foire aux questions

Comment puis-je résilier mon abonnement ?
Il vous suffit de vous rendre dans la section compte dans paramĂštres et de cliquer sur « RĂ©silier l’abonnement ». C’est aussi simple que cela ! Une fois que vous aurez rĂ©siliĂ© votre abonnement, il restera actif pour le reste de la pĂ©riode pour laquelle vous avez payĂ©. DĂ©couvrez-en plus ici.
Puis-je / comment puis-je télécharger des livres ?
Pour le moment, tous nos livres en format ePub adaptĂ©s aux mobiles peuvent ĂȘtre tĂ©lĂ©chargĂ©s via l’application. La plupart de nos PDF sont Ă©galement disponibles en tĂ©lĂ©chargement et les autres seront tĂ©lĂ©chargeables trĂšs prochainement. DĂ©couvrez-en plus ici.
Quelle est la différence entre les formules tarifaires ?
Les deux abonnements vous donnent un accĂšs complet Ă  la bibliothĂšque et Ă  toutes les fonctionnalitĂ©s de Perlego. Les seules diffĂ©rences sont les tarifs ainsi que la pĂ©riode d’abonnement : avec l’abonnement annuel, vous Ă©conomiserez environ 30 % par rapport Ă  12 mois d’abonnement mensuel.
Qu’est-ce que Perlego ?
Nous sommes un service d’abonnement Ă  des ouvrages universitaires en ligne, oĂč vous pouvez accĂ©der Ă  toute une bibliothĂšque pour un prix infĂ©rieur Ă  celui d’un seul livre par mois. Avec plus d’un million de livres sur plus de 1 000 sujets, nous avons ce qu’il vous faut ! DĂ©couvrez-en plus ici.
Prenez-vous en charge la synthÚse vocale ?
Recherchez le symbole Écouter sur votre prochain livre pour voir si vous pouvez l’écouter. L’outil Écouter lit le texte Ă  haute voix pour vous, en surlignant le passage qui est en cours de lecture. Vous pouvez le mettre sur pause, l’accĂ©lĂ©rer ou le ralentir. DĂ©couvrez-en plus ici.
Est-ce que Android NDK: Beginner's Guide - Second Edition est un PDF/ePUB en ligne ?
Oui, vous pouvez accĂ©der Ă  Android NDK: Beginner's Guide - Second Edition par Sylvain Ratabouil en format PDF et/ou ePUB ainsi qu’à d’autres livres populaires dans Informatik et Anwendungsentwicklung. Nous disposons de plus d’un million d’ouvrages Ă  dĂ©couvrir dans notre catalogue.

Informations

Année
2015
ISBN
9781783989652

Android NDK Beginner's Guide Second Edition


Table of Contents

Android NDK Beginner's Guide Second Edition
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Sections
Time for action – heading
What just happened?
Have a go hero – heading
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. Setting Up Your Environment
Getting started with Android development
Setting up Windows
Time for action – preparing Windows for Android development
What just happened?
Installing Android development kits on Windows
Time for action – installing Android SDK and NDK on Windows
What just happened?
Setting up OS X
Time for action – preparing OS X for Android development
What just happened?
Installing Android development kits on OS X
Time for action – installing Android SDK and NDK on OS X
What just happened?
Setting up Linux
Time for action – preparing Ubuntu for Android development
What just happened?
Installing Android development kits on Linux
Time for action – installing Android SDK and NDK on Ubuntu
What just happened?
Installing the Eclipse IDE
Time for action – installing Eclipse with ADT on your OS
What just happened?
Setting up the Android emulator
Time for action – creating an Android virtual device
What just happened?
Developing with an Android device
Time for action – setting up an Android device
What just happened?
More about ADB
Summary
2. Starting a Native Android Project
Building NDK sample applications
Time for action – compiling and deploying San Angeles sample
What just happened?
Generating project files with Android manager
Compiling native code with NDK-Build
Building and packaging an application with Ant
Deploying an application package with Ant
Launching an application with ADB Shell
More about Android tooling
Creating your first native Android project
Time for action – creating a native Android project
What just happened?
Introducing Dalvik and ART
Interfacing Java with C/C++
Time for action – calling C code from Java
What just happened?
Debugging native Android applications
Time for action – debugging a native Android application
What just happened?
Defining NDK application-wide settings
NDK-GDB day-to-day
Analyzing native crash dumps
Time for action – analyzing a native crash dump
What just happened?
Deciphering crash dumps
Setting up a Gradle project to compile native code
Time for action – creating a native Android project
What just happened?
Time for action – using your own Makefiles with Gradle
What just happened?
Summary
3. Interfacing Java and C/C++ with JNI
Initializing a native JNI library
Time for action – defining a simple GUI
What just happened?
Time for action – initializing the native store
What just happened?
Converting Java strings in native code
Time for action – handling strings in the native store
What just happened?
Native character encoding
JNI String API
Passing Java primitives to native code
Time for action – handling primitives in the native store
What just happened?
Have a go hero – passing and returning other primitive types
Referencing Java objects from native code
Time for action – saving references to Objects in native Store
What just happened?
Local references
Global references
Weak references
Managing Java arrays
Time for action – handling Java arrays in native Store
What just happened?
Primitive arrays
Have a go hero – handling other array types
Object arrays
Raising and checking Java exceptions
Time for action – raising & catching exceptions in native Store
What just happened?
Executing code in Exception state
Exception handling API
Summary
4. Calling Java Back from Native Code
Calling Java back from native code
Time for action – determining JNI method signatures
What just happened?
Time for action – calling back Java from native code
What just happened?
More on the JNI Reflection API
Debugging JNI
Synchronizing Java and native threads
Time for action – allocating an object with JNI
What just happened?
Time for action – running and synchronizing a thread
What just happened?
Synchronizing Java and C/C++ with JNI Monitors
Attaching and detaching native threads
Processing bitmaps natively
Time for action – decoding a camera's feed
What just happened?
Time for action – processing pictures with the Bitmap API
What just happened?
Registering native methods manually
JNI in C versus JNI in C++
Summary
5. Writing a Fully Native Application
Creating a native Activity
Time for action – creating a basic native Activity
What just happened?
More about the Native App Glue
Handling Activity events
Time for action – stepping the event loop
What just happened?
Time for action – handling Activity events
What just happened?
Accessing window surface natively
Time for action – displaying raw graphics
What just happened?
Measuring time natively
Time for action – animating graphics with a timer
What just happened?
Summary
6. Rendering Graphics with OpenGL ES
Initializing OpenGL ES
Time for action – initializing OpenGL ES
What just happened?
Time for action – clearing and swapping buffers
What just happened?
An insight into the OpenGL pipeline
Loading textures using the Asset manager
Time for action – reading assets with the Asset manager
What just happened?
More about the Asset Manager API
Time for action – compiling and embedding libpng module
What just happened?
Time for action – loading a PNG image
What just happened?
Time for action – generating an OpenGL texture
What just happened?
More about textures
Drawing 2D sprites
Time for action – initializing OpenGL ES
What just happened?
Vertex Arrays versus Vertex Buffer Object
Rendering particle effec...

Table des matiĂšres