Merge "Delete the NDK docs from Git. They're now in Piper, as per: https://critique.corp.google.com/#review/126357681" into nyc-dev
@@ -1,6 +0,0 @@
|
|||||||
toc:
|
|
||||||
- title: Downloads
|
|
||||||
path: /ndk/downloads/index.html
|
|
||||||
|
|
||||||
- title: Revision History
|
|
||||||
path: /ndk/downloads/revision_history.html
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
<?cs # Table of contents for Dev Guide.
|
|
||||||
|
|
||||||
For each document available in translation, add an localized title to this TOC.
|
|
||||||
Do not add localized title for docs not available in translation.
|
|
||||||
Below are template spans for adding localized doc titles. Please ensure that
|
|
||||||
localized titles are added in the language order specified below.
|
|
||||||
?>
|
|
||||||
|
|
||||||
<ul id="nav">
|
|
||||||
<li class="nav-section">
|
|
||||||
<div class="nav-section-header empty"><a href="/ndk/downloads/index.html"><span class="en">
|
|
||||||
Downloads</span></a></div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="nav-section">
|
|
||||||
<div class="nav-section-header empty"><a href="/ndk/downloads/revision_history.html">
|
|
||||||
<span class="en">Revision History</span></a></div>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
|
||||||
<!--
|
|
||||||
buildToggleLists();
|
|
||||||
changeNavLang(getLangPref());
|
|
||||||
//-->
|
|
||||||
</script>
|
|
||||||
|
|
||||||
@@ -1,530 +0,0 @@
|
|||||||
ndk=true
|
|
||||||
page.template=sdk
|
|
||||||
page.title=NDK Downloads
|
|
||||||
|
|
||||||
@jd:body
|
|
||||||
|
|
||||||
|
|
||||||
<!-- start studio download modal -->
|
|
||||||
<div data-modal="ndk_tos" class="dac-modal" id="ndk_tos">
|
|
||||||
<div class="dac-modal-container">
|
|
||||||
<div class="dac-modal-window">
|
|
||||||
<header class="dac-modal-header">
|
|
||||||
<div class="dac-modal-header-actions">
|
|
||||||
<button class="dac-modal-header-close" data-modal-toggle></button>
|
|
||||||
</div>
|
|
||||||
<section class="dac-swap-section dac-active dac-down">
|
|
||||||
<h2 class="norule dac-modal-header-title" id="tos-header">Download the Android NDK</h2>
|
|
||||||
</section>
|
|
||||||
</header>
|
|
||||||
<section class="dac-swap-section dac-active dac-left">
|
|
||||||
<section class="dac-modal-content">
|
|
||||||
<fieldset class="dac-form-fieldset">
|
|
||||||
<div class="cols">
|
|
||||||
<div class="col-2of2 tos-leftCol">
|
|
||||||
<p class="sdk-terms-intro">Before installing the Android
|
|
||||||
NDK,
|
|
||||||
you must agree to the following terms
|
|
||||||
and conditions.</p>
|
|
||||||
</div>
|
|
||||||
<div class="sdk-terms" style="width:auto" onfocus="this.blur()">
|
|
||||||
<h2 class="norule">Terms and Conditions</h2>
|
|
||||||
This is the Android Software Development Kit License Agreement
|
|
||||||
|
|
||||||
<h3>1. Introduction</h3>
|
|
||||||
1.1 The Android Software Development Kit (referred to in the License Agreement as the "SDK" and
|
|
||||||
specifically including the Android system files, packaged APIs, and Google APIs add-ons) is
|
|
||||||
licensed to you subject to the terms of the License Agreement. The License Agreement forms a
|
|
||||||
legally binding contract between you and Google in relation to your use of the SDK.
|
|
||||||
|
|
||||||
1.2 "Android" means the Android software stack for devices, as made available under the Android
|
|
||||||
Open Source Project, which is located at the following URL: http://source.android.com/, as updated
|
|
||||||
from time to time.
|
|
||||||
|
|
||||||
1.3 A "compatible implementation" means any Android device that (i) complies with the Android
|
|
||||||
Compatibility Definition document, which can be found at the Android compatibility website
|
|
||||||
(http://source.android.com/compatibility) and which may be updated from time to time; and (ii)
|
|
||||||
successfully passes the Android Compatibility Test Suite (CTS).
|
|
||||||
|
|
||||||
1.4 "Google" means Google Inc., a Delaware corporation with principal place of business at 1600
|
|
||||||
Amphitheatre Parkway, Mountain View, CA 94043, United States.
|
|
||||||
|
|
||||||
|
|
||||||
<h3>2. Accepting this License Agreement</h3>
|
|
||||||
2.1 In order to use the SDK, you must first agree to the License Agreement. You may not use the SDK
|
|
||||||
if you do not accept the License Agreement.
|
|
||||||
|
|
||||||
2.2 By clicking to accept, you hereby agree to the terms of the License Agreement.
|
|
||||||
|
|
||||||
2.3 You may not use the SDK and may not accept the License Agreement if you are a person barred
|
|
||||||
from receiving the SDK under the laws of the United States or other countries, including the
|
|
||||||
country in which you are resident or from which you use the SDK.
|
|
||||||
|
|
||||||
2.4 If you are agreeing to be bound by the License Agreement on behalf of your employer or other
|
|
||||||
entity, you represent and warrant that you have full legal authority to bind your employer or such
|
|
||||||
entity to the License Agreement. If you do not have the requisite authority, you may not accept the
|
|
||||||
License Agreement or use the SDK on behalf of your employer or other entity.
|
|
||||||
|
|
||||||
|
|
||||||
<h3>3. SDK License from Google</h3>
|
|
||||||
3.1 Subject to the terms of the License Agreement, Google grants you a limited, worldwide,
|
|
||||||
royalty-free, non-assignable, non-exclusive, and non-sublicensable license to use the SDK solely to
|
|
||||||
develop applications for compatible implementations of Android.
|
|
||||||
|
|
||||||
3.2 You may not use this SDK to develop applications for other platforms (including non-compatible
|
|
||||||
implementations of Android) or to develop another SDK. You are of course free to develop
|
|
||||||
applications for other platforms, including non-compatible implementations of Android, provided
|
|
||||||
that this SDK is not used for that purpose.
|
|
||||||
|
|
||||||
3.3 You agree that Google or third parties own all legal right, title and interest in and to the
|
|
||||||
SDK, including any Intellectual Property Rights that subsist in the SDK. "Intellectual Property
|
|
||||||
Rights" means any and all rights under patent law, copyright law, trade secret law, trademark law,
|
|
||||||
and any and all other proprietary rights. Google reserves all rights not expressly granted to you.
|
|
||||||
|
|
||||||
3.4 You may not use the SDK for any purpose not expressly permitted by the License Agreement.
|
|
||||||
Except to the extent required by applicable third party licenses, you may not: (a) copy (except for
|
|
||||||
backup purposes), modify, adapt, redistribute, decompile, reverse engineer, disassemble, or create
|
|
||||||
derivative works of the SDK or any part of the SDK; or (b) load any part of the SDK onto a mobile
|
|
||||||
handset or any other hardware device except a personal computer, combine any part of the SDK with
|
|
||||||
other software, or distribute any software or device incorporating a part of the SDK.
|
|
||||||
|
|
||||||
3.5 Use, reproduction and distribution of components of the SDK licensed under an open source
|
|
||||||
software license are governed solely by the terms of that open source software license and not the
|
|
||||||
License Agreement.
|
|
||||||
|
|
||||||
3.6 You agree that the form and nature of the SDK that Google provides may change without prior
|
|
||||||
notice to you and that future versions of the SDK may be incompatible with applications developed
|
|
||||||
on previous versions of the SDK. You agree that Google may stop (permanently or temporarily)
|
|
||||||
providing the SDK (or any features within the SDK) to you or to users generally at Google's sole
|
|
||||||
discretion, without prior notice to you.
|
|
||||||
|
|
||||||
3.7 Nothing in the License Agreement gives you a right to use any of Google's trade names,
|
|
||||||
trademarks, service marks, logos, domain names, or other distinctive brand features.
|
|
||||||
|
|
||||||
3.8 You agree that you will not remove, obscure, or alter any proprietary rights notices (including
|
|
||||||
copyright and trademark notices) that may be affixed to or contained within the SDK.
|
|
||||||
|
|
||||||
|
|
||||||
<h3>4. Use of the SDK by You</h3>
|
|
||||||
4.1 Google agrees that it obtains no right, title or interest from you (or your licensors) under
|
|
||||||
the License Agreement in or to any software applications that you develop using the SDK, including
|
|
||||||
any intellectual property rights that subsist in those applications.
|
|
||||||
|
|
||||||
4.2 You agree to use the SDK and write applications only for purposes that are permitted by (a) the
|
|
||||||
License Agreement and (b) any applicable law, regulation or generally accepted practices or
|
|
||||||
guidelines in the relevant jurisdictions (including any laws regarding the export of data or
|
|
||||||
software to and from the United States or other relevant countries).
|
|
||||||
|
|
||||||
4.3 You agree that if you use the SDK to develop applications for general public users, you will
|
|
||||||
protect the privacy and legal rights of those users. If the users provide you with user names,
|
|
||||||
passwords, or other login information or personal information, you must make the users aware that
|
|
||||||
the information will be available to your application, and you must provide legally adequate
|
|
||||||
privacy notice and protection for those users. If your application stores personal or sensitive
|
|
||||||
information provided by users, it must do so securely. If the user provides your application with
|
|
||||||
Google Account information, your application may only use that information to access the user's
|
|
||||||
Google Account when, and for the limited purposes for which, the user has given you permission to
|
|
||||||
do so.
|
|
||||||
|
|
||||||
4.4 You agree that you will not engage in any activity with the SDK, including the development or
|
|
||||||
distribution of an application, that interferes with, disrupts, damages, or accesses in an
|
|
||||||
unauthorized manner the servers, networks, or other properties or services of any third party
|
|
||||||
including, but not limited to, Google or any mobile communications carrier.
|
|
||||||
|
|
||||||
4.5 You agree that you are solely responsible for (and that Google has no responsibility to you or
|
|
||||||
to any third party for) any data, content, or resources that you create, transmit or display
|
|
||||||
through Android and/or applications for Android, and for the consequences of your actions
|
|
||||||
(including any loss or damage which Google may suffer) by doing so.
|
|
||||||
|
|
||||||
4.6 You agree that you are solely responsible for (and that Google has no responsibility to you or
|
|
||||||
to any third party for) any breach of your obligations under the License Agreement, any applicable
|
|
||||||
third party contract or Terms of Service, or any applicable law or regulation, and for the
|
|
||||||
consequences (including any loss or damage which Google or any third party may suffer) of any such
|
|
||||||
breach.
|
|
||||||
|
|
||||||
|
|
||||||
<h3>5. Your Developer Credentials</h3>
|
|
||||||
5.1 You agree that you are responsible for maintaining the confidentiality of any developer
|
|
||||||
credentials that may be issued to you by Google or which you may choose yourself and that you will
|
|
||||||
be solely responsible for all applications that are developed under your developer credentials.
|
|
||||||
|
|
||||||
|
|
||||||
<h3>6. Privacy and Information</h3>
|
|
||||||
6.1 In order to continually innovate and improve the SDK, Google may collect certain usage
|
|
||||||
statistics from the software including but not limited to a unique identifier, associated IP
|
|
||||||
address, version number of the software, and information on which tools and/or services in the SDK
|
|
||||||
are being used and how they are being used. Before any of this information is collected, the SDK
|
|
||||||
will notify you and seek your consent. If you withhold consent, the information will not be
|
|
||||||
collected.
|
|
||||||
|
|
||||||
6.2 The data collected is examined in the aggregate to improve the SDK and is maintained in
|
|
||||||
accordance with Google's Privacy Policy.
|
|
||||||
|
|
||||||
|
|
||||||
<h3>7. Third Party Applications</h3>
|
|
||||||
7.1 If you use the SDK to run applications developed by a third party or that access data, content
|
|
||||||
or resources provided by a third party, you agree that Google is not responsible for those
|
|
||||||
applications, data, content, or resources. You understand that all data, content or resources which
|
|
||||||
you may access through such third party applications are the sole responsibility of the person from
|
|
||||||
which they originated and that Google is not liable for any loss or damage that you may experience
|
|
||||||
as a result of the use or access of any of those third party applications, data, content, or
|
|
||||||
resources.
|
|
||||||
|
|
||||||
7.2 You should be aware the data, content, and resources presented to you through such a third
|
|
||||||
party application may be protected by intellectual property rights which are owned by the providers
|
|
||||||
(or by other persons or companies on their behalf). You may not modify, rent, lease, loan, sell,
|
|
||||||
distribute or create derivative works based on these data, content, or resources (either in whole
|
|
||||||
or in part) unless you have been specifically given permission to do so by the relevant owners.
|
|
||||||
|
|
||||||
7.3 You acknowledge that your use of such third party applications, data, content, or resources may
|
|
||||||
be subject to separate terms between you and the relevant third party. In that case, the License
|
|
||||||
Agreement does not affect your legal relationship with these third parties.
|
|
||||||
|
|
||||||
|
|
||||||
<h3>8. Using Android APIs</h3>
|
|
||||||
8.1 Google Data APIs
|
|
||||||
|
|
||||||
8.1.1 If you use any API to retrieve data from Google, you acknowledge that the data may be
|
|
||||||
protected by intellectual property rights which are owned by Google or those parties that provide
|
|
||||||
the data (or by other persons or companies on their behalf). Your use of any such API may be
|
|
||||||
subject to additional Terms of Service. You may not modify, rent, lease, loan, sell, distribute or
|
|
||||||
create derivative works based on this data (either in whole or in part) unless allowed by the
|
|
||||||
relevant Terms of Service.
|
|
||||||
|
|
||||||
8.1.2 If you use any API to retrieve a user's data from Google, you acknowledge and agree that you
|
|
||||||
shall retrieve data only with the user's explicit consent and only when, and for the limited
|
|
||||||
purposes for which, the user has given you permission to do so.
|
|
||||||
|
|
||||||
|
|
||||||
<h3>9. Terminating this License Agreement</h3>
|
|
||||||
9.1 The License Agreement will continue to apply until terminated by either you or Google as set
|
|
||||||
out below.
|
|
||||||
|
|
||||||
9.2 If you want to terminate the License Agreement, you may do so by ceasing your use of the SDK
|
|
||||||
and any relevant developer credentials.
|
|
||||||
|
|
||||||
9.3 Google may at any time, terminate the License Agreement with you if:
|
|
||||||
(A) you have breached any provision of the License Agreement; or
|
|
||||||
(B) Google is required to do so by law; or
|
|
||||||
(C) the partner with whom Google offered certain parts of SDK (such as APIs) to you has terminated
|
|
||||||
its relationship with Google or ceased to offer certain parts of the SDK to you; or
|
|
||||||
(D) Google decides to no longer provide the SDK or certain parts of the SDK to users in the country
|
|
||||||
in which you are resident or from which you use the service, or the provision of the SDK or certain
|
|
||||||
SDK services to you by Google is, in Google's sole discretion, no longer commercially viable.
|
|
||||||
|
|
||||||
9.4 When the License Agreement comes to an end, all of the legal rights, obligations and
|
|
||||||
liabilities that you and Google have benefited from, been subject to (or which have accrued over
|
|
||||||
time whilst the License Agreement has been in force) or which are expressed to continue
|
|
||||||
indefinitely, shall be unaffected by this cessation, and the provisions of paragraph 14.7 shall
|
|
||||||
continue to apply to such rights, obligations and liabilities indefinitely.
|
|
||||||
|
|
||||||
|
|
||||||
<h3>10. DISCLAIMER OF WARRANTIES</h3>
|
|
||||||
10.1 YOU EXPRESSLY UNDERSTAND AND AGREE THAT YOUR USE OF THE SDK IS AT YOUR SOLE RISK AND THAT THE
|
|
||||||
SDK IS PROVIDED "AS IS" AND "AS AVAILABLE" WITHOUT WARRANTY OF ANY KIND FROM GOOGLE.
|
|
||||||
|
|
||||||
10.2 YOUR USE OF THE SDK AND ANY MATERIAL DOWNLOADED OR OTHERWISE OBTAINED THROUGH THE USE OF THE
|
|
||||||
SDK IS AT YOUR OWN DISCRETION AND RISK AND YOU ARE SOLELY RESPONSIBLE FOR ANY DAMAGE TO YOUR
|
|
||||||
COMPUTER SYSTEM OR OTHER DEVICE OR LOSS OF DATA THAT RESULTS FROM SUCH USE.
|
|
||||||
|
|
||||||
10.3 GOOGLE FURTHER EXPRESSLY DISCLAIMS ALL WARRANTIES AND CONDITIONS OF ANY KIND, WHETHER EXPRESS
|
|
||||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO THE IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
|
|
||||||
|
|
||||||
|
|
||||||
<h3>11. LIMITATION OF LIABILITY</h3>
|
|
||||||
11.1 YOU EXPRESSLY UNDERSTAND AND AGREE THAT GOOGLE, ITS SUBSIDIARIES AND AFFILIATES, AND ITS
|
|
||||||
LICENSORS SHALL NOT BE LIABLE TO YOU UNDER ANY THEORY OF LIABILITY FOR ANY DIRECT, INDIRECT,
|
|
||||||
INCIDENTAL, SPECIAL, CONSEQUENTIAL OR EXEMPLARY DAMAGES THAT MAY BE INCURRED BY YOU, INCLUDING ANY
|
|
||||||
LOSS OF DATA, WHETHER OR NOT GOOGLE OR ITS REPRESENTATIVES HAVE BEEN ADVISED OF OR SHOULD HAVE BEEN
|
|
||||||
AWARE OF THE POSSIBILITY OF ANY SUCH LOSSES ARISING.
|
|
||||||
|
|
||||||
|
|
||||||
<h3>12. Indemnification</h3>
|
|
||||||
12.1 To the maximum extent permitted by law, you agree to defend, indemnify and hold harmless
|
|
||||||
Google, its affiliates and their respective directors, officers, employees and agents from and
|
|
||||||
against any and all claims, actions, suits or proceedings, as well as any and all losses,
|
|
||||||
liabilities, damages, costs and expenses (including reasonable attorneys fees) arising out of or
|
|
||||||
accruing from (a) your use of the SDK, (b) any application you develop on the SDK that infringes
|
|
||||||
any copyright, trademark, trade secret, trade dress, patent or other intellectual property right of
|
|
||||||
any person or defames any person or violates their rights of publicity or privacy, and (c) any
|
|
||||||
non-compliance by you with the License Agreement.
|
|
||||||
|
|
||||||
|
|
||||||
<h3>13. Changes to the License Agreement</h3>
|
|
||||||
13.1 Google may make changes to the License Agreement as it distributes new versions of the SDK.
|
|
||||||
When these changes are made, Google will make a new version of the License Agreement available on
|
|
||||||
the website where the SDK is made available.
|
|
||||||
|
|
||||||
|
|
||||||
<h3>14. General Legal Terms</h3>
|
|
||||||
14.1 The License Agreement constitutes the whole legal agreement between you and Google and governs
|
|
||||||
your use of the SDK (excluding any services which Google may provide to you under a separate
|
|
||||||
written agreement), and completely replaces any prior agreements between you and Google in relation
|
|
||||||
to the SDK.
|
|
||||||
|
|
||||||
14.2 You agree that if Google does not exercise or enforce any legal right or remedy which is
|
|
||||||
contained in the License Agreement (or which Google has the benefit of under any applicable law),
|
|
||||||
this will not be taken to be a formal waiver of Google's rights and that those rights or remedies
|
|
||||||
will still be available to Google.
|
|
||||||
|
|
||||||
14.3 If any court of law, having the jurisdiction to decide on this matter, rules that any
|
|
||||||
provision of the License Agreement is invalid, then that provision will be removed from the License
|
|
||||||
Agreement without affecting the rest of the License Agreement. The remaining provisions of the
|
|
||||||
License Agreement will continue to be valid and enforceable.
|
|
||||||
|
|
||||||
14.4 You acknowledge and agree that each member of the group of companies of which Google is the
|
|
||||||
parent shall be third party beneficiaries to the License Agreement and that such other companies
|
|
||||||
shall be entitled to directly enforce, and rely upon, any provision of the License Agreement that
|
|
||||||
confers a benefit on (or rights in favor of) them. Other than this, no other person or company
|
|
||||||
shall be third party beneficiaries to the License Agreement.
|
|
||||||
|
|
||||||
14.5 EXPORT RESTRICTIONS. THE SDK IS SUBJECT TO UNITED STATES EXPORT LAWS AND REGULATIONS. YOU MUST
|
|
||||||
COMPLY WITH ALL DOMESTIC AND INTERNATIONAL EXPORT LAWS AND REGULATIONS THAT APPLY TO THE SDK. THESE
|
|
||||||
LAWS INCLUDE RESTRICTIONS ON DESTINATIONS, END USERS AND END USE.
|
|
||||||
|
|
||||||
14.6 The rights granted in the License Agreement may not be assigned or transferred by either you
|
|
||||||
or Google without the prior written approval of the other party. Neither you nor Google shall be
|
|
||||||
permitted to delegate their responsibilities or obligations under the License Agreement without the
|
|
||||||
prior written approval of the other party.
|
|
||||||
|
|
||||||
14.7 The License Agreement, and your relationship with Google under the License Agreement, shall be
|
|
||||||
governed by the laws of the State of California without regard to its conflict of laws provisions.
|
|
||||||
You and Google agree to submit to the exclusive jurisdiction of the courts located within the
|
|
||||||
county of Santa Clara, California to resolve any legal matter arising from the License Agreement.
|
|
||||||
Notwithstanding this, you agree that Google shall still be allowed to apply for injunctive remedies
|
|
||||||
(or an equivalent type of urgent legal relief) in any jurisdiction.
|
|
||||||
|
|
||||||
<em>November 20, 2015</em>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div id="sdk-terms-form">
|
|
||||||
<p>
|
|
||||||
<input id="agree" type="checkbox" name="agree" value="1" onclick="onAgreeChecked()" />
|
|
||||||
<label id="agreeLabel" for="agree">I have read and agree with the above terms and conditions</label>
|
|
||||||
</p>
|
|
||||||
<p><a href="" class="button disabled" id="downloadForRealz" onclick="return onDownloadForRealz(this);"></a></p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</fieldset>
|
|
||||||
</section>
|
|
||||||
</form>
|
|
||||||
</section>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- end ndk_tos modal -->
|
|
||||||
|
|
||||||
|
|
||||||
<p>Select, from the table above, the NDK package for your development platform. For information
|
|
||||||
about the changes in the newest version of the NDK, see <a href="#rel">Release Notes</a>. For
|
|
||||||
information about earlier revisions, see <a href="{@docRoot}ndk/downloads/revision_history.html">
|
|
||||||
NDK Revision History.</a></p>
|
|
||||||
|
|
||||||
|
|
||||||
<script>
|
|
||||||
$('#Downloads').after($('#download-table'));
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<h2 id="rel">Release Notes</h2>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Android NDK, Revision 12 <em>(June 2016)</em>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<dl>
|
|
||||||
<dt>
|
|
||||||
Announcements
|
|
||||||
</dt>
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li>The <code>ndk-build</code> command will default to using
|
|
||||||
Clang in an upcoming release. GCC will be removed in a later release.
|
|
||||||
</li>
|
|
||||||
<li>The <code>make-standalone-toolchain.sh</code> script will be removed
|
|
||||||
in an upcoming release. If you use this script, please plan to migrate to the
|
|
||||||
<code>make_standalone_toolchain.py</code> as soon as possible.
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<dt>
|
|
||||||
NDK
|
|
||||||
</dt>
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li>Removed support for the armeabi-v7a-hard ABI. See the explanation in the
|
|
||||||
<a href=
|
|
||||||
"https://android.googlesource.com/platform/ndk/+/ndk-r12-release/docs/HardFloatAbi.md">
|
|
||||||
documentation</a>.
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li>Removed all sysroots for platform levels prior to Android 2.3 (API level 9).
|
|
||||||
We dropped support for them in NDK r11, but neglected to actually remove them.
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li>Updated exception handling when using c++_shared on ARM32 so that it
|
|
||||||
mostly works (see <a href="#known-issues">Known Issues</a>). The unwinder
|
|
||||||
is now linked into each linked object rather than into libc++ itself.
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li>Pruned the default compiler flags (<a href=
|
|
||||||
"https://github.com/android-ndk/ndk/issues/27">NDK Issue 27</a>). You can see
|
|
||||||
details of this update in <a href=
|
|
||||||
"https://android-review.googlesource.com/#/c/207721/5">Change 207721</a>.
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li>Added a Python implementation of standalone toolchains in <code>
|
|
||||||
build/tools/make_standalone_toolchain.py</code>. On Windows, you no longer
|
|
||||||
need Cygwin to use this feature. Note that the bash flavor will be removed
|
|
||||||
in an upcoming release, so please test the new one now.
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li>Configured Clang debug builds to have the <code>-fno-limit-debug-info</code>
|
|
||||||
option is enabled by default. This change enables better debugging with LLDB.
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li>Enabled the <code>--build-id</code> as a default option. This option
|
|
||||||
causes an identifier to be shown in native crash reports so you can easily
|
|
||||||
identify which version of your code was running.
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li>Fixed issue with <code>NDK_USE_CYGPATH</code> so that it no longer causes
|
|
||||||
problems with libgcc
|
|
||||||
(<a href="http://b.android.com/195486">Issue 195486</a>).
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li>Enabled the following options as default:
|
|
||||||
<code>-Wl,--warn-shared-textrel</code> and <code>-Wl,--fatal-warnings</code>.
|
|
||||||
If you have shared text relocations, your app does not load on Android 6.0
|
|
||||||
(API level 23) and higher. Note that this configuration has never been
|
|
||||||
allowed for 64-bit apps.
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li>Fixed a few issues so that precompiled headers work better
|
|
||||||
(<a href="https://github.com/android-ndk/ndk/issues/14">NDK Issue 14</a>,
|
|
||||||
<a href="https://github.com/android-ndk/ndk/issues/16">NDK Issue 16</a>).
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li>Removed unreachable ARM (non-thumb) STL libraries.
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li>Added Vulkan support to android-24.
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li>Added Choreographer API to android-24.
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li>Added libcamera2 APIs for devices that support the
|
|
||||||
<code>INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED</code> feature level or higher.
|
|
||||||
For more information, see the
|
|
||||||
<a href="{@docRoot}reference/android/hardware/camera2/CameraCharacteristics.html#INFO_SUPPORTED_HARDWARE_LEVEL">
|
|
||||||
<code>CameraCharacteristics</code></a> reference.
|
|
||||||
</li>
|
|
||||||
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<dt>
|
|
||||||
Clang
|
|
||||||
</dt>
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li>Clang has been updated to 3.8svn (r256229, build 2812033). Note that
|
|
||||||
Clang packaged in the Windows 64-bit NDK is actually 32-bit.
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li>Fixed <code>__thread</code> so that it works for real this time.
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<dt>
|
|
||||||
GCC
|
|
||||||
</dt>
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li>Synchronized the compiler with the ChromeOS GCC @ google/gcc-4_9 r227810.
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li>Backported coverage sanitizer patch from ToT (r231296).
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li>Fixed <code>libatomic</code> to not use ifuncs (<a href=
|
|
||||||
"https://github.com/android-ndk/ndk/issues/31">NDK Issue 31</a>).
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<dt>
|
|
||||||
Binutils
|
|
||||||
</dt>
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li>Silenced the "Erratum 843419 found and fixed" info messages.
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li>Introduced option <code>--long-plt</code> to fix an internal linker error
|
|
||||||
when linking huge arm32 binaries.
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li>Fixed wrong run time stubs for <code>AArch64</code>. This problem was
|
|
||||||
causing jump addresses to be calculated incorrectly for very large
|
|
||||||
dynamic shared objects (DSOs).
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li>Introduced default option <code>--no-apply-dynamic</code> to work around
|
|
||||||
a dynamic linker bug for earlier Android releases.
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li>Fixed a known issue with NDK r11 where <code>dynamic_cast</code> was not
|
|
||||||
working with Clang, x86, stlport_static and optimization.
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<dt>
|
|
||||||
GDB
|
|
||||||
</dt>
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li>Updated to GDB version 7.11. For more information about this release, see
|
|
||||||
<a href="https://www.gnu.org/software/gdb/news/">GDB News</a>.
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li>Fixed a number of bugs in the <code>ndk-gdb.py</code> script.
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<dt id="known-issues">
|
|
||||||
Known Issues
|
|
||||||
</dt>
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li>The x86 <a href="http://source.android.com/devices/tech/debug/asan.html">Address
|
|
||||||
Sanitizer</a> (ASAN) currently does not work. For more information, see
|
|
||||||
<a href="https://android-review.googlesource.com/#/c/186276/">Issue 186276</a>.
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li>Exception unwinding with <code>c++_shared</code> does not work for ARM on
|
|
||||||
Android 2.3 (API level 9) or Android 4.0 (API level 14).
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li>Bionic headers and libraries for Android 6.0 (API level 23) and higher
|
|
||||||
are not yet exposed despite the presence of android-24. Those platforms still
|
|
||||||
have the Android 5.0 (API level 21) headers and libraries, which is consistent
|
|
||||||
with NDK r11.
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li>The RenderScript tools are not present, which is consistent with
|
|
||||||
NDK r11.
|
|
||||||
(<a href="https://github.com/android-ndk/ndk/issues/7">NDK Issue 7</a>)
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li>In <code>NdkCameraMetadataTags.h</code> header file, the camera metadata
|
|
||||||
tag enum value <code>ACAMERA_STATISTICS_LENS_SHADING_CORRECTION_MAP</code>
|
|
||||||
was listed by accident and will be removed in next release. Use
|
|
||||||
the <code>ACAMERA_STATISTICS_LENS_SHADING_MAP</code> value instead.
|
|
||||||
</li>
|
|
||||||
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
</dl>
|
|
||||||
@@ -1,84 +0,0 @@
|
|||||||
toc:
|
|
||||||
- title: Getting Started
|
|
||||||
path: /ndk/guides/index.html
|
|
||||||
section:
|
|
||||||
- title: Setup
|
|
||||||
path: /ndk/guides/setup.html
|
|
||||||
- title: Concepts
|
|
||||||
path: /ndk/guides/concepts.html
|
|
||||||
|
|
||||||
- title: Building
|
|
||||||
path: /ndk/guides/build.html
|
|
||||||
section:
|
|
||||||
- title: Android.mk
|
|
||||||
path: /ndk/guides/android_mk.html
|
|
||||||
- title: Application.mk
|
|
||||||
path: /ndk/guides/application_mk.html
|
|
||||||
- title: ndk-build
|
|
||||||
path: /ndk/guides/ndk-build.html
|
|
||||||
- title: Standalone Toolchain
|
|
||||||
path: /ndk/guides/standalone_toolchain.html
|
|
||||||
|
|
||||||
- title: Architectures and CPUs
|
|
||||||
path: /ndk/guides/arch.html
|
|
||||||
section:
|
|
||||||
- title: ABI Management
|
|
||||||
path: /ndk/guides/abis.html
|
|
||||||
- title: NEON
|
|
||||||
path: /ndk/guides/cpu-arm-neon.html
|
|
||||||
- title: x86
|
|
||||||
path: /ndk/guides/x86.html
|
|
||||||
- title: x86-64
|
|
||||||
path: /ndk/guides/x86-64.html
|
|
||||||
- title: MIPS
|
|
||||||
path: /ndk/guides/mips.html
|
|
||||||
- title: The cpufeatures Library
|
|
||||||
path: /ndk/guides/cpu-features.html
|
|
||||||
|
|
||||||
- title: Debugging
|
|
||||||
path: /ndk/guides/debug.html
|
|
||||||
section:
|
|
||||||
- title: ndk-gdb
|
|
||||||
path: /ndk/guides/ndk-gdb.html
|
|
||||||
- title: ndk-stack
|
|
||||||
path: /ndk/guides/ndk-stack.html
|
|
||||||
|
|
||||||
- title: Libraries
|
|
||||||
path: /ndk/guides/libs.html
|
|
||||||
section:
|
|
||||||
- title: Prebuilt Libraries
|
|
||||||
path: /ndk/guides/prebuilts.html
|
|
||||||
- title: C++ Support
|
|
||||||
path: /ndk/guides/cpp-support.html
|
|
||||||
- title: Stable APIs
|
|
||||||
path: /ndk/guides/stable_apis.html
|
|
||||||
|
|
||||||
- title: Audio
|
|
||||||
path: /ndk/guides/audio/index.html
|
|
||||||
section:
|
|
||||||
- title: Basics
|
|
||||||
path: /ndk/guides/audio/basics.html
|
|
||||||
- title: OpenSL ES for Android
|
|
||||||
path: /ndk/guides/audio/opensl-for-android.html
|
|
||||||
- title: Audio Input Latency
|
|
||||||
path: /ndk/guides/audio/input-latency.html
|
|
||||||
- title: Audio Output Latency
|
|
||||||
path: /ndk/guides/audio/output-latency.html
|
|
||||||
- title: Floating-Point Audio
|
|
||||||
path: /ndk/guides/audio/floating-point.html
|
|
||||||
- title: Sample Rates
|
|
||||||
path: /ndk/guides/audio/sample-rates.html
|
|
||||||
- title: OpenSL ES Programming Notes
|
|
||||||
path: /ndk/guides/audio/opensl-prog-notes.html
|
|
||||||
|
|
||||||
- title: Vulkan
|
|
||||||
path: /ndk/guides/graphics/index.html
|
|
||||||
section:
|
|
||||||
- title: Getting Started
|
|
||||||
path: /ndk/guides/graphics/getting-started.html
|
|
||||||
- title: Design Guidelines
|
|
||||||
path: /ndk/guides/graphics/design-notes.html
|
|
||||||
- title: Shader Compilers
|
|
||||||
path: /ndk/guides/graphics/shader-compilers.html
|
|
||||||
- title: Validation Layers
|
|
||||||
path: /ndk/guides/graphics/validation-layer.html
|
|
||||||
@@ -1,469 +0,0 @@
|
|||||||
page.title=ABI Management
|
|
||||||
@jd:body
|
|
||||||
|
|
||||||
<div id="qv-wrapper">
|
|
||||||
<div id="qv">
|
|
||||||
<h2>On this page</h2>
|
|
||||||
|
|
||||||
<ol>
|
|
||||||
<li><a href="#sa">Supported ABIs</a></li>
|
|
||||||
<li><a href="#gc">Generating Code for a Specific ABI</a></li>
|
|
||||||
<li><a href="#am">ABI Management on the Android Platform</a></li>
|
|
||||||
</ol>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<p>Different Android handsets use different CPUs, which in turn support different instruction sets.
|
|
||||||
Each combination of CPU and instruction sets has its own Application Binary Interface, or
|
|
||||||
<i>ABI</i>. The ABI defines, with great precision, how an application's machine code is supposed to
|
|
||||||
interact with the system at runtime. You must specify an ABI for each CPU architecture you want
|
|
||||||
your app to work with.</p>
|
|
||||||
|
|
||||||
<p>A typical ABI includes the following information:</p>
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li>The CPU instruction set(s) that the machine code should use.</li>
|
|
||||||
<li>The endianness of memory stores and loads at runtime.</li>
|
|
||||||
<li>The format of executable binaries, such as programs and shared libraries, and
|
|
||||||
the types of content they support.</li>
|
|
||||||
<li>Various conventions for passing data between your code and the system.
|
|
||||||
These conventions include alignment constraints, as well as how the system uses the stack and
|
|
||||||
registers when it calls functions.</li>
|
|
||||||
<li>The list of function symbols available to your machine code at runtime,
|
|
||||||
generally from very specific sets of libraries.</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<p>This page enumerates the ABIs that the NDK supports, and provides information about how each ABI
|
|
||||||
works.</p>
|
|
||||||
|
|
||||||
<h2 id="sa">Supported ABIs</h2>
|
|
||||||
|
|
||||||
<p>Each ABI supports one or more instruction sets. Table 1 provides an at-a-glance overview of
|
|
||||||
the instruction sets each ABI supports.</p>
|
|
||||||
|
|
||||||
<p class="table-caption" id="abi-table">
|
|
||||||
<strong>Table 1.</strong> ABIs and supported instruction sets.</p>
|
|
||||||
|
|
||||||
<table>
|
|
||||||
<tr>
|
|
||||||
<th>ABI</th>
|
|
||||||
<th>Supported Instruction Set(s)</th>
|
|
||||||
<th>Notes</th>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td><a href="#armeabi">{@code armeabi}</a> </td>
|
|
||||||
<td><li>ARMV5TE and later</li>
|
|
||||||
<li>Thumb-1</li></td>
|
|
||||||
<td>No hard float.</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td><a href="#v7a">{@code armeabi-v7a}</a></td>
|
|
||||||
<td>
|
|
||||||
<li>armeabi</li>
|
|
||||||
<li>Thumb-2</li>
|
|
||||||
<li>VFPv3-D16</li>
|
|
||||||
<li>Other, optional</li></td>
|
|
||||||
<td>Incompatible with ARMv5, v6 devices.</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td><a href="#arm64-v8a">{@code arm64-v8a}</a></td>
|
|
||||||
<td><li>AArch-64</li></td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<a href="#x86">{@code x86}</a></td>
|
|
||||||
<td><li>x86 (IA-32)</li>
|
|
||||||
<li>MMX</li>
|
|
||||||
<li>SSE/2/3</li>
|
|
||||||
<li>SSSE3</li></td>
|
|
||||||
<td>No support for MOVBE or SSE4.</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td><a href="#86-64">{@code x86_64}</a> </td>
|
|
||||||
<td>
|
|
||||||
<li>x86-64</li>
|
|
||||||
<li>MMX</li>
|
|
||||||
<li>SSE/2/3</li>
|
|
||||||
<li>SSSE3</li>
|
|
||||||
<li>SSE4.1, 4.2</li>
|
|
||||||
<li>POPCNT</li></td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td><a href="#mips">{@code mips}</a></td>
|
|
||||||
<td><li>MIPS32r1 and later</li></td>
|
|
||||||
<td>Uses hard-float, and assumes a CPU:FPU clock ratio of 2:1 for maximum
|
|
||||||
compatibility. Provides neither micromips nor MIPS16.</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td><a href="#mips64">{@code mips64}</a></td>
|
|
||||||
<td><li>MIPS64r6</li></td><td>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<p>More detailed information about each ABI appears below.</p>
|
|
||||||
|
|
||||||
<h3 id="armeabi">armeabi</h3>
|
|
||||||
<p>This ABI is for ARM-based CPUs that support at least
|
|
||||||
the ARMv5TE instruction set. Please refer to the following documentation for
|
|
||||||
more details:</p>
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><a href="https://www.scss.tcd.ie/~waldroj/3d1/arm_arm.pdf">ARM Architecture
|
|
||||||
Reference Manual</a></li>
|
|
||||||
<li><a
|
|
||||||
href="http://infocenter.arm.com/help/topic/com.arm.doc.ihi0042e/IHI0042E_aapcs.pdf">
|
|
||||||
Procedure Call Standard for the ARM Architecture</a></li>
|
|
||||||
<li><a
|
|
||||||
href="http://infocenter.arm.com/help/topic/com.arm.doc.dui0101a/DUI0101A_Elf.pdf">
|
|
||||||
ARM ELF File Format</a></li>
|
|
||||||
<li><a
|
|
||||||
href="http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.subset.swdev.abi/index.html">Application Binary Interface (ABI) for the ARM Architecture</a></li>
|
|
||||||
<li><a
|
|
||||||
href="http://infocenter.arm.com/help/topic/com.arm.doc.ihi0037c/IHI0037C_bpabi.pdf">
|
|
||||||
Base Platform ABI for the ARM Architecture</a></li>
|
|
||||||
<li><a
|
|
||||||
href="http://infocenter.arm.com/help/topic/com.arm.doc.ihi0039c/IHI0039C_clibabi.pdf">
|
|
||||||
C Library ABI for the ARM Architecture</a></li>
|
|
||||||
<li><a
|
|
||||||
href="http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ihi0041d/index.html">
|
|
||||||
C++ ABI for the ARM Architecture</a></li>
|
|
||||||
<li><a
|
|
||||||
href="http://infocenter.arm.com/help/topic/com.arm.doc.ihi0043d/IHI0043D_rtabi.pdf">
|
|
||||||
Run-time ABI for the ARM Architecture</a></li>
|
|
||||||
<li><a href="http://www.sco.com/developers/gabi/2001-04-24/contents.html">ELF
|
|
||||||
System V Application Binary Interface</a></li>
|
|
||||||
<li><a href="http://mentorembedded.github.com/cxx-abi/abi.html">Generic/Itanium C++
|
|
||||||
ABI</a></li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<p>The AAPCS standard defines EABI as a family of similar
|
|
||||||
but distinct ABIs. Also, Android follows the little-endian
|
|
||||||
<a href="http://sourcery.mentor.com/sgpp/lite/arm/portal/kbattach142/arm_gnu_linux_ abi.pdf">
|
|
||||||
ARM GNU/Linux ABI</a>.</p>
|
|
||||||
|
|
||||||
<p>This ABI does not support hardware-assisted floating point
|
|
||||||
computations. Instead, all floating-point operations use software helper
|
|
||||||
functions from the compiler's {@code libgcc.a} static library.</p>
|
|
||||||
|
|
||||||
<p>The armeabi ABI supports ARM’s
|
|
||||||
<a href="http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0210c/CACBCAAE.html">
|
|
||||||
Thumb (a.k.a. Thumb-1) instruction set</a>. The NDK generates Thumb
|
|
||||||
code by default unless you specify different behavior using the
|
|
||||||
<code>LOCAL_ARM_MODE</code> variable in your
|
|
||||||
<a href="{@docRoot}ndk/guides/android_mk.html">{@code Android.mk}</a>
|
|
||||||
file.</p>
|
|
||||||
|
|
||||||
<h3 id="v7a">armeabi-v7a</h3>
|
|
||||||
<p>This ABI extends armeabi to include several
|
|
||||||
<a href="http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0406c/index.html">
|
|
||||||
CPU instruction set extensions</a>. The instruction extensions that this Android-specific
|
|
||||||
ABI supports are:</p>
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li>The Thumb-2 instruction set extension, which provides performance comparable to 32-bit ARM
|
|
||||||
instructions with similar compactness to Thumb-1.</li>
|
|
||||||
<li>The VFP hardware-FPU instructions. More specifically, VFPv3-D16, which
|
|
||||||
includes 16 dedicated 64-bit floating point registers, in addition to another
|
|
||||||
16 32-bit registers from the ARM core.</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<p>Other extensions that the v7-a ARM spec describes, including
|
|
||||||
<a href="http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0388f/Beijfcja.html">
|
|
||||||
Advanced SIMD</a> (a.k.a. NEON), VFPv3-D32, and ThumbEE, are optional
|
|
||||||
to this ABI. Since their presence is not guaranteed, the system should check at runtime
|
|
||||||
whether the extensions are available. If they are not, you must use alternative code paths. This
|
|
||||||
check is similar to the one that the system typically performs to check or use
|
|
||||||
<a href="http://en.wikipedia.org/wiki/MMX_%28instruction_set%29">MMX</a>,
|
|
||||||
<a href="http://en.wikipedia.org/wiki/SSE2">SSE2</a>, and other specialized
|
|
||||||
instruction sets on x86 CPUs.</p>
|
|
||||||
|
|
||||||
<p>For information about how to perform these runtime checks, refer to
|
|
||||||
<a href="{@docRoot}ndk/guides/cpu-features.html">The {@code cpufeatures} Library</a>.
|
|
||||||
Also, for information about the NDK's support for building
|
|
||||||
machine code for NEON, see
|
|
||||||
<a href="{@docRoot}ndk/guides/cpu-arm-neon.html">NEON Support</a>.</p>
|
|
||||||
|
|
||||||
<p>The {@code armeabi-v7a} ABI uses the {@code -mfloat-abi=softfp} switch to
|
|
||||||
enforce the rule that the compiler must pass all double values in core register pairs during
|
|
||||||
function calls, instead of dedicated floating-point ones. The system can perform all internal
|
|
||||||
computations using the FP registers. Doing so speeds up the computations greatly.</p>
|
|
||||||
|
|
||||||
<h3 id="arm64-v8a">arm64-v8a</h3>
|
|
||||||
<p>This ABI is for ARMv8-based CPUs that support AArch64. It also includes the NEON and
|
|
||||||
VFPv4 instruction sets.</p>
|
|
||||||
|
|
||||||
<p>For more information, see the
|
|
||||||
<a href="http://www.arm.com/files/downloads/ARMv8_Architecture.pdf">ARMv8
|
|
||||||
Technology Preview</a>, and contact ARM for further details.</p>
|
|
||||||
|
|
||||||
<h3 id="x86">x86</h3>
|
|
||||||
<p>This ABI is for CPUs supporting the instruction set commonly
|
|
||||||
referred to as "x86" or "IA-32". Characteristics of this ABI include:</p>
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li>Instructions normally generated by GCC with compiler flags such as the following:
|
|
||||||
|
|
||||||
<pre class="no-pretty-print">
|
|
||||||
-march=i686 -mtune=intel -mssse3 -mfpmath=sse -m32
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>These flags target the the Pentium Pro instruction set, along with the
|
|
||||||
the <a href="http://en.wikipedia.org/wiki/MMX_%28instruction_set%29">MMX</a>,
|
|
||||||
<a href="http://en.wikipedia.org/wiki/Streaming_SIMD_Extensions">SSE</a>,
|
|
||||||
<a href="http://en.wikipedia.org/wiki/SSE2">SSE2</a>,
|
|
||||||
<a href="http://en.wikipedia.org/wiki/SSE3">SSE3</a>, and
|
|
||||||
<a href="http://en.wikipedia.org/wiki/SSSE3">SSSE3</a> instruction set extensions.
|
|
||||||
The generated code is an optimization balanced across the top Intel 32-bit
|
|
||||||
CPUs.</p>
|
|
||||||
<p> For more information on compiler flags, particularly related to performance optimization,
|
|
||||||
refer to <a href="http://software.intel.com/blogs/2012/09/26/gcc-x86-performance-hints">GCC
|
|
||||||
x86 performance hints</a>.</p>
|
|
||||||
</li>
|
|
||||||
<li>Use of the standard Linux x86 32-bit calling convention, as opposed to the one for SVR. For
|
|
||||||
more information, see section 6, "Register Usage", of
|
|
||||||
<a href="http://www.agner.org/optimize/calling_conventions.pdf">Calling conventions for different
|
|
||||||
C++ compilers and operating systems</a>.</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<p>The ABI does not include any other optional IA-32 instruction set
|
|
||||||
extensions, such as:</p>
|
|
||||||
<ul>
|
|
||||||
<li>MOVBE</li>
|
|
||||||
<li>Any variant of SSE4.</li>
|
|
||||||
</ul>
|
|
||||||
<p>You can still use these extensions, as long as you use runtime feature-probing to
|
|
||||||
enable them, and provide fallbacks for devices that do not support them.</p>
|
|
||||||
<p>The NDK toolchain assumes 16-byte stack alignment before a function call. The default tools and
|
|
||||||
options enforce this rule. If you are writing assembly code, you must make sure to maintain stack
|
|
||||||
alignment, and ensure that other compilers also obey this rule.</p>
|
|
||||||
|
|
||||||
<p>Refer to the following documents for more details:</p>
|
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
<a href="https://gcc.gnu.org/onlinedocs/gcc-4.9.2/gcc/i386-and-x86-64-Options.html">
|
|
||||||
GCC online documentation: Intel 386 and AMD x86-64 Options</a></li>
|
|
||||||
<li><a href="http://www.agner.org/optimize/calling_conventions.pdf">Calling
|
|
||||||
conventions for different C++ compilers and operating systems</a></li>
|
|
||||||
<li><a
|
|
||||||
href="http://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-software-developer-instruction-set-reference-manual-325383.pdf"
|
|
||||||
>Intel IA-32 Intel Architecture Software Developer's Manual, Volume 2:
|
|
||||||
Instruction Set Reference</a></li>
|
|
||||||
<li><a
|
|
||||||
href="http://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-software-developer-system-programming-manual-325384.pdf">Intel
|
|
||||||
IA-32 Intel Architecture Software Developer's Manual, Volume 3: System
|
|
||||||
Programming Guide</a></li>
|
|
||||||
<li><a href="http://www.sco.com/developers/devspecs/abi386-4.pdf">System V Application Binary
|
|
||||||
Interface: Intel386 Processor Architecture Supplement</a></li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3 id="86-64">x86_64</h3>
|
|
||||||
<p>This ABI is for CPUs supporting the instruction set commonly referred to as
|
|
||||||
"x86-64." It supports instructions that GCC typically generates with the following
|
|
||||||
compiler flags:</p>
|
|
||||||
<pre class="no-pretty-print">
|
|
||||||
-march=x86-64 -msse4.2 -mpopcnt -m64 -mtune=intel
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>These flags target the x86-64 instruction set, according to the GCC
|
|
||||||
documentation. along with the
|
|
||||||
<a href="http://en.wikipedia.org/wiki/MMX_%28instruction_set%29">MMX</a>,
|
|
||||||
<a href="http://en.wikipedia.org/wiki/Streaming_SIMD_Extensions">SSE</a>,
|
|
||||||
<a href="http://en.wikipedia.org/wiki/SSE2">SSE2</a>,
|
|
||||||
<a href="http://en.wikipedia.org/wiki/SSE3">SSE3</a>,
|
|
||||||
<a href="http://en.wikipedia.org/wiki/SSSE3">SSSE3</a>,
|
|
||||||
<a href="http://en.wikipedia.org/wiki/SSE4#SSE4.1">SSE4.1</a>,
|
|
||||||
<a href="http://en.wikipedia.org/wiki/SSE4#SSE4.2">SSE4.2</a>, and
|
|
||||||
<a href="https://software.intel.com/en-us/node/512035">POPCNT</a>
|
|
||||||
instruction-set extensions. The generated code is an optimization balanced
|
|
||||||
across the top Intel 64-bit CPUs.</p>
|
|
||||||
|
|
||||||
<p> For more information on compiler flags, particularly related to performance optimization,
|
|
||||||
refer to <a href="http://software.intel.com/blogs/2012/09/26/gcc-x86-performance-hints">GCC
|
|
||||||
x86 Performance</a>.</p>
|
|
||||||
|
|
||||||
<p>This ABI does not include any other optional x86-64 instruction set
|
|
||||||
extensions, such as:</p>
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li>MOVBE</li>
|
|
||||||
<li>SHA</li>
|
|
||||||
<li>AVX</li>
|
|
||||||
<li>AVX2</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<p>You can still use these extensions, as long as you use runtime feature probing to
|
|
||||||
enable them, and provide fallbacks for devices that do not support them.</p>
|
|
||||||
<p>Refer to the following documents for more details:</p>
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><a href="http://www.agner.org/optimize/calling_conventions.pdf">Calling conventions for
|
|
||||||
different C++ compilers and operating systems</a></li>
|
|
||||||
<li>
|
|
||||||
<a href="http://www.intel.com/content/www/us/en/processors/architectures-software-developer-manuals.html?iid=tech_vt_tech+64-32_manuals">
|
|
||||||
Intel64 and IA-32 Architectures Software Developer's Manual, Volume 2: Instruction Set
|
|
||||||
Reference</a></li>
|
|
||||||
<li>
|
|
||||||
<a href="http://www.intel.com/content/www/us/en/processors/architectures-software-developer-manuals.html?iid=tech_vt_tech+64-32_manuals">
|
|
||||||
Intel64 and IA-32 Intel Architecture Software Developer's Manual Volume 3: System Programming</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3 id="mips">mips</h3>
|
|
||||||
<p>This ABI is for MIPS-based CPUs that support at least the MIPS32r1 instruction set. It includes
|
|
||||||
the following features:</p>
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li>MIPS32 revision 1 ISA</li>
|
|
||||||
<li>Little-endian</li>
|
|
||||||
<li>O32</li>
|
|
||||||
<li>Hard-float</li>
|
|
||||||
<li>No DSP application-specific extensions</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<p>For more information, please refer to the following documentation:</p>
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li>Architecture for Programmers ("MIPSARCH")</li>
|
|
||||||
<li><a href="https://refspecs.linuxbase.org/elf/gabi4+/contents.html">ELF
|
|
||||||
System V Application Binary Interface</a></li>
|
|
||||||
<li><a href="http://sourcery.mentor.com/public/cxx-abi/abi.html">Itanium/Generic C++
|
|
||||||
ABI</a></li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<p>For more specific details, see
|
|
||||||
<a href="http://www.imgtec.com/mips/architectures/mips32/">MIPS32 Architecture</a>.
|
|
||||||
Answers to common questions are in the
|
|
||||||
<a href="https://sourcery.mentor.com/sgpp/lite/mips/portal/target_arch?@action=faq&target_arch=MIPS">MIPS FAQ</a>.
|
|
||||||
</p>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3 id="mips64">mips64</h3>
|
|
||||||
<p>This ABI is for MIPS64 R6. For more information, see
|
|
||||||
<a href="http://www.imgtec.com/mips/architectures/mips64/">MIPS64 Architecture</a>.</p>
|
|
||||||
|
|
||||||
<h2 id="gc">Generating Code for a Specific ABI</h2>
|
|
||||||
<p>By default, the NDK generates machine code for the armeabi ABI. You can
|
|
||||||
generate ARMv7-a-compatible machine code, instead, by adding the following line
|
|
||||||
to your <a href="{@docRoot}ndk/guides/application_mk.html">{@code Application.mk}</a> file.</p>
|
|
||||||
<pre class="no-pretty-print">
|
|
||||||
APP_ABI := armeabi-v7a
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>To build machine code for two or more distinct ABIs, using spaces as delimiters. For
|
|
||||||
example:</p>
|
|
||||||
|
|
||||||
<pre class="no-pretty-print">
|
|
||||||
APP_ABI := armeabi armeabi-v7a
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>This setting tells the NDK to build two versions of your machine code: one
|
|
||||||
for each ABI listed on this line. For more information on the values you can specify for the
|
|
||||||
{@code APP_ABI} variable, see <a href="{@docRoot}ndk/guides/android_mk.html">Android.mk</a>.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>When you build multiple machine-code versions, the build system copies the libraries to your
|
|
||||||
application project path, and ultimately packages them into your APK, so creating
|
|
||||||
a <a href="http://en.wikipedia.org/wiki/Fat_binary"><i>fat binary</i></a>. A fat binary
|
|
||||||
is larger than one containing only the machine code for a single system; the tradeoff is
|
|
||||||
gaining wider compatibility, but at the expense of a larger APK.</p>
|
|
||||||
|
|
||||||
<p>At installation time, the package manager unpacks only the most appropriate
|
|
||||||
machine code for the target device. For details, see <a href="#aen">Automatic
|
|
||||||
extraction of native code at install time</a>.</p>
|
|
||||||
|
|
||||||
|
|
||||||
<h2 id="am">ABI Management on the Android Platform</h2>
|
|
||||||
<p>This section provides details about how the Android platform manages native
|
|
||||||
code in APKs.</p>
|
|
||||||
|
|
||||||
<h3>Native code in app packages</h3>
|
|
||||||
<p>Both the Play Store and Package Manager expect to find NDK-generated
|
|
||||||
libraries on filepaths inside the APK matching the following pattern:</p>
|
|
||||||
|
|
||||||
<pre class="no-pretty-print">
|
|
||||||
/lib/<abi>/lib<name>.so
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>Here, {@code <abi>} is one of the ABI names listed under <a href="#sa">Supported ABIs</a>,
|
|
||||||
and {@code <name>} is the name of the library as you defined it for the {@code LOCAL_MODULE}
|
|
||||||
variable in the <a href="{@docRoot}ndk/guides/android_mk.html">{@code Android.mk}</a> file. Since
|
|
||||||
APK files are just zip files, it is trivial to open them and confirm that the shared native
|
|
||||||
libraries are where they belong.</p>
|
|
||||||
|
|
||||||
<p>If the system does not find the native shared libraries where it expects them, it cannot use
|
|
||||||
them. In such a case, the app itself has to copy the libraries over, and then
|
|
||||||
perform <code>dlopen()</code>.</p>
|
|
||||||
|
|
||||||
<p>In a fat binary, each library resides under a directory whose name matches a corresponding ABI.
|
|
||||||
For example, a fat binary may contain:</p>
|
|
||||||
|
|
||||||
<pre class="no-pretty-print">
|
|
||||||
/lib/armeabi/libfoo.so
|
|
||||||
/lib/armeabi-v7a/libfoo.so
|
|
||||||
/lib/arm64-v8a/libfoo.so
|
|
||||||
/lib/x86/libfoo.so
|
|
||||||
/lib/x86_64/libfoo.so
|
|
||||||
/lib/mips/libfoo.so
|
|
||||||
/lib/mips64/libfoo.so
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p class="note"><strong>Note:</strong> ARMv7-based Android devices running 4.0.3 or earlier
|
|
||||||
install native libraries from the {@code armeabi} directory instead of the {@code armeabi-v7a}
|
|
||||||
directory if both directories exist. This is because {@code /lib/armeabi/} comes after
|
|
||||||
{@code /lib/armeabi-v7a/} in the APK. This issue is fixed from 4.0.4.</p>
|
|
||||||
|
|
||||||
<h3>Android Platform ABI support</h3>
|
|
||||||
<p>The Android system knows at runtime which ABI(s) it supports, because build-specific system
|
|
||||||
properties indicate:</p>
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li>The primary ABI for the device, corresponding to the machine code used in
|
|
||||||
the system image itself.</li>
|
|
||||||
<li>An optional, secondary ABI, corresponding to another ABI that the system image also supports.
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<p>This mechanism ensures that the system extracts the best machine code from
|
|
||||||
the package at installation time.</p>
|
|
||||||
|
|
||||||
<p>For best performance, you should compile directly for the primary ABI. For example, a
|
|
||||||
typical ARMv5TE-based device would only define the primary ABI: {@code armeabi}. By contrast, a
|
|
||||||
typical, ARMv7-based device would define the primary ABI as {@code armeabi-v7a} and the secondary
|
|
||||||
one as {@code armeabi}, since it can run application native binaries generated for each of them.</p>
|
|
||||||
|
|
||||||
<p>Many x86-based devices can also run {@code armeabi-v7a} and {@code armeabi} NDK binaries. For
|
|
||||||
such devices, the primary ABI would be {@code x86}, and the second one, {@code armeabi-v7a}.</p>
|
|
||||||
|
|
||||||
<p>A typical MIPS-based device only defines a primary abi: {@code mips}.</p>
|
|
||||||
|
|
||||||
<h3 id="aen">Automatic extraction of native code at install time</h3>
|
|
||||||
|
|
||||||
<p>When installing an application, the package manager service scans the APK, and looks for any
|
|
||||||
shared libraries of the form:</p>
|
|
||||||
|
|
||||||
<pre class="no-pretty-print">
|
|
||||||
lib/<primary-abi>/lib<name>.so
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>If none is found, and you have defined a secondary ABI, the service scans for shared libraries of
|
|
||||||
the form:</p>
|
|
||||||
|
|
||||||
<pre class="no-pretty-print">
|
|
||||||
lib/<secondary-abi>/lib<name>.so
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>When it finds the libraries that it's looking for, the package manager
|
|
||||||
copies them to <code>/lib/lib<name>.so</code>, under the application's
|
|
||||||
{@code data} directory ({@code data/data/<package_name>/lib/}).</p>
|
|
||||||
|
|
||||||
<p>If there is no shared-object file at all, the application builds and installs, but crashes at
|
|
||||||
runtime.</p>
|
|
||||||
@@ -1,875 +0,0 @@
|
|||||||
page.title=Android.mk
|
|
||||||
@jd:body
|
|
||||||
|
|
||||||
<div id="qv-wrapper">
|
|
||||||
<div id="qv">
|
|
||||||
<h2>On this page</h2>
|
|
||||||
|
|
||||||
<ol>
|
|
||||||
<li><a href="#over">Overview</a></li>
|
|
||||||
<li><a href="#basics">Basics</a></li>
|
|
||||||
<li><a href="#var">Variables and Macros</a></li>
|
|
||||||
<li><a href="#mdv">Module-Description Variables</a></li>
|
|
||||||
</ol>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<p>This page describes the syntax of the {@code Android.mk} build file,
|
|
||||||
which glues your C and C++ source files to the Android NDK.</p>
|
|
||||||
|
|
||||||
<h2 id="over">Overview</h2>
|
|
||||||
<p>The {@code Android.mk} file resides in a subdirectory of your project's {@code jni/} directory,
|
|
||||||
and describes your sources and shared libraries to the build system. It is really a tiny GNU
|
|
||||||
makefile fragment that the build system parses once or more. The {@code Android.mk} file is useful
|
|
||||||
for defining project-wide settings that <a href="{@docRoot}ndk/guides/application_mk.html">{@code
|
|
||||||
Application.mk}</a>, the build system, and your
|
|
||||||
environment variables leave undefined. It can also override project-wide settings for specific
|
|
||||||
<i>modules</i>.</p>
|
|
||||||
|
|
||||||
<p>The syntax of the {@code Android.mk} allows you to group your sources into
|
|
||||||
<em>modules</em>. A module is either a static library, a shared library, or a standalone
|
|
||||||
executable. You can define one or more modules in each {@code Android.mk} file, and
|
|
||||||
you can use the same source file in multiple modules. The build system only places shared libraries
|
|
||||||
into your application package. In addition, static libraries can generate shared libraries.</p>
|
|
||||||
|
|
||||||
<p>In addition to packaging libraries, the build system handles a variety of other details for you.
|
|
||||||
For example, you don't need to list header files or explicit dependencies between generated files in
|
|
||||||
your {@code Android.mk} file. The NDK build system computes these relationships automatically for
|
|
||||||
you. As a result, you should be able to benefit from new toolchain/platform support in future NDK
|
|
||||||
releases without having to touch your {@code Android.mk} file.</p>
|
|
||||||
|
|
||||||
<p>The syntax of this file is very close to that used in the {@code Android.mk} files distributed with
|
|
||||||
the full <a href="https://source.android.com">Android Open Source Project</a>. While the
|
|
||||||
build system implementation that uses them is different, their similarity is an
|
|
||||||
intentional design decision aimed at making it easier for application
|
|
||||||
developers to reuse source code for external libraries.</p>
|
|
||||||
|
|
||||||
<h2 id="basics">Basics</h2>
|
|
||||||
<p>Before exploring the syntax in detail, it is useful to start by understanding the basics
|
|
||||||
of what a {@code Android.mk} file contains. This section uses the {@code Android.mk} file in the
|
|
||||||
Hello-JNI sample toward that end, explaining the role that each line in the file plays.</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p>An {@code Android.mk} file must begin by defining the {@code LOCAL_PATH} variable:
|
|
||||||
|
|
||||||
<pre class="no-pretty-print">
|
|
||||||
LOCAL_PATH := $(call my-dir)
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>This variable indicates the location of the source files in the development tree. Here, the macro
|
|
||||||
function {@code my-dir}, provided by the build system, returns the path of the current directory
|
|
||||||
(the directory containing the {@code Android.mk} file itself).</p>
|
|
||||||
|
|
||||||
<p>The next line declares the {@code CLEAR_VARS} variable, whose value the build system provides.
|
|
||||||
|
|
||||||
<pre class="no-pretty-print">
|
|
||||||
include $(CLEAR_VARS)
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>The {@code CLEAR_VARS} variable points to a special GNU Makefile that clears many
|
|
||||||
{@code LOCAL_XXX} variables for you, such as {@code LOCAL_MODULE}, {@code LOCAL_SRC_FILES}, and
|
|
||||||
{@code LOCAL_STATIC_LIBRARIES}. Note that it does not clear {@code LOCAL_PATH}. This variable must
|
|
||||||
retain its value because the system parses all build control files in a single GNU Make execution
|
|
||||||
context where all variables are global. You must (re-)declare this variable before describing each
|
|
||||||
module.</p>
|
|
||||||
|
|
||||||
<p>Next, the {@code LOCAL_MODULE} variable stores the name of the module that you wish to build.
|
|
||||||
Use this variable once per module in your application.</p>
|
|
||||||
|
|
||||||
<pre class="no-pretty-print">
|
|
||||||
LOCAL_MODULE := hello-jni
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>Each module name must be unique and not contain any spaces. The build system, when it
|
|
||||||
generates the final shared-library file, automatically adds the proper prefix and suffix to
|
|
||||||
the name that you assign to {@code LOCAL_MODULE}. For example, the example that appears above
|
|
||||||
results in generation of a library called {@code libhello-jni.so}.</p>
|
|
||||||
|
|
||||||
<p class="note"><strong>Note:</strong> If your module's name already starts with {@code lib}, the
|
|
||||||
build system does not prepend an additional {@code lib} prefix; it takes the module name as-is, and
|
|
||||||
adds the {@code .so} extension. So a source file originally called, for example, {@code libfoo.c}
|
|
||||||
still produces a shared-object file called {@code libfoo.so}. This behavior is to support libraries
|
|
||||||
that the Android platform sources generate from {@code Android.mk} files; the names of all such
|
|
||||||
libraries start with {@code lib}.</p>
|
|
||||||
|
|
||||||
<p>The next line enumerates the source files, with spaces delimiting multiple files:</p>
|
|
||||||
|
|
||||||
<pre class="no-pretty-print">
|
|
||||||
LOCAL_SRC_FILES := hello-jni.c
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>The {@code LOCAL_SRC_FILES} variable must contain a list of C and/or C++ source files to build
|
|
||||||
into a module.</p>
|
|
||||||
|
|
||||||
<p>The last line helps the system tie everything together:</p>
|
|
||||||
|
|
||||||
<pre class="no-pretty-print">
|
|
||||||
include $(BUILD_SHARED_LIBRARY)
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>The {@code BUILD_SHARED_LIBRARY} variable points to a GNU Makefile script that collects all the
|
|
||||||
information you defined in {@code LOCAL_XXX} variables since the most recent {@code include}. This
|
|
||||||
script determines what to build, and how to do it.</p>
|
|
||||||
|
|
||||||
<p>There are more complex examples in the samples directories, with commented
|
|
||||||
{@code Android.mk} files that you can look at. In addition,
|
|
||||||
<a href="{@docRoot}ndk/samples/sample_na.html">Sample: native-activity</a> provides
|
|
||||||
a detailed explanation of that sample's {@code Android.mk} file. Finally, <a href="#var">
|
|
||||||
Variables and Macros</a> provides further information on the variables from this section.
|
|
||||||
|
|
||||||
|
|
||||||
<h2 id="var">Variables and Macros</h2>
|
|
||||||
<p>The build system provides many possible variables for use in the the {@code Android.mk} file.
|
|
||||||
Many of these variables come with preassigned values. Others, you assign.</p>
|
|
||||||
|
|
||||||
<p>In addition to these variables, you can also define your own arbitrary ones. If you do so, keep
|
|
||||||
in mind that the NDK build system reserves the following variable names:</p>
|
|
||||||
<ul>
|
|
||||||
<li>Names that begin with {@code LOCAL_}, such as {@code LOCAL_MODULE}.</li>
|
|
||||||
<li>Names that begin with {@code PRIVATE_}, {@code NDK_}, or {@code APP}. The build system uses
|
|
||||||
these internally.</li>
|
|
||||||
<li>Lower-case names, such as {@code my-dir}. The build system uses these internally, as well.</li>
|
|
||||||
</ul>
|
|
||||||
<p>If you need to define your own convenience variables in an {@code Android.mk} file, we
|
|
||||||
recommend prepending {@code MY_} to their names.
|
|
||||||
|
|
||||||
|
|
||||||
<h3 id="npv">NDK-defined variables</h3>
|
|
||||||
<p>This section discusses the GNU Make variables that the build system defines before parsing your
|
|
||||||
{@code Android.mk} file. Under certain circumstances, the NDK might parse your {@code Android.mk}
|
|
||||||
file several times, using a different definition for some of these variables each time.</p>
|
|
||||||
|
|
||||||
<h4>CLEAR_VARS</h4>
|
|
||||||
<p>This variable points to a build script that undefines nearly all {@code LOCAL_XXX} variables
|
|
||||||
listed in the "Developer-defined variables" section below. Use this variable to include
|
|
||||||
this script before describing a new module. The syntax for using it is:</p>
|
|
||||||
|
|
||||||
<pre class="no-pretty-print">
|
|
||||||
include $(CLEAR_VARS)
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<h4>BUILD_SHARED_LIBRARY</h4>
|
|
||||||
<p>This variable points to a build script that collects all the information about the module
|
|
||||||
you provided in your {@code LOCAL_XXX} variables, and determines how to build a target shared
|
|
||||||
library from the sources you listed. Note that using this script requires that you have already
|
|
||||||
assigned values to {@code LOCAL_MODULE} and {@code LOCAL_SRC_FILES}, at a minimum (for more
|
|
||||||
information about these variables, see <a href = "#mdv">Module-Description Variables</a>).</p>
|
|
||||||
|
|
||||||
<p>The syntax for using this variable is:</p>
|
|
||||||
|
|
||||||
<pre class="no-pretty-print">
|
|
||||||
include $(BUILD_SHARED_LIBRARY)
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>A shared-library variable causes the build system to generate a library file with a {@code .so}
|
|
||||||
extension.</p>
|
|
||||||
|
|
||||||
<h4>BUILD_STATIC_LIBRARY</h4>
|
|
||||||
<p>A variant of {@code BUILD_SHARED_LIBRARY} that is used to build a static library. The build
|
|
||||||
system does not copy static libraries into your project/packages, but it can use them to build
|
|
||||||
shared libraries (see {@code LOCAL_STATIC_LIBRARIES} and {@code LOCAL_WHOLE_STATIC_LIBRARIES},
|
|
||||||
below). The syntax for using this variable is:</p>
|
|
||||||
|
|
||||||
<pre class="no-pretty-print">
|
|
||||||
include $(BUILD_STATIC_LIBRARY)
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>A static-library variable causes the build system to generate a library with a {@code .a}
|
|
||||||
extension.</p>
|
|
||||||
|
|
||||||
<h4>PREBUILT_SHARED_LIBRARY</h4>
|
|
||||||
<p>Points to a build script used to specify a prebuilt shared library. Unlike in the case of
|
|
||||||
{@code BUILD_SHARED_LIBRARY} and {@code BUILD_STATIC_LIBRARY}, here the value of
|
|
||||||
{@code LOCAL_SRC_FILES} cannot be a source file. Instead, it must be a single path to a prebuilt
|
|
||||||
shared library, such as {@code foo/libfoo.so}. The syntax for using this variable is:</p>
|
|
||||||
|
|
||||||
<pre class="no-pretty-print">
|
|
||||||
include $(PREBUILT_SHARED_LIBRARY)
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>You can also reference a prebuilt library in another module by using the
|
|
||||||
{@code LOCAL_PREBUILTS} variable. For more information about using prebuilts, see
|
|
||||||
<a href="{@docRoot}ndk/guides/prebuilts.html">Using Prebuilt Libraries</a>.</p>
|
|
||||||
|
|
||||||
|
|
||||||
<h4>PREBUILT_STATIC_LIBRARY</h4>
|
|
||||||
<p>The same as {@code PREBUILT_SHARED_LIBRARY}, but for a prebuilt static library. For more
|
|
||||||
information about using prebuilts, see <a href="{@docRoot}ndk/guides/prebuilts.html">Using Prebuilt
|
|
||||||
Libraries</a>.</p>
|
|
||||||
|
|
||||||
<h4>TARGET_ARCH</h4>
|
|
||||||
<p>The name of the target CPU architecture as the Android Open Source Project specifies it.
|
|
||||||
For any ARM-compatible build, use {@code arm}, independent of the CPU architecture revision or
|
|
||||||
ABI (see TARGET_ARCH_ABI, below).</p>
|
|
||||||
|
|
||||||
<p>The value of this variable is taken from the APP_ABI variable that you define in the
|
|
||||||
{@code Android.mk} file, which the system reads ahead of parsing the {@code Android.mk} file.</p>
|
|
||||||
|
|
||||||
<h4>TARGET_PLATFORM</h4>
|
|
||||||
<p>The Android API level number for the build system to target.
|
|
||||||
For example, the Android 5.1 system images correspond to Android API level 22: {@code android-22}.
|
|
||||||
For a complete list of platform names and corresponding Android system
|
|
||||||
images, see <a href="{@docRoot}ndk/guides/stable_apis.html">Android NDK Native APIs</a>.
|
|
||||||
The following example shows the syntax for using this variable:</p>
|
|
||||||
|
|
||||||
<pre class="no-pretty-print">
|
|
||||||
TARGET_PLATFORM := android-22
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<h4 id="taa">TARGET_ARCH_ABI</h4>
|
|
||||||
<p>This variable stores the name of the CPU and architecture to target when the build system
|
|
||||||
parses this {@code Android.mk} file. You can specify one or more of the following values, using
|
|
||||||
a space as a delimiter between multiple targets. Table 1 shows the ABI setting to use for each
|
|
||||||
supported CPU and architecture.
|
|
||||||
|
|
||||||
<p class="table-caption" id="table1">
|
|
||||||
<strong>Table 1.</strong> ABI settings for different CPUs and architectures.</p>
|
|
||||||
<table>
|
|
||||||
<tr>
|
|
||||||
<th scope="col">CPU and architecture</th>
|
|
||||||
<th scope="col">Setting</th>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>ARMv5TE</td>
|
|
||||||
<td>{@code armeabi}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>ARMv7</td>
|
|
||||||
<td>{@code armeabi-v7a}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>ARMv8 AArch64</td>
|
|
||||||
<td>{@code arm64-v8a}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>i686</td>
|
|
||||||
<td>{@code x86}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>x86-64</td>
|
|
||||||
<td>{@code x86_64}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>mips32 (r1)</td>
|
|
||||||
<td>{@code mips}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>mips64 (r6)</td>
|
|
||||||
<td>{@code mips64}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>All</td>
|
|
||||||
<td>{@code all}</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<p>The following example shows how to set ARMv8 AArch64 as the target CPU-and-ABI combination:</p>
|
|
||||||
|
|
||||||
<pre class="no-pretty-print">
|
|
||||||
TARGET_ARCH_ABI := arm64-v8a
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p class="note"><strong>Note: </strong> Up to Android NDK 1.6_r1, this variable is defined as
|
|
||||||
{@code arm}.</p>
|
|
||||||
|
|
||||||
<p>For more details about architecture ABIs and associated compatibility
|
|
||||||
issues, refer to
|
|
||||||
<a href="{@docRoot}ndk/guides/abis.html">ABI Management</a>.</p>
|
|
||||||
|
|
||||||
<p>New target ABIs in the future will have different values.</p>
|
|
||||||
|
|
||||||
<h4>TARGET_ABI</h4>
|
|
||||||
<p>A concatenation of target Android API level and ABI, it is especially useful when you want to test against
|
|
||||||
a specific target system image for a real device. For example, to specify a 64-bit ARM device
|
|
||||||
running on Android API level 22:</p>
|
|
||||||
|
|
||||||
<pre class="no-pretty-print">
|
|
||||||
TARGET_ABI := android-22-arm64-v8a
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p class="note"><strong>Note:</strong> Up to Android NDK 1.6_r1, the default value was
|
|
||||||
{@code android-3-arm}.</p>
|
|
||||||
|
|
||||||
<h2 id="mdv">Module-Description Variables</h2>
|
|
||||||
<p>The variables in this section describe your module to the build system. Each module description
|
|
||||||
should follow this basic flow:
|
|
||||||
<ul>
|
|
||||||
<ol type = "1">
|
|
||||||
<li>Initialize or undefine the variables associated with the module, using the {@code CLEAR_VARS}
|
|
||||||
variable.</li>
|
|
||||||
<li>Assign values to the variables used to describe the module.
|
|
||||||
<li>Set the NDK build system to use the appropriate build script for the module, using the
|
|
||||||
{@code BUILD_XXX} variable.</li>
|
|
||||||
</ol>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h4>LOCAL_PATH</h4>
|
|
||||||
<p>This variable is used to give the path of the current file. You must define
|
|
||||||
it at the start of your {@code Android.mk} file. The following example shows how to do so:</p>
|
|
||||||
|
|
||||||
<pre class="no-pretty-print">
|
|
||||||
LOCAL_PATH := $(call my-dir)
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>The script to which {@code CLEAR_VARS} points does not clear this variable. Therefore, you only need
|
|
||||||
to define it a single time, even if your {@code Android.mk} file describes multiple modules.</p>
|
|
||||||
|
|
||||||
<h4>LOCAL_MODULE</h4>
|
|
||||||
<p>This variable stores the name of your module. It must be unique among all module names,
|
|
||||||
and must not contain any spaces. You must define it before including any scripts (other than
|
|
||||||
the one for {@code CLEAR_VARS}). You need not add either the {@code lib} prefix
|
|
||||||
or the {@code .so} or {@code .a} file extension; the build system makes these modifications
|
|
||||||
automatically. Throughout your {@code Android.mk} and
|
|
||||||
<a href="{@docRoot}ndk/guides/application_mk.html">{@code Application.mk}</a> files, refer to
|
|
||||||
your module by its unmodified name. For example, the following line results in the generation of a
|
|
||||||
shared library module called {@code libfoo.so}:</p>
|
|
||||||
|
|
||||||
<pre class="no-pretty-print">
|
|
||||||
LOCAL_MODULE := "foo"
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>If you want the generated module to have a name other than {@code lib} + the value of
|
|
||||||
{@code LOCAL_MODULE}, you can use the {@code LOCAL_MODULE_FILENAME} variable to give the
|
|
||||||
generated module a name of your own choosing, instead.</p>
|
|
||||||
|
|
||||||
<h4>LOCAL_MODULE_FILENAME</h4>
|
|
||||||
<p>This optional variable allows you to override the names that the build system
|
|
||||||
uses by default for files that it generates. For example, if the name of your {@code LOCAL_MODULE}
|
|
||||||
is {@code foo}, you can force the system to call the file it generates {@code libnewfoo}. The
|
|
||||||
following example shows how to accomplish this:</p>
|
|
||||||
|
|
||||||
<pre class="no-pretty-print">
|
|
||||||
LOCAL_MODULE := foo
|
|
||||||
LOCAL_MODULE_FILENAME := libnewfoo
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>For a shared library module, this example would generate a file called {@code libnewfoo.so}.</p>
|
|
||||||
|
|
||||||
<p class="note"><strong>Note:</strong> You cannot override filepath or file extension.</p>
|
|
||||||
|
|
||||||
<h4>LOCAL_SRC_FILES</h4>
|
|
||||||
<p>This variable contains the list of source files that the build system uses to generate the
|
|
||||||
module. Only list the files that the build system actually passes to the compiler, since the build
|
|
||||||
system automatically computes any associated depencies.</p>
|
|
||||||
<p>Note that you can use both relative (to {@code LOCAL_PATH}) and absolute file paths.
|
|
||||||
|
|
||||||
<p>We recommend avoiding absolute file paths; relative paths make your {@code Android.mk} file more
|
|
||||||
portable.</p>
|
|
||||||
|
|
||||||
<p class="note"><strong>Note: </strong> Always use Unix-style forward slashes (/) in build files.
|
|
||||||
The build system does not handle Windows-style backslashes (\) properly.</p>
|
|
||||||
|
|
||||||
<h4>LOCAL_CPP_EXTENSION</h4>
|
|
||||||
<p>You can use this optional variable to indicate a file extension other than {@code .cpp} for your
|
|
||||||
C++ source files. For example, the following line changes the extension to {@code .cxx}.
|
|
||||||
(The setting must include the dot.)
|
|
||||||
|
|
||||||
<pre class="no-pretty-print">
|
|
||||||
LOCAL_CPP_EXTENSION := .cxx
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>From NDK r7, you can use this variable to specify multiple extensions. For instance:</p>
|
|
||||||
|
|
||||||
<pre class="no-pretty-print">
|
|
||||||
LOCAL_CPP_EXTENSION := .cxx .cpp .cc
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<h4>LOCAL_CPP_FEATURES</h4>
|
|
||||||
|
|
||||||
<p>You can use this optional variable to indicate that your code relies on specific C++ features.
|
|
||||||
It enables the right compiler and linker flags during the build process. For prebuilt binaries,
|
|
||||||
this variable also declares which features the binary depends on, thus helping ensure the final
|
|
||||||
linking works correctly. We recommend that you use this variable instead of enabling
|
|
||||||
{@code -frtti} and {@code -fexceptions} directly in your {@code LOCAL_CPPFLAGS} definition.</p>
|
|
||||||
|
|
||||||
<p>Using this variable allows the build system to use the appropriate flags for each module. Using
|
|
||||||
{@code LOCAL_CPPFLAGS} causes the compiler to use all specified flags for all modules, regardless
|
|
||||||
of actual need.</p>
|
|
||||||
|
|
||||||
For example, to indicate that your code uses RTTI (RunTime Type Information), write: </p>
|
|
||||||
|
|
||||||
<pre class="no-pretty-print">
|
|
||||||
LOCAL_CPP_FEATURES := rtti
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>To indicate that your code uses C++ exceptions, write:</p>
|
|
||||||
|
|
||||||
<pre class="no-pretty-print">
|
|
||||||
LOCAL_CPP_FEATURES := exceptions
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>You can also specify multiple values for this variable. For example:</p>
|
|
||||||
|
|
||||||
<pre class="no-pretty-print">
|
|
||||||
LOCAL_CPP_FEATURES := rtti features
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
The order in which you describe the values does not matter.
|
|
||||||
|
|
||||||
|
|
||||||
<h4>LOCAL_C_INCLUDES</h4>
|
|
||||||
<p>You can use this optional variable to specify a list of paths, relative to the
|
|
||||||
NDK {@code root} directory, to add to the include search path when compiling all sources
|
|
||||||
(C, C++ and Assembly). For example: </p>
|
|
||||||
|
|
||||||
<pre class="no-pretty-print">
|
|
||||||
LOCAL_C_INCLUDES := sources/foo
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>Or even: </p>
|
|
||||||
|
|
||||||
<pre class="no-pretty-print">
|
|
||||||
LOCAL_C_INCLUDES := $(LOCAL_PATH)/<subdirectory>/foo
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>Define this variable before setting any corresponding inclusion flags via {@code LOCAL_CFLAGS}
|
|
||||||
or {@code LOCAL_CPPFLAGS}.</p>
|
|
||||||
|
|
||||||
<p>The build system also uses {@code LOCAL_C_INCLUDES} paths automatically when launching native
|
|
||||||
debugging with ndk-gdb.</p>
|
|
||||||
|
|
||||||
|
|
||||||
<h4>LOCAL_CFLAGS</h4>
|
|
||||||
|
|
||||||
<p>This optional variable sets compiler flags for the build system to pass when building C
|
|
||||||
<em>and</em> C++ source files. The ability to do so can be useful for specifying additional macro
|
|
||||||
definitions or compile options.</p>
|
|
||||||
|
|
||||||
<p>Try not to change the optimization/debugging level in your {@code Android.mk} file.
|
|
||||||
The build system can handle this setting automatically for you, using the relevant information
|
|
||||||
in the <a href="{@docRoot}ndk/guides/application_mk.html">{@code Application.mk}</a> file. Doing it
|
|
||||||
this way allows the build system to generate useful data files used during debugging.</p>
|
|
||||||
|
|
||||||
<p class="note"><strong>Note: </strong>In android-ndk-1.5_r1, the corresponding flags only applied
|
|
||||||
to C source files, not C++ ones. They now match the full Android build system behavior.
|
|
||||||
(You can now use {@code LOCAL_CPPFLAGS} to specify flags for C++ sources only.)</p>
|
|
||||||
|
|
||||||
<p>It is possible to specify additional include paths by writing:
|
|
||||||
|
|
||||||
<pre class="no-pretty-print">
|
|
||||||
LOCAL_CFLAGS += -I<path>,
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
It is better, however, to use {@code LOCAL_C_INCLUDES} for this purpose, since
|
|
||||||
doing so also makes it possible to use the paths available for native debugging with ndk-gdb.</p>
|
|
||||||
|
|
||||||
|
|
||||||
<h4>LOCAL_CPPFLAGS</h4>
|
|
||||||
<p>An optional set of compiler flags that will be passed when building C++
|
|
||||||
source files <em>only</em>. They will appear after the LOCAL_CFLAGS on the
|
|
||||||
compiler's command-line.</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p class="note"><strong>Note: </strong>In android-ndk-1.5_r1, the corresponding flags applied to
|
|
||||||
both C and C++ sources. This has been corrected to match the full Android build system.
|
|
||||||
To specify flags for both C and C++ sources, use {@code LOCAL_CFLAGS}.</p>
|
|
||||||
|
|
||||||
|
|
||||||
<h4>LOCAL_STATIC_LIBRARIES</h4>
|
|
||||||
|
|
||||||
<p>This variable stores the list of static libraries modules on which the current module depends.</p>
|
|
||||||
|
|
||||||
<p>If the current module is a shared library or an executable, this variable will force
|
|
||||||
these libraries to be linked into the resulting binary.</p>
|
|
||||||
|
|
||||||
<p>If the current module is a static library, this variable simply indicates that other
|
|
||||||
modules depending on the current one will also depend on the listed
|
|
||||||
libraries.</p>
|
|
||||||
|
|
||||||
<h4>LOCAL_SHARED_LIBRARIES</h4>
|
|
||||||
|
|
||||||
<p>This variable is the list of shared libraries <em>modules</em> on which this module depends at
|
|
||||||
runtime. This information is necessary at link time, and to embed the corresponding information
|
|
||||||
in the generated file.</p>
|
|
||||||
|
|
||||||
<h4>LOCAL_WHOLE_STATIC_LIBRARIES</h4>
|
|
||||||
<p>This variable is a variant of {@code LOCAL_STATIC_LIBRARIES}, and expresses that the linker
|
|
||||||
should treat the associated library modules as <em>whole archives</em>. For more information
|
|
||||||
on whole archives, see the GNU linker's
|
|
||||||
<a href="http://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_node/ld_3.html">documentation</a> for the
|
|
||||||
{@code --whole-archive} flag.</p>
|
|
||||||
|
|
||||||
<p>This variable is useful when there are circular dependencies among
|
|
||||||
several static libraries. When you use this variable to build a shared library, it will force
|
|
||||||
the build system to add all object files from your static libraries to the final binary. The same
|
|
||||||
is not true, however, when generating executables.</p>
|
|
||||||
|
|
||||||
|
|
||||||
<h4>LOCAL_LDLIBS</h4>
|
|
||||||
|
|
||||||
<p>This variable contains the list of additional linker flags for use in building your shared
|
|
||||||
library or executable. It enables you to use the {@code -l} prefix to pass the name of specific
|
|
||||||
system libraries. For example, the following example tells the linker to generate a module that
|
|
||||||
links to {@code /system/lib/libz.so} at load time: </p>
|
|
||||||
|
|
||||||
<pre class="no-pretty-print">
|
|
||||||
LOCAL_LDLIBS := -lz
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>For the list of exposed system libraries against which you can link in this NDK release, see
|
|
||||||
<a href="stable_apis.html">Android NDK Native APIs</a>.</p>
|
|
||||||
|
|
||||||
<p class="note"><strong>Note: </strong> If you define this variable for a static library,
|
|
||||||
the build system ignores it, and {@code ndk-build} prints a warning.</p>
|
|
||||||
|
|
||||||
<h4>LOCAL_LDFLAGS</h4>
|
|
||||||
|
|
||||||
<p>The list of other linker flags for the build system to use when building your shared library
|
|
||||||
or executable. For example, the following example uses the {@code ld.bfd} linker on ARM/X86 GCC
|
|
||||||
4.6+, on which {@code ld.gold} is the default </p>
|
|
||||||
|
|
||||||
<pre class="no-pretty-print">
|
|
||||||
LOCAL_LDFLAGS += -fuse-ld=bfd
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p class="note"><strong>Note: </strong>If you define this variable for a static library, the build
|
|
||||||
system ignores it, and ndk-build prints a warning.</p>
|
|
||||||
|
|
||||||
<h4>LOCAL_ALLOW_UNDEFINED_SYMBOLS</h4>
|
|
||||||
|
|
||||||
<p>By default, when the build system encounters an undefined reference encountered while trying to
|
|
||||||
build a shared, it will throw an <em>undefined symbol</em> error. This error can help you catch
|
|
||||||
catch bugs in your source code.</p>
|
|
||||||
|
|
||||||
<p>To disable this check, set this variable to {@code true}. Note that this setting may cause the
|
|
||||||
shared library to load at runtime.</p>
|
|
||||||
|
|
||||||
<p class="note"><strong>Note: </strong> If you define this variable for a static library,
|
|
||||||
the build system ignores it, and ndk-build prints a warning.</p>
|
|
||||||
|
|
||||||
<h4>LOCAL_ARM_MODE</h4
|
|
||||||
>
|
|
||||||
<p>By default, the build system generates ARM target binaries in <em>thumb</em> mode, where each
|
|
||||||
instruction is 16 bits wide and linked with the STL libraries in the {@code thumb/} directory.
|
|
||||||
Defining this variable as {@code arm} forces the build system to generate the module's object
|
|
||||||
files in 32-bit {@code arm} mode. The following example shows how to do this:</p>
|
|
||||||
|
|
||||||
<pre class="no-pretty-print">
|
|
||||||
LOCAL_ARM_MODE := arm
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>You can also instruct the build system to only build specific sources in {@code arm} mode by
|
|
||||||
appending {@code .arm} suffix to the the source filenames. For example, the following example
|
|
||||||
tells the build system to always compile {@code bar.c} in ARM mode, but to build
|
|
||||||
{@code foo.c} according to the value of {@code LOCAL_ARM_MODE}.</p>
|
|
||||||
|
|
||||||
<pre class="no-pretty-print">
|
|
||||||
LOCAL_SRC_FILES := foo.c bar.c.arm
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p></p>
|
|
||||||
|
|
||||||
<p class="note"><strong>Note: </strong> You can also force the build system to generate ARM binaries
|
|
||||||
by setting {@code APP_OPTIM} in your
|
|
||||||
<a href="{@docRoot}ndk/guides/application_mk.html">{@code Application.mk}</a> file to {@code debug}.
|
|
||||||
Specifying {@code debug} forces an ARM build because the toolchain debugger does not handle Thumb
|
|
||||||
code properly.</p>
|
|
||||||
|
|
||||||
|
|
||||||
<h4>LOCAL_ARM_NEON</h4>
|
|
||||||
<p>This variable only matters when you are targeting the {@code armeabi-v7a} ABI. It allows the
|
|
||||||
use of ARM Advanced SIMD (NEON) GCC intrinsics in your C and C++ sources, as well as NEON
|
|
||||||
instructions in Assembly files.</p>
|
|
||||||
|
|
||||||
<p>Note that not all ARMv7-based CPUs support the NEON instruction set extensions. For this reason,
|
|
||||||
you must perform runtime detection to be able to safely use this code at runtime. For more
|
|
||||||
information, see <a href="{@docRoot}ndk/guides/cpu-arm-neon.html">NEON Support</a> and <a
|
|
||||||
href="{@docRoot}ndk/guides/cpu-features.html">The {@code cpufeatures} Library</a>.</p>
|
|
||||||
|
|
||||||
<p>Alternatively, you can use the {@code .neon} suffix to specify that the build system only
|
|
||||||
compile specific source files with NEON support. In the following example, the build system compiles
|
|
||||||
{@code foo.c} with thumb and neon support, {@code bar.c} with thumb support, and
|
|
||||||
{@code zoo.c} with support for ARM and NEON:</p>
|
|
||||||
|
|
||||||
<pre class="no-pretty-print">
|
|
||||||
LOCAL_SRC_FILES = foo.c.neon bar.c zoo.c.arm.neon
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
|
|
||||||
<p>If you use both suffixes, {@code .arm} must precede {@code .neon}.</p>
|
|
||||||
|
|
||||||
<h4>LOCAL_DISABLE_NO_EXECUTE</h4>
|
|
||||||
|
|
||||||
<p>Android NDK r4 added support for the "NX bit" security feature. It is
|
|
||||||
enabled by default, but you can disable it by setting this variable to {@code true}. We do not
|
|
||||||
recommend doing so without a compelling reason.</p>
|
|
||||||
|
|
||||||
<p>This feature does not modify the ABI, and is only enabled on kernels
|
|
||||||
targeting ARMv6+ CPU devices. Machine code with this feature enabled
|
|
||||||
will run unmodified on devices running earlier CPU architectures.</p>
|
|
||||||
<p>For more information, see <a href="http://en.wikipedia.org/wiki/NX_bit">Wikipedia: NX bit</a>
|
|
||||||
and <a href="http://www.gentoo.org/proj/en/hardened/gnu-stack.xml">The GNU stack kickstart</a>.
|
|
||||||
|
|
||||||
<h4>LOCAL_DISABLE_RELRO</h4>
|
|
||||||
|
|
||||||
<p>By default, the NDK compiles code with read-only relocations and GOT
|
|
||||||
protection. This variable instructs the runtime linker to mark certain regions of memory
|
|
||||||
as read-only after relocation, making certain security exploits (such as GOT overwrites)
|
|
||||||
more difficult. Note that these protections are only effective on Android API level 16 and higher.
|
|
||||||
On lower API levels, the code will still run, but without memory protections.</p>
|
|
||||||
|
|
||||||
<p>This variable is turned on by default, but you can disable it by setting its value to
|
|
||||||
{@code true}. We do not recommend doing so without a compelling reason.</p>
|
|
||||||
|
|
||||||
<p>For more information, see
|
|
||||||
<a href="http://isisblogs.poly.edu/2011/06/01/relro-relocation-read-only/">RELRO:
|
|
||||||
RELocation Read-Only</a> and <a href="http://www.akkadia.org/drepper/nonselsec.pdf">Security
|
|
||||||
enhancements in RedHat Enterprise Linux (section 6)</a>.</p>
|
|
||||||
|
|
||||||
<h4>LOCAL_DISABLE_FORMAT_STRING_CHECKS</h4>
|
|
||||||
|
|
||||||
<p>By default, the build system compiles code with format string protection. Doing so forces a
|
|
||||||
compiler error if a non-constant format string is used in a {@code printf}-style function.</p>
|
|
||||||
<p>This protection is on by default, but you can disable it by setting the value of
|
|
||||||
this variable to {@code true}. We do not recommend doing so without a compelling reason.</p>
|
|
||||||
|
|
||||||
|
|
||||||
<h4>LOCAL_EXPORT_CFLAGS</h4>
|
|
||||||
|
|
||||||
<p>This variable records a set of C/C++ compiler flags to add to the {@code LOCAL_CFLAGS} definition
|
|
||||||
of any other module that uses this one via the {@code LOCAL_STATIC_LIBRARIES} or
|
|
||||||
{@code LOCAL_SHARED_LIBRARIES} variables.</p>
|
|
||||||
|
|
||||||
<p>For example, consider the following pair of modules: {@code foo} and {@code bar}, which depends
|
|
||||||
on {@code foo}:</p>
|
|
||||||
|
|
||||||
<pre class="no-pretty-print">
|
|
||||||
include $(CLEAR_VARS)
|
|
||||||
LOCAL_MODULE := foo
|
|
||||||
LOCAL_SRC_FILES := foo/foo.c
|
|
||||||
LOCAL_EXPORT_CFLAGS := -DFOO=1
|
|
||||||
include $(BUILD_STATIC_LIBRARY)
|
|
||||||
|
|
||||||
|
|
||||||
include $(CLEAR_VARS)
|
|
||||||
LOCAL_MODULE := bar
|
|
||||||
LOCAL_SRC_FILES := bar.c
|
|
||||||
LOCAL_CFLAGS := -DBAR=2
|
|
||||||
LOCAL_STATIC_LIBRARIES := foo
|
|
||||||
include $(BUILD_SHARED_LIBRARY)
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>Here, the build system passes the flags {@code -DFOO=1} and {@code -DBAR=2} to the compiler when
|
|
||||||
building {@code bar.c}. It also prepends exported flags to your your module's {@code LOCAL_CFLAGS}
|
|
||||||
so you can easily override them.</p>
|
|
||||||
|
|
||||||
In addition, the relationship among modules is transitive: If {@code zoo} depends on
|
|
||||||
{@code bar}, which in turn depends on {@code foo}, then {@code zoo} also inherits all flags
|
|
||||||
exported from {@code foo}.</p>
|
|
||||||
|
|
||||||
<p>Finally, the build system does not use exported flags when building locally (i.e., building the
|
|
||||||
module whose flags it is exporting). Thus, in the example above, it does not pass {@code -DFOO=1}
|
|
||||||
to the compiler when building {@code foo/foo.c}. To build locally, use {@code LOCAL_CFLAGS}
|
|
||||||
instead.</p>
|
|
||||||
|
|
||||||
<h4>LOCAL_EXPORT_CPPFLAGS</h4>
|
|
||||||
<p>This variable is the same as {@code LOCAL_EXPORT_CFLAGS}, but for C++ flags only.</p>
|
|
||||||
|
|
||||||
<h4>LOCAL_EXPORT_C_INCLUDES</h4>
|
|
||||||
<p>This variable is the same as {@code LOCAL_EXPORT_CFLAGS}, but for C include paths. It is useful
|
|
||||||
in cases where, for example, {@code bar.c} needs to include headers from module {@code foo}.</p>
|
|
||||||
|
|
||||||
<h4>LOCAL_EXPORT_LDFLAGS</h4>
|
|
||||||
<p>This variable is the same as {@code LOCAL_EXPORT_CFLAGS}, but for linker flags.</p>
|
|
||||||
|
|
||||||
<h4>LOCAL_EXPORT_LDLIBS</h4>
|
|
||||||
<p>This variable is the same as {@code LOCAL_EXPORT_CFLAGS}, telling the build system to pass names
|
|
||||||
of specific system libraries to the compiler. Prepend {@code -l} to the name of each library you
|
|
||||||
specify.</p>
|
|
||||||
|
|
||||||
<p>Note that the build system appends imported linker flags to the value of your module's
|
|
||||||
{@code LOCAL_LDLIBS} variable. It does this due to the way Unix linkers work.</p>
|
|
||||||
|
|
||||||
<p>This variable is typically useful when module {@code foo} is a static library
|
|
||||||
and has code that depends on a system library. You can then use {@code LOCAL_EXPORT_LDLIBS} to
|
|
||||||
to export the dependency. For example: </p>
|
|
||||||
|
|
||||||
<pre class="no-pretty-print">
|
|
||||||
include $(CLEAR_VARS)
|
|
||||||
LOCAL_MODULE := foo
|
|
||||||
LOCAL_SRC_FILES := foo/foo.c
|
|
||||||
LOCAL_EXPORT_LDLIBS := -llog
|
|
||||||
include $(BUILD_STATIC_LIBRARY)
|
|
||||||
|
|
||||||
include $(CLEAR_VARS)
|
|
||||||
LOCAL_MODULE := bar
|
|
||||||
LOCAL_SRC_FILES := bar.c
|
|
||||||
LOCAL_STATIC_LIBRARIES := foo
|
|
||||||
include $(BUILD_SHARED_LIBRARY)
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>In this example, the build system puts {@code -llog} at the end of the linker command when it
|
|
||||||
builds {@code libbar.so}. Doing so tells the linker that, because {@code libbar.so} depends
|
|
||||||
on {@code foo}, it also depends on the system logging library.</p>
|
|
||||||
|
|
||||||
<h4>LOCAL_SHORT_COMMANDS</h4>
|
|
||||||
<p>Set this variable to {@code true} when your module has a very high
|
|
||||||
number of sources and/or dependent static or shared libraries. Doing so forces the
|
|
||||||
build system to use {@code @} syntax for archives containing intermediate object files
|
|
||||||
or linking libraries.</p>
|
|
||||||
|
|
||||||
<p>This feature can be useful on Windows, where the command line accepts a maximum of only
|
|
||||||
of 8191 characters, which can be too small for complex projects. It also impacts the compilation of
|
|
||||||
individual source files, placing nearly all compiler flags inside list files, too.</p>
|
|
||||||
|
|
||||||
<p>Note that any value other than {@code true} will revert to the
|
|
||||||
default behaviour. You can also define {@code APP_SHORT_COMMANDS} in your
|
|
||||||
<a href="{@docRoot}ndk/guides/application_mk.html">{@code Application.mk}</a> file to force this
|
|
||||||
behavior for all modules in your project.</p>
|
|
||||||
|
|
||||||
<p>We do not recommend enabling this feature by default, since it makes the build slower.</p>
|
|
||||||
|
|
||||||
|
|
||||||
<h4>LOCAL_THIN_ARCHIVE</h4>
|
|
||||||
|
|
||||||
<p>Set this variable to {@code true} when building static libraries.
|
|
||||||
Doing so will generate a <strong>thin archive</strong>, a library file that does not contain
|
|
||||||
object files, but instead just file paths to the actual objects that it would normally
|
|
||||||
contain.</p>
|
|
||||||
<p>This is useful to reduce the size of your build output. The drawback is that
|
|
||||||
such libraries <em>cannot</em> be moved to a different location (all paths
|
|
||||||
inside them are relative).</p>
|
|
||||||
<p>Valid values are {@code true}, {@code false} or empty. A
|
|
||||||
default value can be set in your <a href="{@docRoot}ndk/guides/application_mk.html">
|
|
||||||
{@code Application.mk}</a> file through the {@code APP_THIN_ARCHIVE}
|
|
||||||
|
|
||||||
variable.</p>
|
|
||||||
<p class="note"><strong>Note:</strong> This is ignored for non-static library modules, or prebuilt
|
|
||||||
static library ones.</p>
|
|
||||||
|
|
||||||
<h4>LOCAL_FILTER_ASM</h4>
|
|
||||||
<p>Define this variable as a shell command that the build system will use to filter the
|
|
||||||
assembly files extracted or generated from the files you specified for {@code LOCAL_SRC_FILES}.</p>
|
|
||||||
<p>Defining this variable causes the following things to occur:</p>
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<ol type = "1">
|
|
||||||
<li>The build system generates a temporary assembly file from any C or C++ source file, instead of compiling them into an object file.</li>
|
|
||||||
<li>The build system executes the shell command in {@code LOCAL_FILTER_ASM}
|
|
||||||
on any temporary assembly file and on any assembly file
|
|
||||||
listed in {@code LOCAL_SRC_FILES}, thus generating another temporary assembly
|
|
||||||
file.</li>
|
|
||||||
<li>The build system compiles these filtered assembly files into an object file.</li>
|
|
||||||
</ol>
|
|
||||||
</ul>
|
|
||||||
<p>For example:</p>
|
|
||||||
|
|
||||||
<pre class="no-pretty-print">
|
|
||||||
LOCAL_SRC_FILES := foo.c bar.S
|
|
||||||
LOCAL_FILTER_ASM :=
|
|
||||||
|
|
||||||
foo.c --1--> $OBJS_DIR/foo.S.original --2--> $OBJS_DIR/foo.S --3--> $OBJS_DIR/foo.o
|
|
||||||
bar.S --2--> $OBJS_DIR/bar.S --3--> $OBJS_DIR/bar.o
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>"1" corresponds to the compiler, "2" to the filter, and "3" to the assembler. The filter must
|
|
||||||
be a standalone shell command that takes the name of the input file as its first argument, and the
|
|
||||||
name of the output file as the second one. For example:</p>
|
|
||||||
|
|
||||||
<pre class="no-pretty-print">
|
|
||||||
myasmfilter $OBJS_DIR/foo.S.original $OBJS_DIR/foo.S
|
|
||||||
myasmfilter bar.S $OBJS_DIR/bar.S
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<h3 id="npfm">NDK-provided function macros</h2>
|
|
||||||
<p>This section explains GNU Make function macros that the NDK provides. Use
|
|
||||||
{@code $(call <function>)} to evaluate them; they return textual information.</p>
|
|
||||||
|
|
||||||
<h4>my-dir</h4>
|
|
||||||
|
|
||||||
<p>This macro returns the path of the last included makefile, which typically is the
|
|
||||||
current {@code Android.mk}'s directory. {@code my-dir} is useful for defining
|
|
||||||
{@code LOCAL_PATH} at the start of your {@code Android.mk} file. For example:</p>
|
|
||||||
|
|
||||||
<pre class="no-pretty-print">
|
|
||||||
LOCAL_PATH := $(call my-dir)
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>Due to the way GNU Make works, what this macro really returns is the
|
|
||||||
path of the last makefile that the build system included when parsing the build scripts. For this
|
|
||||||
reason, you should not call {@code my-dir} after including another file.</p>
|
|
||||||
|
|
||||||
<p>For example, consider the following example: </p>
|
|
||||||
|
|
||||||
<pre class="no-pretty-print">
|
|
||||||
LOCAL_PATH := $(call my-dir)
|
|
||||||
|
|
||||||
# ... declare one module
|
|
||||||
|
|
||||||
include $(LOCAL_PATH)/foo/`Android.mk`
|
|
||||||
|
|
||||||
LOCAL_PATH := $(call my-dir)
|
|
||||||
|
|
||||||
# ... declare another module
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>The problem here is that the second call to {@code my-dir} defines
|
|
||||||
{@code LOCAL_PATH} as {@code $PATH/foo} instead of {@code $PATH}, because that was where its
|
|
||||||
most recent include pointed.</p>
|
|
||||||
|
|
||||||
<p>You can avoid this problem by putting additional includes after everything
|
|
||||||
else in the {@code Android.mk} file. For example:</p>
|
|
||||||
|
|
||||||
<pre class="no-pretty-print">
|
|
||||||
LOCAL_PATH := $(call my-dir)
|
|
||||||
|
|
||||||
# ... declare one module
|
|
||||||
|
|
||||||
LOCAL_PATH := $(call my-dir)
|
|
||||||
|
|
||||||
# ... declare another module
|
|
||||||
|
|
||||||
# extra includes at the end of the Android.mk file
|
|
||||||
include $(LOCAL_PATH)/foo/Android.mk
|
|
||||||
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>If it is not feasible to structure the file in this way, save the value of the first
|
|
||||||
{@code my-dir} call into another variable. For example: </p>
|
|
||||||
|
|
||||||
<pre class="no-pretty-print">
|
|
||||||
MY_LOCAL_PATH := $(call my-dir)
|
|
||||||
|
|
||||||
LOCAL_PATH := $(MY_LOCAL_PATH)
|
|
||||||
|
|
||||||
# ... declare one module
|
|
||||||
|
|
||||||
include $(LOCAL_PATH)/foo/`Android.mk`
|
|
||||||
|
|
||||||
LOCAL_PATH := $(MY_LOCAL_PATH)
|
|
||||||
|
|
||||||
# ... declare another module
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<h4>all-subdir-makefiles</h4>
|
|
||||||
|
|
||||||
<p>Returns the list of {@code Android.mk} files located in all subdirectories of
|
|
||||||
the current {@code my-dir} path.
|
|
||||||
|
|
||||||
<p>You can use this function to provide deep-nested source directory hierarchies to the build
|
|
||||||
system. By default, the NDK only looks for files in the directory containing the
|
|
||||||
{@code Android.mk} file.</p>
|
|
||||||
|
|
||||||
<h4>this-makefile</h4>
|
|
||||||
<p>Returns the path of the current makefile (from which the build system called the function).</p>
|
|
||||||
|
|
||||||
<h4>parent-makefile</h4>
|
|
||||||
<p>Returns the path of the parent makefile in the inclusion tree (the path of the makefile that
|
|
||||||
included the current one).</p>
|
|
||||||
|
|
||||||
<h4>grand-parent-makefile</h4>
|
|
||||||
<p>Returns the path of the grandparent makefile in the inclusion tree (the path of the makefile that
|
|
||||||
included the current one).</p>
|
|
||||||
|
|
||||||
<h4>import-module</h4>
|
|
||||||
<p>A function that allows you to find and include a module's {@code Android.mk} file by the name of
|
|
||||||
the module. A typical example is as follows: </p>
|
|
||||||
|
|
||||||
<pre class="no-pretty-print">
|
|
||||||
$(call import-module,<name>)
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>In this example, the build system looks for the module tagged {@code <name>} in the list of
|
|
||||||
directories referenced that your {@code NDK_MODULE_PATH} environment variable references, and
|
|
||||||
includes its {@code Android.mk} file automatically for you.</p>
|
|
||||||
@@ -1,219 +0,0 @@
|
|||||||
page.title=Application.mk
|
|
||||||
@jd:body
|
|
||||||
|
|
||||||
<div id="qv-wrapper">
|
|
||||||
<div id="qv">
|
|
||||||
<h2>On this page</h2>
|
|
||||||
|
|
||||||
<ol>
|
|
||||||
<li><a href="#over">Overview</a></li>
|
|
||||||
<li><a href="#var">Variables</a></li>
|
|
||||||
</ol>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<p>This document explains the {@code Application.mk} build file, which describes the
|
|
||||||
native <em>modules</em> that your app requires. A module can be a static library, a shared library,
|
|
||||||
or an executable.</p>
|
|
||||||
|
|
||||||
<p>We recommend that you read the <a href="{@docRoot}ndk/guides/concepts.html">Concepts</a> and
|
|
||||||
<a href="{@docRoot}ndk/guides/android_mk.html">Android.mk</a> pages before this one. Doing so will
|
|
||||||
help maximize your understanding of the material on this page. </p>
|
|
||||||
|
|
||||||
<h2 id="over">Overview</h2>
|
|
||||||
The {@code Application.mk} file is really a tiny GNU Makefile fragment that defines several
|
|
||||||
variables for compilation. It usually resides under {@code $PROJECT/jni/}, where {@code $PROJECT}
|
|
||||||
points to your application's project directory. Another alternative is to place it under a
|
|
||||||
sub-directory of the top-level {@code $NDK/apps/} directory. For example:</p>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
$NDK/apps/<myapp>/Application.mk
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>Here, {@code <myapp>} is a short name used to describe your app to the NDK build system. It
|
|
||||||
doesn't actually go into your generated shared libraries or your final packages.</p>
|
|
||||||
|
|
||||||
<h2 id="var">Variables</h2>
|
|
||||||
<h4>APP_PROJECT_PATH</h4>
|
|
||||||
<p>This variable stores the absolute path to your app's project-root directory. The build system
|
|
||||||
uses this information to place stripped-down versions of the generated JNI shared libraries
|
|
||||||
into a specific location known to the APK-generating tools.</p>
|
|
||||||
|
|
||||||
<p>If you place your {@code Application.mk} file under {@code $NDK/apps/<myapp>/}, you must
|
|
||||||
define this variable. If you place it under {@code $PROJECT/jni/}, it is optional.
|
|
||||||
|
|
||||||
<h4>APP_OPTIM</h4>
|
|
||||||
<p>Define this optional variable as either {@code release} or {@code debug}. You use it to
|
|
||||||
alter the optimization level when building your application's modules.</p>
|
|
||||||
|
|
||||||
<p>Release mode is the default, and generates highly optimized binaries. Debug mode generates
|
|
||||||
unoptimized binaries that are much easier to debug.</p>
|
|
||||||
|
|
||||||
<p>Note that you can debug either release or debug binaries. Release binaries, however, provide less
|
|
||||||
information during debugging. For example, the build system optimizes out some variables,
|
|
||||||
preventing you from inspecting them. Also, code re-ordering can make it more difficult to step
|
|
||||||
through the code; stack traces may not be reliable.</p>
|
|
||||||
|
|
||||||
<p>Declaring {@code android:debuggable} in your application manifest's {@code <application>}
|
|
||||||
tag will cause this variable to default to {@code debug} instead of {@code release}. Override this
|
|
||||||
default value by setting {@code APP_OPTIM} to {@code release}.</p>
|
|
||||||
|
|
||||||
|
|
||||||
<h4>APP_CFLAGS</h4>
|
|
||||||
<p>This variable stores a set of C compiler flags that the build system passes to the compiler
|
|
||||||
when compiling any C or C++ source code for any of the modules. You can use this variable to change
|
|
||||||
the build of a given module according to the application that needs it, instead of having to modify
|
|
||||||
the {@code Android.mk} file itself. </p>
|
|
||||||
|
|
||||||
|
|
||||||
<p>All paths in these flags should be relative to the top-level NDK directory. For example, if you
|
|
||||||
have the following setup:</p>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
sources/foo/Android.mk
|
|
||||||
sources/bar/Android.mk
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>To specify in {@code foo/Android.mk} that you want to add the path to the {@code bar} sources
|
|
||||||
during compilation, you should use:
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
APP_CFLAGS += -Isources/bar
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>Or, alternatively:</p>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
APP_CFLAGS += -I$(LOCAL_PATH)/../bar
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>{@code -I../bar} will not work since it is equivalent to
|
|
||||||
{@code -I$NDK_ROOT/../bar}.</p>
|
|
||||||
|
|
||||||
<p class="note"><strong>Note: </strong>This variable only works on C, not C++, sources in
|
|
||||||
android-ndk-1.5_r1. In all versions after that one, {@code APP_CFLAGS} matches the full Android
|
|
||||||
build system.</p>
|
|
||||||
|
|
||||||
<h4>APP_CPPFLAGS</h4>
|
|
||||||
<p>This variable contains a set of C++ compiler flags that the build system passes to the compiler
|
|
||||||
when building only C++ sources.</p>
|
|
||||||
|
|
||||||
<p class="note"><strong>Note: </strong> In android-ndk-1.5_r1, this variable works on both C and
|
|
||||||
C++ sources. In all subsequent versions of the NDK, {@code APP_CPPFLAGS} now matches the full
|
|
||||||
Android build system. For flags that apply to both C and C++ sources, use {@code APP_CFLAGS}.</p>
|
|
||||||
|
|
||||||
<h4>APP_LDFLAGS</h4>
|
|
||||||
<p>A set of linker flags that the build system passes when linking the application. This variable
|
|
||||||
is only relevant when the build system is building shared libraries and executables. When the
|
|
||||||
build system builds static libraries, it ignores these flags.</p>
|
|
||||||
|
|
||||||
<h4>APP_BUILD_SCRIPT</h4>
|
|
||||||
<p>By default, the NDK build system looks under {@code jni/} for a file named
|
|
||||||
<a href="{@docRoot}ndk/guides/android_mk.html">{@code Android.mk}</a>.</p>
|
|
||||||
|
|
||||||
<p>If you want to override this behavior, you can define {@code APP_BUILD_SCRIPT} to point to an
|
|
||||||
alternate build script. The build system always interprets a non-absolute path as relative to the
|
|
||||||
NDK's top-level directory.</p>
|
|
||||||
|
|
||||||
<h4>APP_ABI</h4>
|
|
||||||
<p>By default, the NDK build system generates machine code for the
|
|
||||||
<a href="{@docRoot}ndk/guides/abis.html">{@code armeabi}</a> ABI. This machine code
|
|
||||||
corresponds to an ARMv5TE-based CPU with software floating point operations. You can use
|
|
||||||
{@code APP_ABI} to select a different ABI. Table 1 shows the {@code APP_ABI}
|
|
||||||
settings for different instruction sets.</p>
|
|
||||||
|
|
||||||
<p class="table-caption" id="table1">
|
|
||||||
<strong>Table 1.</strong> {@code APP_ABI} settings for different instruction sets.</p>
|
|
||||||
<table>
|
|
||||||
<tr>
|
|
||||||
<th scope="col">Instruction set</th>
|
|
||||||
<th scope="col">Value</th>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>Hardware FPU instructions on ARMv7 based devices</td>
|
|
||||||
<td>{@code APP_ABI := armeabi-v7a}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>ARMv8 AArch64</td>
|
|
||||||
<td>{@code APP_ABI := arm64-v8a}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>IA-32</td>
|
|
||||||
<td>{@code APP_ABI := x86}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>Intel64</td>
|
|
||||||
<td>{@code APP_ABI := x86_64}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>MIPS32</td>
|
|
||||||
<td>{@code APP_ABI := mips}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>MIPS64 (r6)</td>
|
|
||||||
<td>{@code APP_ABI := mips64}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>All supported instruction sets</td>
|
|
||||||
<td>{@code APP_ABI := all}</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<p class="note"><strong>Note:</strong> {@code all} is available starting from NDKr7.</p>
|
|
||||||
|
|
||||||
<p>You can also specify multiple values by placing them on the same line, delimited by spaces.
|
|
||||||
For example:</p>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
APP_ABI := armeabi armeabi-v7a x86 mips
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>For the list of all supported ABIs and details about their usage and limitations, refer to
|
|
||||||
<a href="{@docRoot}ndk/guides/abis.html">ABI Management</a>.</p>
|
|
||||||
|
|
||||||
<h4>APP_PLATFORM</h4>
|
|
||||||
<p>This variable contains the name of the target Android platform. For example, {@code android-3}
|
|
||||||
specifies the Android 1.5 system images. For a complete list of platform names and corresponding
|
|
||||||
Android system images, see <a href="{@docRoot}ndk/guides/stable_apis.html">Android NDK Native APIs
|
|
||||||
</a>.</p>
|
|
||||||
|
|
||||||
<h4>APP_STL</h4>
|
|
||||||
<p>By default, the NDK build system provides C++ headers for the minimal C++ runtime library
|
|
||||||
({@code system/lib/libstdc++.so}) provided by the Android system. In addition, it comes with
|
|
||||||
alternative C++ implementations that you can use or link to in your own applications.
|
|
||||||
Use {@code APP_STL} to select one of them. For information about the supported runtimes, and the
|
|
||||||
features they offer, see <a href="{@docRoot}ndk/guides/cpp-support.html#runtimes">NDK Runtimes and
|
|
||||||
Features</a>.
|
|
||||||
|
|
||||||
<h4>APP_SHORT_COMMANDS</h4>
|
|
||||||
<p>The equivalent of {@code LOCAL_SHORT_COMMANDS} in {@code Application.mk} for your whole project.
|
|
||||||
For more information, see the documentation for this variable on
|
|
||||||
<a href="{@docRoot}ndk/guides/android_mk.html">{@code Android.mk}</a>.</p>
|
|
||||||
|
|
||||||
<h4>NDK_TOOLCHAIN_VERSION</h4>
|
|
||||||
<p>Define this variable as either {@code 4.9} or {@code 4.8} to select a version of the GCC
|
|
||||||
compiler. Version 4.9 is the default for 64-bit ABIs, and 4.8 is the default for 32-bit ABIs.
|
|
||||||
To select a version of Clang, define this variable as {@code clang3.4}, {@code clang3.5}, or
|
|
||||||
{@code clang}. Specifying {@code clang} chooses the most recent version of Clang.</p>
|
|
||||||
|
|
||||||
<h4>APP_PIE</h4>
|
|
||||||
<p>Starting from Android 4.1 (API level 16), Android's dynamic linker supports position-independent
|
|
||||||
executables (PIE). From Android 5.0 (API level 21), executables require PIE.
|
|
||||||
|
|
||||||
To use PIE to build your executables, set the {@code -fPIE} flag. This flag makes it harder to
|
|
||||||
exploit memory corruption bugs by randomizing code location. By default, {@code ndk-build}
|
|
||||||
automatically sets this value to {@code true} if your project targets {@code android-16} or higher.
|
|
||||||
You may set it manually to either {@code true} or {@code false}.</p>
|
|
||||||
|
|
||||||
<p>This flag applies only to executables. It has no effect when building shared or static
|
|
||||||
libraries.</p>
|
|
||||||
|
|
||||||
<p class="note"><strong>Note: </strong> PIE executables cannot run on Android releases prior to 4.1.
|
|
||||||
<p>This restriction only applies to executables. It has no effect when building shared or static
|
|
||||||
libraries.</p>
|
|
||||||
|
|
||||||
<h4>APP_THIN_ARCHIVE</h4>
|
|
||||||
<p>Sets the default value of {@code LOCAL_THIN_ARCHIVE} in the {@code Android.mk} file for all
|
|
||||||
static library modules in this project. For more information, see the documentation for
|
|
||||||
{@code LOCAL_THIN_ARCHIVE} on <a href="{@docRoot}ndk/guides/android_mk.html">{@code Android.mk}.</a>
|
|
||||||
</p>
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
page.title=CPUs and Architectures
|
|
||||||
@jd:body
|
|
||||||
|
|
||||||
<p>When you're working with native code, hardware matters. The NDK lets you ensure you're compiling
|
|
||||||
for the right architectures and CPUs by giving you a variety of ABIs from which
|
|
||||||
to choose.</p>
|
|
||||||
|
|
||||||
<p>This section begins by explaining how to target specific
|
|
||||||
<a href="{@docRoot}ndk/guides/abis.html">architectures and CPUs</a>. It then
|
|
||||||
provides information you need to know when targeting the
|
|
||||||
<a href="{@docRoot}ndk/guides/abis.html">ARM</a>
|
|
||||||
family of CPUs and architectures. Next, it provides information about the other CPUs and
|
|
||||||
architectures that it supports: <a href="{@docRoot}ndk/guides/cpu-arm-neon.html">NEON</a>, x86
|
|
||||||
(<a href="{@docRoot}ndk/guides/x86.html">32-bit</a> and
|
|
||||||
<a href="{@docRoot}ndk/guides/x86-64.html">64-bit</a>), and
|
|
||||||
<a href="{@docRoot}ndk/guides/mips.html">MIPS</a>. Finally, it explains how to use the
|
|
||||||
<a href="{@docRoot}ndk/guides/cpu-features.html">{@code cpufeatures}</a>
|
|
||||||
library, which your app can use to query a given CPU and architecture about the optional
|
|
||||||
features they support.</p>
|
|
||||||
@@ -1,169 +0,0 @@
|
|||||||
page.title=High-Performance Audio Basics
|
|
||||||
@jd:body
|
|
||||||
|
|
||||||
<div id="qv-wrapper">
|
|
||||||
<div id="qv">
|
|
||||||
<h2>On this page</h2>
|
|
||||||
|
|
||||||
<ol>
|
|
||||||
<li><a href="#overview">Building Great Audio Apps</a></li>
|
|
||||||
<li><a href="#adding">Adding OpenSL ES to Your App</a></li>
|
|
||||||
<li><a href="#building">Building and Debugging</a></li>
|
|
||||||
<li><a href="#power">Audio Power Consumption</a></li>
|
|
||||||
<li><a href="#samples">Samples</a></li>
|
|
||||||
</ol>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<a href="https://www.youtube.com/watch?v=d3kfEeMZ65c" class="notice-developers-video">
|
|
||||||
<div>
|
|
||||||
<h3>Video</h3>
|
|
||||||
<p>Google I/O 2013 - High Performance Audio</p>
|
|
||||||
</div>
|
|
||||||
</a>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
The Khronos Group's OpenSL ES™ standard exposes audio features
|
|
||||||
similar to those in the {@link android.media.MediaPlayer} and {@link android.media.MediaRecorder}
|
|
||||||
APIs in the Android Java framework. OpenSL ES provides a C language interface as well as
|
|
||||||
C++ bindings, allowing you to call it from code written in either language.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
This page describes the typical use cases for these high-performance audio APIs, how to add them
|
|
||||||
into your app's source code, and how to incorporate them into the build process.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h2 id="overview">Building Great Audio Apps</h2>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
The OpenSL ES APIs are available to help you develop and improve your app's audio performance.
|
|
||||||
Some typical use cases include the following:</p>
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li>Digital Audio Workstations (DAWs).</li>
|
|
||||||
<li>Synthesizers.</li>
|
|
||||||
<li>Drum machines.</li>
|
|
||||||
<li>Music learning apps.</li>
|
|
||||||
<li>Karaoke apps.</li>
|
|
||||||
<li>DJ mixing.</li>
|
|
||||||
<li>Audio effects.</li>
|
|
||||||
<li>Video/audio conferencing.</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h2 id="adding">Adding OpenSL ES to your App</h2>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
You can call OpenSL ES from both C and C++ code. To add the core OpenSL ES
|
|
||||||
feature set to your app, include the {@code OpenSLES.h} header file:
|
|
||||||
|
|
||||||
</p>
|
|
||||||
<pre>
|
|
||||||
#include <SLES/OpenSLES.h>
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
To add the OpenSL ES <a href="{@docRoot}ndk/guides/audio/opensl-for-android.html#ae">
|
|
||||||
Android extensions</a> as well, include the {@code OpenSLES_Android.h} header file:
|
|
||||||
</p>
|
|
||||||
<pre>
|
|
||||||
#include <SLES/OpenSLES_Android.h>
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
When you include the {@code OpenSLES_Android.h} header file, the following headers are included
|
|
||||||
automatically:
|
|
||||||
</p>
|
|
||||||
<pre>
|
|
||||||
#include <SLES/OpenSLES_AndroidConfiguration.h>
|
|
||||||
#include <SLES/OpenSLES_AndroidMetadata.h>
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p class="note"><strong>Note: </strong>
|
|
||||||
These headers are not required, but are shown as an aid in learning the API.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h2 id="building">Building and Debugging</h2>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
You can incorporate OpenSL ES into your build by specifying it in the
|
|
||||||
<a href="{@docRoot}ndk/guides/android_mk.html">{@code Android.mk}</a> file that serves as one of the
|
|
||||||
NDK build system's makefiles. Add the following line to
|
|
||||||
<a href="{@docRoot}ndk/guides/android_mk.html">{@code Android.mk}</a>:
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
LOCAL_LDLIBS += -lOpenSLES
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
For robust debugging, we recommend that you examine the {@code SLresult} value that most of
|
|
||||||
the OpenSL ES APIs return. You can use
|
|
||||||
<a class="external-link" href="http://en.wikipedia.org/wiki/Assertion_(computing)">asserts</a>
|
|
||||||
or more advanced error-handling logic for debugging; neither offers
|
|
||||||
an inherent advantage for working with OpenSL ES, although one or the other might be more suitable
|
|
||||||
for a given use case.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
We use asserts in our <a class="external-link" href="https://github.com/googlesamples/android-ndk">
|
|
||||||
examples</a>, because they help catch unrealistic conditions that would indicate a coding error. We
|
|
||||||
have used explicit error handling for other conditions more likely to occur in production.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Many API errors result in a log entry, in addition to a non-zero result code. Such log entries
|
|
||||||
can provide additional detail that proves especially useful for relatively complex APIs such as
|
|
||||||
<a class="external-link" href="https://www.khronos.org/registry/sles/specs/OpenSL_ES_Specification_1.1.pdf">
|
|
||||||
{@code Engine::CreateAudioPlayer}</a>.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
You can view the log either from the command line or from Android Studio. To examine the log from
|
|
||||||
the command line, type the following:
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<pre class="no-pretty-print">
|
|
||||||
$ adb logcat
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
To examine the log from Android Studio, either click the <strong>Logcat</strong> tab in the
|
|
||||||
<a href="{@docRoot}tools/debugging/debugging-studio.html#runDebug">Debug</a>
|
|
||||||
window, or click the <strong>Devices | logcat</strong> tab in the
|
|
||||||
<a href="{@docRoot}tools/debugging/debugging-studio.html#systemLogView">Android DDMS</a>
|
|
||||||
window.
|
|
||||||
</p>
|
|
||||||
<h2 id="power">Audio Power Consumption</h2>
|
|
||||||
<p>Constantly outputting audio incurs significant power consumption. Ensure that you stop the
|
|
||||||
output in the
|
|
||||||
<a href="{@docRoot}reference/android/app/Activity.html#onPause()">onPause()</a> method.
|
|
||||||
Also consider pausing the silent output after some period of user inactivity.
|
|
||||||
</p>
|
|
||||||
<h2 id="samples">Samples</h2>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Supported and tested example code that you can use as a model for your own code resides both locally
|
|
||||||
and on
|
|
||||||
<a class="external-link" href="https://github.com/googlesamples/android-audio-high-performance/">
|
|
||||||
GitHub</a>. The local examples are located in
|
|
||||||
{@code platforms/android-9/samples/native-audio/}, under your NDK root installation directory.
|
|
||||||
On GitHub, they are available from the
|
|
||||||
<a class="external-link" href="https://github.com/googlesamples/android-ndk">{@code android-ndk}</a>
|
|
||||||
repository, in the
|
|
||||||
<a class="external-link" href="https://github.com/googlesamples/android-ndk/tree/master/audio-echo">
|
|
||||||
{@code audio-echo}</a> and
|
|
||||||
<a class="external-link" href="https://github.com/googlesamples/android-ndk/tree/master/native-audio">
|
|
||||||
{@code native-audio}</a> directories.
|
|
||||||
</p>
|
|
||||||
<p>The Android NDK implementation of OpenSL ES differs
|
|
||||||
from the reference specification for OpenSL ES 1.0.1 in a number of respects.
|
|
||||||
These differences are an important reason as to why sample code that
|
|
||||||
you copy directly from the OpenSL ES reference specification may not work in your
|
|
||||||
Android app.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
For more information on differences between the reference specification and the
|
|
||||||
Android implementation, see
|
|
||||||
<a href="{@docRoot}ndk/guides/audio/opensl-for-android.html">
|
|
||||||
OpenSL ES for Android</a>.
|
|
||||||
@@ -1,101 +0,0 @@
|
|||||||
page.title=Floating-Point Audio
|
|
||||||
@jd:body
|
|
||||||
|
|
||||||
<div id="qv-wrapper">
|
|
||||||
<div id="qv">
|
|
||||||
<h2>On this page</h2>
|
|
||||||
|
|
||||||
<ol>
|
|
||||||
<li><a href="#best">Best Practices for Floating-Point Audio</a></li>
|
|
||||||
<li><a href="#support">Floating-Point Audio in Android SDK</a></li>
|
|
||||||
<li><a href="#more">For More Information</a></li>
|
|
||||||
</ol>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<a href="https://www.youtube.com/watch?v=sIcieUqMml8" class="notice-developers-video">
|
|
||||||
<div>
|
|
||||||
<h3>Video</h3>
|
|
||||||
<p>Will it Float? The Glory and Shame of Floating-Point Audio</p>
|
|
||||||
</div>
|
|
||||||
</a>
|
|
||||||
|
|
||||||
<p>Using floating-point numbers to represent audio data can significantly enhance audio
|
|
||||||
quality in high-performance audio applications. Floating point offers the following
|
|
||||||
advantages:</p>
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li>Wider dynamic range.</li>
|
|
||||||
<li>Consistent accuracy across the dynamic range.</li>
|
|
||||||
<li>More headroom to avoid clipping during intermediate calculations and transients.</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<p>While floating-point can enhance audio quality, it does present certain disadvantages:</p>
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li>Floating-point numbers use more memory.</li>
|
|
||||||
<li>Floating-point operations employ unexpected properties, for example, addition is
|
|
||||||
not associative.</li>
|
|
||||||
<li>Floating-point calculations can sometimes lose arithmetic precision due to rounding or
|
|
||||||
numerically unstable algorithms.</li>
|
|
||||||
<li>Using floating-point effectively requires greater understanding to achieve accurate
|
|
||||||
and reproducible results.</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Formerly, floating-point was notorious for being unavailable or slow. This is
|
|
||||||
still true for low-end and embedded processors. But processors on modern
|
|
||||||
mobile devices now have hardware floating-point with performance that is
|
|
||||||
similar (or in some cases even faster) than integer. Modern CPUs also support
|
|
||||||
<a href="http://en.wikipedia.org/wiki/SIMD" class="external-link">SIMD</a>
|
|
||||||
(Single instruction, multiple data), which can improve performance further.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h2 id="best">Best Practices for Floating-Point Audio</h2>
|
|
||||||
<p>The following best practices help you avoid problems with floating-point calculations:</p>
|
|
||||||
<ul>
|
|
||||||
<li>Use double precision floating-point for infrequent calculations,
|
|
||||||
such as computing filter coefficients.</li>
|
|
||||||
<li>Pay attention to the order of operations.</li>
|
|
||||||
<li>Declare explicit variables for intermediate values.</li>
|
|
||||||
<li>Use parentheses liberally.</li>
|
|
||||||
<li>If you get a NaN or infinity result, use binary search to discover
|
|
||||||
where it was introduced.</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h2 id="support">Floating-Point Audio in Android SDK</h2>
|
|
||||||
|
|
||||||
<p>For floating-point audio, the audio format encoding
|
|
||||||
<code>AudioFormat.ENCODING_PCM_FLOAT</code> is used similarly to
|
|
||||||
<code>ENCODING_PCM_16_BIT</code> or <code>ENCODING_PCM_8_BIT</code> for specifying
|
|
||||||
AudioTrack data
|
|
||||||
formats. The corresponding overloaded method <code>AudioTrack.write()</code>
|
|
||||||
takes in a float array to deliver data.</p>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
public int write(float[] audioData,
|
|
||||||
int offsetInFloats,
|
|
||||||
int sizeInFloats,
|
|
||||||
int writeMode)
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<h2 id="more">For More Information</h2>
|
|
||||||
|
|
||||||
<p>The following Wikipedia pages are helpful in understanding floating-point audio:</p>
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><a href="http://en.wikipedia.org/wiki/Audio_bit_depth" class="external-link" >Audio bit depth</a></li>
|
|
||||||
<li><a href="http://en.wikipedia.org/wiki/Floating_point" class="external-link" >Floating point</a></li>
|
|
||||||
<li><a href="http://en.wikipedia.org/wiki/IEEE_floating_point" class="external-link" >IEEE 754 floating-point</a></li>
|
|
||||||
<li><a href="http://en.wikipedia.org/wiki/Loss_of_significance" class="external-link" >Loss of significance</a>
|
|
||||||
(catastrophic cancellation)</li>
|
|
||||||
<li><a href="https://en.wikipedia.org/wiki/Numerical_stability" class="external-link" >Numerical stability</a></li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<p>The following article provides information on those aspects of floating-point that have a
|
|
||||||
direct impact on designers of computer systems:</p>
|
|
||||||
<ul>
|
|
||||||
<li><a href="http://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html" class="external-link" >What every
|
|
||||||
computer scientist should know about floating-point arithmetic</a>
|
|
||||||
by David Goldberg, Xerox PARC (edited reprint).</li>
|
|
||||||
</ul>
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
page.title=NDK High-Performance Audio
|
|
||||||
@jd:body
|
|
||||||
|
|
||||||
<p>The NDK package includes an Android-specific implementation of the
|
|
||||||
<a class="external-link" href="https://www.khronos.org/opensles/">OpenSL ES™</a> API
|
|
||||||
specification from the <a class="external-link" href="https://www.khronos.org">Khronos Group</a>.
|
|
||||||
This library allows you to use C or C++ to implement high-performance, low-latency audio, whether
|
|
||||||
you are writing a synthesizer, digital audio workstation, karaoke, game,
|
|
||||||
or other real-time app.</p>
|
|
||||||
|
|
||||||
<p>This section begins by providing some
|
|
||||||
<a href="{@docRoot}ndk/guides/audio/basics.html">basic information</a> about the API, including
|
|
||||||
typical use cases and how to incorporate it into your app. It then explains what you need to know
|
|
||||||
about the <a href="{@docRoot}ndk/guides/audio/opensl-for-android.html">Android-specific
|
|
||||||
implementation</a> of OpenSL ES, focusing on the differences between this implementation and the
|
|
||||||
reference specification. Next, you'll learn how to minimze
|
|
||||||
<a href="{@docRoot}ndk/guides/audio/input-latency.html">input latency</a>
|
|
||||||
when using built-in or external microphones
|
|
||||||
and some actions that you can take to minimize
|
|
||||||
<a href="{@docRoot}ndk/guides/audio/output-latency.html">output latency</a>.
|
|
||||||
It describes the reasons that you should use
|
|
||||||
<a href="{@docRoot}ndk/guides/audio/floating-point.html">floating-point</a>
|
|
||||||
numbers to represent your audio data, and it provides information that will help you choose the
|
|
||||||
optimal <a href="{@docRoot}ndk/guides/audio/sample-rates.html">sample rate</a>. This section
|
|
||||||
concludes with some supplemental <a href="{@docRoot}ndk/guides/audio/opensl-prog-notes.html">
|
|
||||||
programming notes</a> to ensure proper implementation of OpenSL ES.
|
|
||||||
</p>
|
|
||||||
@@ -1,95 +0,0 @@
|
|||||||
page.title=Audio Input Latency
|
|
||||||
@jd:body
|
|
||||||
|
|
||||||
<div id="qv-wrapper">
|
|
||||||
<div id="qv">
|
|
||||||
<h2>On this page</h2>
|
|
||||||
|
|
||||||
<ol>
|
|
||||||
<li><a href="#check-list">Checklist</a></li>
|
|
||||||
<li><a href="#ways">Ways to Reduce Audio Input Latency</a></li>
|
|
||||||
<li><a href="#avoid">What to Avoid</a></li>
|
|
||||||
</ol>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<p>This page provides guidelines to help you reduce audio input latency when recording with a
|
|
||||||
built-in microphone or an external headset microphone.</p>
|
|
||||||
|
|
||||||
<h2 id="check-list">Checklist</h2>
|
|
||||||
|
|
||||||
<p>Here are a few important prerequisites:</p>
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li>You must use the Android-specific implementation of the
|
|
||||||
<a class="external-link" href="https://www.khronos.org/opensles/">OpenSL ES™</a> API.
|
|
||||||
|
|
||||||
<li>If you haven't already done so, download and install the
|
|
||||||
<a href="{@docRoot}tools/sdk/ndk/index.html">Android NDK</a>.</li>
|
|
||||||
|
|
||||||
<li>Many of the same requirements for low-latency audio output also apply to low-latency input,
|
|
||||||
so read the requirements for low-latency output in
|
|
||||||
<a href="{@docRoot}ndk/guides/audio/output-latency.html">Audio Output Latency</a>.</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h2 id="ways">Ways to Reduce Audio Input Latency</h2>
|
|
||||||
|
|
||||||
<p>The following are some methods to help ensure low audio input latency:
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li>Suggest to your users, if your app relies on low-latency audio, that they use a headset
|
|
||||||
(for example, by displaying a <em>Best with headphones</em> screen on first run). Note
|
|
||||||
that just using the headset doesn’t guarantee the lowest possible latency. You may need to
|
|
||||||
perform other steps to remove any unwanted signal processing from the audio path, such as by
|
|
||||||
using the <a href="http://developer.android.com/reference/android/media/MediaRecorder.AudioSource.html#VOICE_RECOGNITION">
|
|
||||||
VOICE_RECOGNITION</a> preset when recording.</li>
|
|
||||||
|
|
||||||
<li>It's difficult to test audio input and output latency in isolation. The best solution to
|
|
||||||
determine the lowest possible audio input latency is to measure round-trip audio and divide
|
|
||||||
by two.</li>
|
|
||||||
<li> Be prepared to handle nominal sample rates of 44,100 and 48,000 Hz as reported by
|
|
||||||
<a href="{@docRoot}reference/android/media/AudioManager.html#getProperty(java.lang.String)">
|
|
||||||
getProperty(String)</a> for
|
|
||||||
<a href="{@docRoot}reference/android/media/AudioManager.html#PROPERTY_OUTPUT_SAMPLE_RATE">
|
|
||||||
PROPERTY_OUTPUT_SAMPLE_RATE</a>. Other sample rates are possible, but rare.</li>
|
|
||||||
|
|
||||||
<li>Be prepared to handle the buffer size reported by
|
|
||||||
<a href="{@docRoot}reference/android/media/AudioManager.html#getProperty(java.lang.String)">
|
|
||||||
getProperty(String)</a> for
|
|
||||||
<a href="{@docRoot}reference/android/media/AudioManager.html#PROPERTY_OUTPUT_FRAMES_PER_BUFFER">
|
|
||||||
PROPERTY_OUTPUT_FRAMES_PER_BUFFER</a>. Typical buffer sizes include 96, 128, 160, 192, 240, 256,
|
|
||||||
or 512 frames, but other values are possible.</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h2 id="avoid">What to Avoid</h2>
|
|
||||||
|
|
||||||
<p>Be sure to take these things into account to help avoid latency issues:</p>
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li>Don’t assume that the speakers and microphones used in mobile devices generally have good
|
|
||||||
acoustics. Due to their small size, the acoustics are generally poor so signal processing is
|
|
||||||
added to improve the sound quality. This signal processing introduces latency.</li>
|
|
||||||
|
|
||||||
<li>Don't assume that your input and output callbacks are synchronized. For simultaneous input
|
|
||||||
and output, separate buffer queue completion handlers are used for each side. There is no
|
|
||||||
guarantee of the relative order of these callbacks or the synchronization of the audio clocks,
|
|
||||||
even when both sides use the same sample rate. Your application should buffer the data with
|
|
||||||
proper buffer synchronization.</li>
|
|
||||||
|
|
||||||
<li>Don't assume that the actual sample rate exactly matches the nominal sample rate. For
|
|
||||||
example, if the nominal sample rate is 48,000 Hz, it is normal for the audio clock to advance
|
|
||||||
at a slightly different rate than the operating system {@code CLOCK_MONOTONIC}. This is because
|
|
||||||
the audio and system clocks may derive from different crystals.</li>
|
|
||||||
|
|
||||||
<li>Don't assume that the actual playback sample rate exactly matches the actual capture sample
|
|
||||||
rate, especially if the endpoints are on separate paths. For example, if you are capturing from
|
|
||||||
the on-device microphone at 48,000 Hz nominal sample rate, and playing on USB audio
|
|
||||||
at 48,000 Hz nominal sample rate, the actual sample rates are likely to be slightly different
|
|
||||||
from each other.</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<p>A consequence of potentially independent audio clocks is the need for asynchronous sample rate
|
|
||||||
conversion. A simple (though not ideal for audio quality) technique for asynchronous sample rate
|
|
||||||
conversion is to duplicate or drop samples as needed near a zero-crossing point. More
|
|
||||||
sophisticated conversions are possible.</p>
|
|
||||||
@@ -1,461 +0,0 @@
|
|||||||
page.title=OpenSL ES Programming Notes
|
|
||||||
@jd:body
|
|
||||||
|
|
||||||
<div id="qv-wrapper">
|
|
||||||
<div id="qv">
|
|
||||||
<h2>On this page</h2>
|
|
||||||
|
|
||||||
<ol>
|
|
||||||
<li><a href="#init">Objects and Interface Initialization</a></li>
|
|
||||||
<li><a href="#prefetch">Audio Player Prefetch</a></li>
|
|
||||||
<li><a href="#destroy">Destroy</a></li>
|
|
||||||
<li><a href="#panning">Stereo Panning</a></li>
|
|
||||||
<li><a href="#callbacks">Callbacks and Threads</a></li>
|
|
||||||
<li><a href="#perform">Performance</a></li>
|
|
||||||
<li><a href="#sandp">Security and Permissions</a></li>
|
|
||||||
</ol>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
The notes in this section supplement the
|
|
||||||
<a class="external-link" href="https://www.khronos.org/registry/sles/">OpenSL ES 1.0.1
|
|
||||||
specification</a>.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h2 id="init">Objects and Interface Initialization</h2>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Two aspects of the OpenSL ES programming model that may be unfamiliar to new developers are the
|
|
||||||
distinction between objects and interfaces, and the initialization sequence.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Briefly, an OpenSL ES object is similar to the object concept in
|
|
||||||
programming languages such as Java
|
|
||||||
and C++, except an OpenSL ES object is only visible via its associated interfaces.
|
|
||||||
This includes
|
|
||||||
the initial interface for all objects, called {@code SLObjectItf}.
|
|
||||||
There is no handle for an object
|
|
||||||
itself, only a handle to the {@code SLObjectItf} interface of the object.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
An OpenSL ES object is first <em>created</em>, which returns an {@code SLObjectItf}, then
|
|
||||||
<em>realized</em>. This is similar to the common programming pattern of first constructing an
|
|
||||||
object (which should never fail other than for lack of memory or invalid parameters), and then
|
|
||||||
completing initialization (which may fail due to lack of resources). The realize step gives the
|
|
||||||
implementation a logical place to allocate additional resources if needed.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
As part of the API to create an object, an application specifies an array of desired interfaces
|
|
||||||
that it plans to acquire later. Note that this array does not automatically
|
|
||||||
acquire the interfaces;
|
|
||||||
it merely indicates a future intention to acquire them. Interfaces are distinguished as
|
|
||||||
<em>implicit</em> or <em>explicit</em>. An explicit interface must be listed in the array if it
|
|
||||||
will be acquired later. An implicit interface need not be listed in the
|
|
||||||
object create array, but
|
|
||||||
there is no harm in listing it there. OpenSL ES has one more kind of interface called
|
|
||||||
<em>dynamic</em>, which does not need to be specified in the object
|
|
||||||
create array and can be added
|
|
||||||
later after the object is created. The Android implementation provides
|
|
||||||
a convenience feature to
|
|
||||||
avoid this complexity, which is described in
|
|
||||||
<a href="{@docRoot}ndk/guides/audio/opensl-for-android.html#dynamic-interfaces">Dynamic interfaces at object creation</a>.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
After the object is created and realized, the application should acquire interfaces for each
|
|
||||||
feature it needs, using {@code GetInterface} on the initial {@code SLObjectItf}.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Finally, the object is available for use via its interfaces, though note that
|
|
||||||
some objects require
|
|
||||||
further setup. In particular, an audio player with URI data source needs a bit
|
|
||||||
more preparation in
|
|
||||||
order to detect connection errors. See the
|
|
||||||
<a href="#prefetch">Audio player prefetch</a> section for details.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
After your application is done with the object, you should explicitly destroy it; see the
|
|
||||||
<a href="#destroy">Destroy</a> section below.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h2 id="prefetch">Audio Player Prefetch</h2>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
For an audio player with URI data source, {@code Object::Realize} allocates
|
|
||||||
resources but does not
|
|
||||||
connect to the data source (<em>prepare</em>) or begin pre-fetching data. These occur once the
|
|
||||||
player state is set to either {@code SL_PLAYSTATE_PAUSED} or {@code SL_PLAYSTATE_PLAYING}.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Some information may still be unknown until relatively late in this sequence. In
|
|
||||||
particular, initially {@code Player::GetDuration} returns {@code SL_TIME_UNKNOWN} and
|
|
||||||
{@code MuteSolo::GetChannelCount} either returns successfully with channel count zero or the
|
|
||||||
error result {@code SL_RESULT_PRECONDITIONS_VIOLATED}. These APIs return the proper values
|
|
||||||
once they are known.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Other properties that are initially unknown include the sample rate and
|
|
||||||
actual media content type
|
|
||||||
based on examining the content's header (as opposed to the
|
|
||||||
application-specified MIME type and
|
|
||||||
container type). These are also determined later during
|
|
||||||
prepare/prefetch, but there are no APIs to
|
|
||||||
retrieve them.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
The prefetch status interface is useful for detecting when all information
|
|
||||||
is available, or your
|
|
||||||
application can poll periodically. Note that some information, such as the
|
|
||||||
duration of a streaming
|
|
||||||
MP3, may <em>never</em> be known.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
The prefetch status interface is also useful for detecting errors. Register a callback
|
|
||||||
and enable
|
|
||||||
at least the {@code SL_PREFETCHEVENT_FILLLEVELCHANGE} and {@code SL_PREFETCHEVENT_STATUSCHANGE}
|
|
||||||
events. If both of these events are delivered simultaneously, and
|
|
||||||
{@code PrefetchStatus::GetFillLevel} reports a zero level, and
|
|
||||||
{@code PrefetchStatus::GetPrefetchStatus} reports {@code SL_PREFETCHSTATUS_UNDERFLOW},
|
|
||||||
then this
|
|
||||||
indicates a non-recoverable error in the data source. This includes the inability to
|
|
||||||
connect to the
|
|
||||||
data source because the local filename does not exist or the network URI is invalid.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
The next version of OpenSL ES is expected to add more explicit support for
|
|
||||||
handling errors in the
|
|
||||||
data source. However, for future binary compatibility, we intend to continue
|
|
||||||
to support the current
|
|
||||||
method for reporting a non-recoverable error.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
In summary, a recommended code sequence is:
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<ol>
|
|
||||||
<li>{@code Engine::CreateAudioPlayer}</li>
|
|
||||||
<li>{@code Object:Realize}</li>
|
|
||||||
<li>{@code Object::GetInterface} for {@code SL_IID_PREFETCHSTATUS}</li>
|
|
||||||
<li>{@code PrefetchStatus::SetCallbackEventsMask}</li>
|
|
||||||
<li>{@code PrefetchStatus::SetFillUpdatePeriod}</li>
|
|
||||||
<li>{@code PrefetchStatus::RegisterCallback}</li>
|
|
||||||
<li>{@code Object::GetInterface} for {@code SL_IID_PLAY}</li>
|
|
||||||
<li>{@code Play::SetPlayState} to {@code SL_PLAYSTATE_PAUSED}, or
|
|
||||||
{@code SL_PLAYSTATE_PLAYING}</li>
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
<p class="note"><strong>Note: </strong>
|
|
||||||
Preparation and prefetching occur here; during this time your callback is called with
|
|
||||||
periodic status updates.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h2 id="destroy">Destroy</h2>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Be sure to destroy all objects when exiting from your application.
|
|
||||||
Objects should be destroyed in
|
|
||||||
reverse order of their creation, as it is not safe to destroy an object that has any dependent
|
|
||||||
objects. For example, destroy in this order: audio players and recorders, output mix, and then
|
|
||||||
finally the engine.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
OpenSL ES does not support automatic garbage collection or
|
|
||||||
<a class="external-link" href="http://en.wikipedia.org/wiki/Reference_counting">reference
|
|
||||||
counting</a> of interfaces. After you call {@code Object::Destroy}, all extant
|
|
||||||
interfaces that are
|
|
||||||
derived from the associated object become undefined.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
The Android OpenSL ES implementation does not detect the incorrect use of such interfaces.
|
|
||||||
Continuing to use such interfaces after the object is destroyed can cause your application to
|
|
||||||
crash or behave in unpredictable ways.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
We recommend that you explicitly set both the primary object interface and all associated
|
|
||||||
interfaces to NULL as part of your object destruction sequence, which prevents the accidental
|
|
||||||
misuse of a stale interface handle.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h2 id="panning">Stereo Panning</h2>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
When {@code Volume::EnableStereoPosition} is used to enable stereo panning of a mono source,
|
|
||||||
there is a 3-dB reduction in total
|
|
||||||
<a class="external-link" href="http://en.wikipedia.org/wiki/Sound_power_level">sound power
|
|
||||||
level</a>. This is needed to permit the total sound power level to remain constant as
|
|
||||||
the source is
|
|
||||||
panned from one channel to the other. Therefore, only enable stereo positioning if you need
|
|
||||||
it. See the Wikipedia article on
|
|
||||||
<a class="external-link" href="http://en.wikipedia.org/wiki/Panning_(audio)">audio panning</a>
|
|
||||||
for more information.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h2 id="callbacks">Callbacks and Threads</h2>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Callback handlers are generally called synchronously with respect to the event. That is, at the
|
|
||||||
moment and location that the event is detected by the implementation. This point is
|
|
||||||
asynchronous with respect to the application, so you should use a non-blocking synchronization
|
|
||||||
mechanism to control access to any variables shared between the application and the callback
|
|
||||||
handler. In the example code, such as for buffer queues, we have either omitted this
|
|
||||||
synchronization or used blocking synchronization in the interest of simplicity. However, proper
|
|
||||||
non-blocking synchronization is critical for any production code.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Callback handlers are called from internal non-application threads that are not attached to the
|
|
||||||
Android runtime, so they are ineligible to use JNI. Because these internal threads are
|
|
||||||
critical to
|
|
||||||
the integrity of the OpenSL ES implementation, a callback handler should also not block
|
|
||||||
or perform
|
|
||||||
excessive work.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
If your callback handler needs to use JNI or execute work that is not proportional to the
|
|
||||||
callback, the handler should instead post an event for another thread to process. Examples of
|
|
||||||
acceptable callback workload include rendering and enqueuing the next output buffer
|
|
||||||
(for an AudioPlayer), processing the just-filled input buffer and enqueueing the next
|
|
||||||
empty buffer
|
|
||||||
(for an AudioRecorder), or simple APIs such as most of the <em>Get</em> family. See the
|
|
||||||
<a href="#perform">Performance</a> section below regarding the workload.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Note that the converse is safe: an Android application thread that has entered JNI
|
|
||||||
is allowed to
|
|
||||||
directly call OpenSL ES APIs, including those that block. However, blocking calls are not
|
|
||||||
recommended from the main thread, as they may result in
|
|
||||||
<em>Application Not Responding</em> (ANR).
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
The determination regarding the thread that calls a callback handler is largely left up to the
|
|
||||||
implementation. The reason for this flexibility is to permit future optimizations,
|
|
||||||
especially on
|
|
||||||
multi-core devices.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
The thread on which the callback handler runs is not guaranteed to have the same
|
|
||||||
identity across
|
|
||||||
different calls. Therefore, do not rely on the {@code pthread_t returned by pthread_self()}
|
|
||||||
or the
|
|
||||||
{@code pid_t returned by gettid()} to be consistent across calls. For the same reason,
|
|
||||||
do not use
|
|
||||||
the thread local storage (TLS) APIs such as {@code pthread_setspecific()} and
|
|
||||||
{@code pthread_getspecific()} from a callback.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
The implementation guarantees that concurrent callbacks of the same kind, for the
|
|
||||||
same object, does
|
|
||||||
not occur. However, concurrent callbacks of different kinds for the same object are possible on
|
|
||||||
different threads.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h2 id="perform">Performance</h2>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
As OpenSL ES is a native C API, non-runtime application threads that call OpenSL ES have no
|
|
||||||
runtime-related overhead such as garbage collection pauses. With one exception described below,
|
|
||||||
there is no additional performance benefit to the use of OpenSL ES other than this.
|
|
||||||
In particular,
|
|
||||||
the use of OpenSL ES does not guarantee enhancements such as lower audio latency and higher
|
|
||||||
scheduling priority over that which the platform generally provides. On the other hand, as the
|
|
||||||
Android platform and specific device implementations continue to evolve, an OpenSL ES application
|
|
||||||
can expect to benefit from any future system performance improvements.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
One such evolution is support for reduced
|
|
||||||
<a href="{@docRoot}ndk/guides/audio/output-latency.html">audio output latency</a>.
|
|
||||||
The underpinnings for reduced
|
|
||||||
output latency were first included in Android 4.1 (API level 16), and then
|
|
||||||
continued progress occurred in Android 4.2 (API level 17). These improvements are available via
|
|
||||||
OpenSL ES for device implementations that
|
|
||||||
claim feature {@code android.hardware.audio.low_latency}.
|
|
||||||
If the device doesn't claim this feature but supports Android 2.3 (API level 9)
|
|
||||||
or later, then you can still use the OpenSL ES APIs but the output latency may be higher.
|
|
||||||
The lower
|
|
||||||
output latency path is used only if the application requests a buffer size and sample rate
|
|
||||||
that are
|
|
||||||
compatible with the device's native output configuration. These parameters are
|
|
||||||
device-specific and
|
|
||||||
should be obtained as described below.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Beginning with Android 4.2 (API level 17), an application can query for the
|
|
||||||
platform native or optimal output sample rate and buffer size for the device's primary output
|
|
||||||
stream. When combined with the feature test just mentioned, an app can now configure itself
|
|
||||||
appropriately for lower latency output on devices that claim support.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
For Android 4.2 (API level 17) and earlier, a buffer count of two or more is
|
|
||||||
required for lower latency. Beginning with Android 4.3 (API level 18), a buffer
|
|
||||||
count of one is sufficient for lower latency.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
All OpenSL ES interfaces for output effects preclude the lower latency path.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
The recommended sequence is as follows:
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<ol>
|
|
||||||
<li>Check for API level 9 or higher to confirm the use of OpenSL ES.</li>
|
|
||||||
<li>Check for the {@code android.hardware.audio.low_latency} feature using code such as this:
|
|
||||||
<pre>import android.content.pm.PackageManager;
|
|
||||||
...
|
|
||||||
PackageManager pm = getContext().getPackageManager();
|
|
||||||
boolean claimsFeature = pm.hasSystemFeature(PackageManager.FEATURE_AUDIO_LOW_LATENCY);
|
|
||||||
</pre></li>
|
|
||||||
<li>Check for API level 17 or higher to confirm the use of
|
|
||||||
{@code android.media.AudioManager.getProperty()}.</li>
|
|
||||||
<li>Get the native or optimal output sample rate and buffer size for this device's
|
|
||||||
primary output
|
|
||||||
stream using code such as this:
|
|
||||||
<pre>import android.media.AudioManager;
|
|
||||||
...
|
|
||||||
AudioManager am = (AudioManager) getSystemService(Context.AUDIO_SERVICE);
|
|
||||||
String sampleRate = am.getProperty(AudioManager.PROPERTY_OUTPUT_SAMPLE_RATE));
|
|
||||||
String framesPerBuffer = am.getProperty(AudioManager.PROPERTY_OUTPUT_FRAMES_PER_BUFFER));
|
|
||||||
</pre>
|
|
||||||
Note that {@code sampleRate} and {@code framesPerBuffer} are <em>strings</em>. First check for
|
|
||||||
null and then convert to int using {@code Integer.parseInt()}.</li>
|
|
||||||
<li>Now use OpenSL ES to create an AudioPlayer with PCM buffer queue data locator.</li>
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
<p class="note"><strong>Note: </strong>
|
|
||||||
You can use the
|
|
||||||
<a class="external-link"
|
|
||||||
href="https://play.google.com/store/apps/details?id=com.levien.audiobuffersize">
|
|
||||||
Audio Buffer Size</a>
|
|
||||||
test app to determine the native buffer size and sample rate for OpenSL ES audio
|
|
||||||
applications on your audio device. You can also visit GitHub to view <a class="external-link"
|
|
||||||
href="https://github.com/gkasten/high-performance-audio/tree/master/audio-buffer-size">
|
|
||||||
audio-buffer-size</a> samples.
|
|
||||||
|
|
||||||
<p>
|
|
||||||
The number of lower latency audio players is limited. If your application requires more
|
|
||||||
than a few
|
|
||||||
audio sources, consider mixing your audio at the application level. Be sure to destroy your audio
|
|
||||||
players when your activity is paused, as they are a global resource shared with other apps.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
To avoid audible glitches, the buffer queue callback handler must execute within a small and
|
|
||||||
predictable time window. This typically implies no unbounded blocking on mutexes, conditions,
|
|
||||||
or I/O operations. Instead consider <em>try locks</em>, locks and waits with timeouts, and
|
|
||||||
<a class="external-link"
|
|
||||||
href="https://source.android.com/devices/audio/avoiding_pi.html#nonBlockingAlgorithms">
|
|
||||||
non-blocking algorithms</a>.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
The computation required to render the next buffer (for AudioPlayer) or consume the previous
|
|
||||||
buffer (for AudioRecord) should take approximately the same amount of time for each callback.
|
|
||||||
Avoid algorithms that execute in a non-deterministic amount of time or are <em>bursty</em> in
|
|
||||||
their computations. A callback computation is bursty if the CPU time spent in any given callback
|
|
||||||
is significantly larger than the average. In summary, the ideal is for the CPU execution time of
|
|
||||||
the handler to have variance near zero, and for the handler to not block for unbounded times.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Lower latency audio is possible for these outputs only:
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li>On-device speakers.</li>
|
|
||||||
<li>Wired headphones.</li>
|
|
||||||
<li>Wired headsets.</li>
|
|
||||||
<li>Line out.</li>
|
|
||||||
<li><a class="external-link" href="https://source.android.com/devices/audio/usb.html">
|
|
||||||
USB digital
|
|
||||||
audio</a>.</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
On some devices, speaker latency is higher than other paths due to digital signal processing for
|
|
||||||
speaker correction and protection.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
As of API level 21,
|
|
||||||
<a href="{@docRoot}ndk/guides/audio/input-latency.html">lower latency audio input</a>
|
|
||||||
is supported
|
|
||||||
on select devices. To take advantage of
|
|
||||||
this feature, first confirm that lower latency output is available as described above. The
|
|
||||||
capability for lower latency output is a prerequisite for the lower latency input feature. Then,
|
|
||||||
create an AudioRecorder with the same sample rate and buffer size as would be used for output.
|
|
||||||
OpenSL ES interfaces for input effects preclude the lower latency path. The record preset
|
|
||||||
{@code SL_ANDROID_RECORDING_PRESET_VOICE_RECOGNITION} must be used for lower latency; this preset
|
|
||||||
disables device-specific digital signal processing that may add latency to the input path. For
|
|
||||||
more information on record presets, see the <a href="#configuration-interface">Android
|
|
||||||
configuration interface</a> section above.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
For simultaneous input and output, separate buffer queue completion handlers are used for each
|
|
||||||
side. There is no guarantee of the relative order of these callbacks, or the synchronization of
|
|
||||||
the audio clocks, even when both sides use the same sample rate. Your application
|
|
||||||
should buffer the
|
|
||||||
data with proper buffer synchronization.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
One consequence of potentially independent audio clocks is the need for asynchronous sample rate
|
|
||||||
conversion. A simple (though not ideal for audio quality) technique for asynchronous sample rate
|
|
||||||
conversion is to duplicate or drop samples as needed near a zero-crossing point.
|
|
||||||
More sophisticated
|
|
||||||
conversions are possible.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h2 id="sandp">Security and Permissions</h2>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
As far as who can do what, security in Android is done at the process level. Java programming
|
|
||||||
language code cannot do anything more than native code, nor can native code do anything more than
|
|
||||||
Java programming language code. The only differences between them are the available APIs.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Applications using OpenSL ES must request the permissions that they would need for similar
|
|
||||||
non-native APIs. For example, if your application records audio, then it needs the
|
|
||||||
{@code android.permission.RECORD_AUDIO} permission. Applications that use audio effects need
|
|
||||||
{@code android.permission.MODIFY_AUDIO_SETTINGS}. Applications that play network URI resources
|
|
||||||
need {@code android.permission.NETWORK}. See
|
|
||||||
<a href="https://developer.android.com/training/permissions/index.html">Working with System
|
|
||||||
Permissions</a> for more information.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Depending on the platform version and implementation, media content parsers and
|
|
||||||
software codecs may
|
|
||||||
run within the context of the Android application that calls OpenSL ES (hardware codecs are
|
|
||||||
abstracted but are device-dependent). Malformed content designed to exploit parser and codec
|
|
||||||
vulnerabilities is a known attack vector. We recommend that you play media only from trustworthy
|
|
||||||
sources or that you partition your application such that code that handles media from
|
|
||||||
untrustworthy sources runs in a relatively <em>sandboxed</em> environment. For example, you could
|
|
||||||
process media from untrustworthy sources in a separate process. Though both processes would still
|
|
||||||
run under the same UID, this separation does make an attack more difficult.
|
|
||||||
</p>
|
|
||||||
@@ -1,310 +0,0 @@
|
|||||||
page.title=Audio Output Latency
|
|
||||||
@jd:body
|
|
||||||
|
|
||||||
<div id="qv-wrapper">
|
|
||||||
<div id="qv">
|
|
||||||
<h2>On this page</h2>
|
|
||||||
|
|
||||||
<ol>
|
|
||||||
<li><a href="#prereq">Prerequisites</a></li>
|
|
||||||
<li><a href="#low-lat-track">Obtain a Low-Latency Track</a></li>
|
|
||||||
<li><a href="#buffer-size">Use the Optimal Buffer Size When Enqueuing Audio Data</a></li>
|
|
||||||
<li><a href="#warmup-lat">Avoid Warmup Latency</a></li>
|
|
||||||
</ol>
|
|
||||||
<h2>Also read</h2>
|
|
||||||
|
|
||||||
<ol>
|
|
||||||
<li><a href="https://source.android.com/devices/audio/latency_app.html" class="external-link">
|
|
||||||
Audio Latency for App Developers</a></li>
|
|
||||||
<li><a href="https://source.android.com/devices/audio/latency_contrib.html" class="external-link">
|
|
||||||
Contributors to Audio Latency</a></li>
|
|
||||||
<li><a href="https://source.android.com/devices/audio/latency_measure.html" class="external-link">
|
|
||||||
Measuring Audio Latency</a></li>
|
|
||||||
<li><a href="https://source.android.com/devices/audio/warmup.html" class="external-link">
|
|
||||||
Audio Warmup</a></li>
|
|
||||||
<li><a href="https://en.wikipedia.org/wiki/Latency_%28audio%29" class="external-link">
|
|
||||||
Latency (audio)</a></li>
|
|
||||||
<li><a href="https://en.wikipedia.org/wiki/Round-trip_delay_time" class="external-link">
|
|
||||||
Round-trip delay time</a></li>
|
|
||||||
</ol>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<a href="https://www.youtube.com/watch?v=PnDK17zP9BI" class="notice-developers-video">
|
|
||||||
<div>
|
|
||||||
<h3>Video</h3>
|
|
||||||
<p>Audio latency: buffer sizes</p>
|
|
||||||
</div>
|
|
||||||
</a>
|
|
||||||
|
|
||||||
<a href="https://www.youtube.com/watch?v=92fgcUNCHic" class="notice-developers-video">
|
|
||||||
<div>
|
|
||||||
<h3>Video</h3>
|
|
||||||
<p>Building great multi-media experiences on Android</p>
|
|
||||||
</div>
|
|
||||||
</a>
|
|
||||||
|
|
||||||
<p>This page describes how to develop your audio app for low-latency output and how to avoid
|
|
||||||
warmup latency.</p>
|
|
||||||
|
|
||||||
<h2 id="prereq">Prerequisites</h2>
|
|
||||||
|
|
||||||
<p>Low-latency audio is currently only supported when using Android's implementation of the
|
|
||||||
OpenSL ES™ API specification, and the Android NDK:
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<ol>
|
|
||||||
<li>Download and install the <a href="{@docRoot}tools/sdk/ndk/index.html">Android NDK</a>.</li>
|
|
||||||
<li>Read the <a href="{@docRoot}ndk/guides/audio/opensl-for-android.html">OpenSL ES
|
|
||||||
documentation</a>.
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
<h2 id="low-lat-track">Obtain a Low-Latency Track</h2>
|
|
||||||
|
|
||||||
<p>Latency is the time it takes for a signal to travel through a system. These are the common
|
|
||||||
types of latency related to audio apps:
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><strong>Audio output latency</strong> is the time between an audio sample being generated by an
|
|
||||||
app and the sample being played through the headphone jack or built-in speaker.</li>
|
|
||||||
|
|
||||||
<li><strong>Audio input latency</strong> is the time between an audio signal being received by a
|
|
||||||
device’s audio input, such as the microphone, and that same audio data being available to an
|
|
||||||
app.</li>
|
|
||||||
|
|
||||||
<li><strong>Round-trip latency</strong> is the sum of input latency, app processing time, and
|
|
||||||
output latency.</li>
|
|
||||||
|
|
||||||
<li><strong>Touch latency</strong> is the time between a user touching the screen and that
|
|
||||||
touch event being received by an app.</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<p>It is difficult to test audio output latency in isolation since it requires knowing exactly
|
|
||||||
when the first sample is sent into the audio path (although this can be done using a
|
|
||||||
<a href="https://source.android.com/devices/audio/testing_circuit.html" class="external-link">
|
|
||||||
light testing circuit</a> and an oscilloscope). If you know the round-trip audio latency, you can
|
|
||||||
use the rough rule of thumb: <strong>audio output latency is half the round-trip audio latency
|
|
||||||
over paths without signal processing</strong>.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>To obtain the lowest latency, you must supply audio data that matches the device's optimal
|
|
||||||
sample rate and buffer size. For more information, see
|
|
||||||
<a href="https://source.android.com/devices/audio/latency_design.html" class="external-link">
|
|
||||||
Design For Reduced Latency</a>.</p>
|
|
||||||
|
|
||||||
<h3>Obtain the optimal sample rate</h3>
|
|
||||||
|
|
||||||
<p>In Java, you can obtain the optimal sample rate from AudioManager as shown in the following
|
|
||||||
code example:</p>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
AudioManager am = (AudioManager) getSystemService(Context.AUDIO_SERVICE);
|
|
||||||
String frameRate = am.getProperty(AudioManager.PROPERTY_OUTPUT_SAMPLE_RATE);
|
|
||||||
int frameRateInt = Integer.parseInt(frameRate);
|
|
||||||
if (frameRateInt == 0) frameRateInt = 44100; // Use a default value if property not found
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p class="note">
|
|
||||||
<strong>Note:</strong> The sample rate refers to the rate of each stream. If your source audio
|
|
||||||
has two channels (stereo), then you will have one stream playing a pair of samples (frame) at
|
|
||||||
<a href="{@docRoot}reference/android/media/AudioManager.html#PROPERTY_OUTPUT_SAMPLE_RATE">
|
|
||||||
PROPERTY_OUTPUT_SAMPLE_RATE</a>.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h3>Use the optimal sample rate when creating your audio player</h3>
|
|
||||||
|
|
||||||
<p>Once you have the optimal sample output rate, you can supply it when creating your player
|
|
||||||
using OpenSL ES:</p>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
// create buffer queue audio player
|
|
||||||
void Java_com_example_audio_generatetone_MainActivity_createBufferQueueAudioPlayer
|
|
||||||
(JNIEnv* env, jclass clazz, jint sampleRate, jint framesPerBuffer)
|
|
||||||
{
|
|
||||||
...
|
|
||||||
// specify the audio source format
|
|
||||||
SLDataFormat_PCM format_pcm;
|
|
||||||
format_pcm.numChannels = 2;
|
|
||||||
format_pcm.samplesPerSec = (SLuint32) sampleRate * 1000;
|
|
||||||
...
|
|
||||||
}
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p class="note">
|
|
||||||
<strong>Note:</strong> {@code samplesPerSec} refers to the <em>sample rate per channel in
|
|
||||||
millihertz</em> (1 Hz = 1000 mHz).
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h3>Avoid adding output interfaces that involve signal processing</h3>
|
|
||||||
|
|
||||||
<p>Only these interfaces are supported by the fast mixer:</p>
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li>SL_IID_ANDROIDSIMPLEBUFFERQUEUE</li>
|
|
||||||
<li>SL_IID_VOLUME</li>
|
|
||||||
<li>SL_IID_MUTESOLO</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<p>These interfaces are not allowed because they involve signal processing and will cause
|
|
||||||
your request for a fast-track to be rejected:</p>
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li>SL_IID_BASSBOOST</li>
|
|
||||||
<li>SL_IID_EFFECTSEND</li>
|
|
||||||
<li>SL_IID_ENVIRONMENTALREVERB</li>
|
|
||||||
<li>SL_IID_EQUALIZER</li>
|
|
||||||
<li>SL_IID_PLAYBACKRATE</li>
|
|
||||||
<li>SL_IID_PRESETREVERB</li>
|
|
||||||
<li>SL_IID_VIRTUALIZER</li>
|
|
||||||
<li>SL_IID_ANDROIDEFFECT</li>
|
|
||||||
<li>SL_IID_ANDROIDEFFECTSEND</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<p>When you create your player, make sure you only add <em>fast</em> interfaces, as shown in
|
|
||||||
the following example:</p>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
const SLInterfaceID interface_ids[2] = { SL_IID_ANDROIDSIMPLEBUFFERQUEUE, SL_IID_VOLUME };
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<h3>Verify you're using a low-latency track</h3>
|
|
||||||
|
|
||||||
<p>Complete these steps to verify that you have successfully obtained a low-latency track:</p>
|
|
||||||
|
|
||||||
<ol>
|
|
||||||
<li>Launch your app and then run the following command:</li>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
adb shell ps | grep your_app_name
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<li>Make a note of your app's process ID.</li>
|
|
||||||
|
|
||||||
<li>Now, play some audio from your app. You have approximately three seconds to run the
|
|
||||||
following command from the terminal:</li>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
adb shell dumpsys media.audio_flinger
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<li>Scan for your process ID. If you see an <em>F</em> in the <em>Name</em> column, it's on a
|
|
||||||
low-latency track (the F stands for <em>fast track</em>).</li>
|
|
||||||
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
<h3>Measure round-trip latency</h3>
|
|
||||||
|
|
||||||
<p>You can measure round-trip audio latency by creating an app that generates an audio signal,
|
|
||||||
listens for that signal, and measures the time between sending it and receiving it.
|
|
||||||
Alternatively, you can install this
|
|
||||||
<a href="https://play.google.com/store/apps/details?id=org.drrickorang.loopback" class="external-link">
|
|
||||||
latency testing app</a>. This performs a round-trip latency test using the
|
|
||||||
<a href="https://source.android.com/devices/audio/latency_measure.html#larsenTest" class="external-link">
|
|
||||||
Larsen test</a>. You can also
|
|
||||||
<a href="https://github.com/gkasten/drrickorang/tree/master/LoopbackApp" class="external-link">
|
|
||||||
view the source code</a> for the latency testing app.</p>
|
|
||||||
|
|
||||||
<p>Since the lowest latency is achieved over audio paths with minimal signal processing, you may
|
|
||||||
also want to use an
|
|
||||||
<a href="https://source.android.com/devices/audio/latency_measure.html#loopback" class="external-link">
|
|
||||||
Audio Loopback Dongle</a>, which allows the test to be run over the headset connector.</p>
|
|
||||||
|
|
||||||
<p>The lowest possible round-trip audio latency varies greatly depending on device model and
|
|
||||||
Android build. You can measure it yourself using the latency testing app and loopback
|
|
||||||
dongle. When creating apps for <em>Nexus devices</em>, you can also use the
|
|
||||||
<a href="https://source.android.com/devices/audio/latency_measurements.html" class="external-link">
|
|
||||||
published measurements</a>.</p>
|
|
||||||
|
|
||||||
<p>You can also get a rough idea of audio performance by testing whether the device reports
|
|
||||||
support for the
|
|
||||||
<a href="http://developer.android.com/reference/android/content/pm/PackageManager.html#FEATURE_AUDIO_LOW_LATENCY">
|
|
||||||
low_latency</a> and
|
|
||||||
<a href="http://developer.android.com/reference/android/content/pm/PackageManager.html#FEATURE_AUDIO_PRO">
|
|
||||||
pro</a> hardware features.</p>
|
|
||||||
|
|
||||||
<h3>Review the CDD and audio latency</h3>
|
|
||||||
|
|
||||||
<p>The Android Compatibility Definition Document (CDD) enumerates the hardware and software
|
|
||||||
requirements of a compatible Android device.
|
|
||||||
See <a href="https://source.android.com/compatibility/" class="external-link">
|
|
||||||
Android Compatibility</a> for more information on the overall compatibility program, and
|
|
||||||
<a href="https://static.googleusercontent.com/media/source.android.com/en//compatibility/android-cdd.pdf" class="external-link">
|
|
||||||
CDD</a> for the actual CDD document.</p>
|
|
||||||
|
|
||||||
<p>In the CDD, round-trip latency is specified as 20 ms or lower (even though musicians
|
|
||||||
generally require 10 ms). This is because there are important use cases that are enabled by
|
|
||||||
20 ms.</p>
|
|
||||||
|
|
||||||
<p>There is currently no API to determine audio latency over any path on an Android device at
|
|
||||||
runtime. You can, however, use the following hardware feature flags to find out whether the
|
|
||||||
device makes any guarantees for latency:</p>
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><a href="http://developer.android.com/reference/android/content/pm/PackageManager.html#FEATURE_AUDIO_LOW_LATENCY">
|
|
||||||
android.hardware.audio.low_latency</a> indicates a continuous output latency of 45 ms or
|
|
||||||
less.</li>
|
|
||||||
|
|
||||||
<li><a href="http://developer.android.com/reference/android/content/pm/PackageManager.html#FEATURE_AUDIO_PRO">
|
|
||||||
android.hardware.audio.pro</a> indicates a continuous round-trip latency of 20 ms or
|
|
||||||
less.</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<p>The criteria for reporting these flags is defined in the CDD in sections <em>5.6 Audio
|
|
||||||
Latency</em> and <em>5.10 Professional Audio</em>.</p>
|
|
||||||
|
|
||||||
<p>Here’s how to check for these features in Java:</p>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
boolean hasLowLatencyFeature =
|
|
||||||
getPackageManager().hasSystemFeature(PackageManager.FEATURE_AUDIO_LOW_LATENCY);
|
|
||||||
|
|
||||||
boolean hasProFeature =
|
|
||||||
getPackageManager().hasSystemFeature(PackageManager.FEATURE_AUDIO_PRO);
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>Regarding the relationship of audio features, the {@code android.hardware.audio.low_latency}
|
|
||||||
feature is a prerequisite for {@code android.hardware.audio.pro}. A device can implement
|
|
||||||
{@code android.hardware.audio.low_latency} and not {@code android.hardware.audio.pro}, but not
|
|
||||||
vice-versa.</p>
|
|
||||||
|
|
||||||
<h2 id="buffer-size">Use the Optimal Buffer Size When Enqueuing Audio Data</h2>
|
|
||||||
|
|
||||||
<p>You can obtain the optimal buffer size in a similar way to the optimal frame rate, using the
|
|
||||||
AudioManager API:</p>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
AudioManager am = (AudioManager) getSystemService(Context.AUDIO_SERVICE);
|
|
||||||
String framesPerBuffer = am.getProperty(AudioManager.PROPERTY_OUTPUT_FRAMES_PER_BUFFER);
|
|
||||||
int framesPerBufferInt = Integer.parseInt(framesPerBuffer);
|
|
||||||
if (framesPerBufferInt == 0) framesPerBufferInt = 256; // Use default
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>The
|
|
||||||
<a href="{@docRoot}reference/android/media/AudioManager.html#PROPERTY_OUTPUT_FRAMES_PER_BUFFER">
|
|
||||||
PROPERTY_OUTPUT_FRAMES_PER_BUFFER</a> property indicates the number of audio frames
|
|
||||||
that the HAL (Hardware Abstraction Layer) buffer can hold. You should construct your audio
|
|
||||||
buffers so that they contain an exact multiple of this number. If you use the correct number
|
|
||||||
of audio frames, your callbacks occur at regular intervals, which reduces jitter.</p>
|
|
||||||
|
|
||||||
<p>It is important to use the API to determine buffer size rather than using a hardcoded value,
|
|
||||||
because HAL buffer sizes differ across devices and across Android builds.</p>
|
|
||||||
|
|
||||||
<h2 id="warmup-lat">Avoid Warmup Latency</h2>
|
|
||||||
|
|
||||||
<p>When you enqueue audio data for the first time, it takes a small, but still significant,
|
|
||||||
amount of time for the device audio circuit to warm up. To avoid this warmup latency, you should
|
|
||||||
enqueue buffers of audio data containing silence, as shown in the following code example:</p>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
#define CHANNELS 1
|
|
||||||
static short* silenceBuffer;
|
|
||||||
int numSamples = frames * CHANNELS;
|
|
||||||
silenceBuffer = malloc(sizeof(*silenceBuffer) * numSamples);
|
|
||||||
for (i = 0; i < numSamples; i++) {
|
|
||||||
silenceBuffer[i] = 0;
|
|
||||||
}
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>At the point when audio should be produced, you can switch to enqueuing buffers containing
|
|
||||||
real audio data.</p>
|
|
||||||
|
|
||||||
@@ -1,151 +0,0 @@
|
|||||||
page.title=Sample Rates
|
|
||||||
@jd:body
|
|
||||||
|
|
||||||
<div id="qv-wrapper">
|
|
||||||
<div id="qv">
|
|
||||||
<h2>On this page</h2>
|
|
||||||
|
|
||||||
<ol>
|
|
||||||
<li><a href="#best">Best Practices for Sampling and Resampling</a></li>
|
|
||||||
<li><a href="#info">For More Information</a></li>
|
|
||||||
</ol>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<a class="notice-developers-video" href="https://www.youtube.com/watch?v=6Dl6BdrA-sQ">
|
|
||||||
<div>
|
|
||||||
<h3>Video</h3>
|
|
||||||
<p>Sample Rates: Why Can't We All Just Agree?</p>
|
|
||||||
</div>
|
|
||||||
</a>
|
|
||||||
|
|
||||||
<p>As of Android 5.0 (Lollipop), the audio resamplers are now entirely based
|
|
||||||
on FIR filters derived from a Kaiser windowed-sinc function. The Kaiser windowed-sinc
|
|
||||||
offers the following properties:
|
|
||||||
<ul>
|
|
||||||
<li>It is straightforward to calculate for its design parameters (stopband
|
|
||||||
ripple, transition bandwidth, cutoff frequency, filter length).</li>
|
|
||||||
<li>It is nearly optimal for reduction of stopband energy compared to overall
|
|
||||||
energy.</li>
|
|
||||||
</ul>
|
|
||||||
See P.P. Vaidyanathan, <a class="external-link"
|
|
||||||
href="https://drive.google.com/file/d/0B7tBh7YQV0DGak9peDhwaUhqY2c/view">
|
|
||||||
<i>Multirate Systems and Filter Banks</i></a>, p. 50 for discussions of the
|
|
||||||
Kaiser Window and its optimality and relationship to Prolate Spheroidal
|
|
||||||
Windows.</p>
|
|
||||||
|
|
||||||
<p>The design parameters are automatically computed based on internal
|
|
||||||
quality determination and the sampling ratios desired. Based on the
|
|
||||||
design parameters, the windowed-sinc filter is generated. For music use,
|
|
||||||
the resampler for 44.1 to 48 kHz and vice versa is generated at a higher
|
|
||||||
quality than for arbitrary frequency conversion.</p>
|
|
||||||
|
|
||||||
<p>The audio resamplers provide increased quality, as well as speed
|
|
||||||
to achieve that quality. But resamplers can introduce small amounts
|
|
||||||
of passband ripple and aliasing harmonic noise, and they can cause some high
|
|
||||||
frequency loss in the transition band, so avoid using them unnecessarily.</p>
|
|
||||||
|
|
||||||
<h2 id="best">Best Practices for Sampling and Resampling</h2>
|
|
||||||
<p>This section describes some best practices to help you avoid problems with sampling rates.</p>
|
|
||||||
<h3>Choose the sampling rate to fit the device</h3>
|
|
||||||
|
|
||||||
<p>In general, it is best to choose the sampling rate to fit the device,
|
|
||||||
typically 44.1 kHz or 48 kHz. Use of a sample rate greater than
|
|
||||||
48 kHz will typically result in decreased quality because a resampler must be
|
|
||||||
used to play back the file.</p>
|
|
||||||
|
|
||||||
<h3>Use simple resampling ratios (fixed versus interpolated polyphases)</h3>
|
|
||||||
|
|
||||||
<p>The resampler operates in one of the following modes:</p>
|
|
||||||
<ul>
|
|
||||||
<li>Fixed polyphase mode. The filter coefficients for each polyphase are precomputed.</li>
|
|
||||||
<li>Interpolated polyphase mode. The filter coefficients for each polyphase must
|
|
||||||
be interpolated from the nearest two precomputed polyphases.</li>
|
|
||||||
</ul>
|
|
||||||
<p>The resampler is fastest in fixed polyphase mode, when the ratio of input
|
|
||||||
rate over output rate L/M (taking out the greatest common divisor)
|
|
||||||
has M less than 256. For example, for 44,100 to 48,000 conversion, L = 147,
|
|
||||||
M = 160.</p>
|
|
||||||
|
|
||||||
<p>In fixed polyphase mode, the sampling rate is locked for as
|
|
||||||
many samples converted and does not change. In interpolated polyphase
|
|
||||||
mode, the sampling rate is approximate. The drift is generally on the
|
|
||||||
order of one sample over a few hours of playback on a 48-kHz device.
|
|
||||||
This is not usually a concern because approximation error is much less than
|
|
||||||
frequency error of internal quartz oscillators, thermal drift, or jitter
|
|
||||||
(typically tens of ppm).</p>
|
|
||||||
|
|
||||||
<p>Choose simple-ratio sampling rates such as 24 kHz (1:2) and 32 kHz (2:3) when playing back
|
|
||||||
on a 48-kHz device, even though other sampling
|
|
||||||
rates and ratios may be permitted through AudioTrack.</p>
|
|
||||||
|
|
||||||
<h3>Use upsampling rather than downsampling when changing sample rates</h3>
|
|
||||||
|
|
||||||
<p>Sampling rates can be changed on the fly. The granularity of
|
|
||||||
such change is based on the internal buffering (typically a few hundred
|
|
||||||
samples), not on a sample-by-sample basis. This can be used for effects.</p>
|
|
||||||
|
|
||||||
<p>Do not dynamically change sampling rates when
|
|
||||||
downsampling. When changing sample rates after an audio track is
|
|
||||||
created, differences of around 5 to 10 percent from the original rate may
|
|
||||||
trigger a filter recomputation when downsampling (to properly suppress
|
|
||||||
aliasing). This can consume computing resources and may cause an audible click
|
|
||||||
if the filter is replaced in real time.</p>
|
|
||||||
|
|
||||||
<h3>Limit downsampling to no more than 6:1</h3>
|
|
||||||
|
|
||||||
<p>Downsampling is typically triggered by hardware device requirements. When the
|
|
||||||
Sample Rate converter is used for downsampling,
|
|
||||||
try to limit the downsampling ratio to no more than 6:1 for good aliasing
|
|
||||||
suppression (for example, no greater downsample than 48,000 to 8,000). The filter
|
|
||||||
lengths adjust to match the downsampling ratio, but you sacrifice more
|
|
||||||
transition bandwidth at higher downsampling ratios to avoid excessively
|
|
||||||
increasing the filter length. There are no similar aliasing concerns for
|
|
||||||
upsampling. Note that some parts of the audio pipeline
|
|
||||||
may prevent downsampling greater than 2:1.</p>
|
|
||||||
|
|
||||||
<h3 id="latency">If you are concerned about latency, do not resample</h3>
|
|
||||||
|
|
||||||
<p>Resampling prevents the track from being placed in the FastMixer
|
|
||||||
path, which means that significantly higher latency occurs due to the additional,
|
|
||||||
larger buffer in the ordinary Mixer path. Furthermore,
|
|
||||||
there is an implicit delay from the filter length of the resampler,
|
|
||||||
though this is typically on the order of one millisecond or less,
|
|
||||||
which is not as large as the additional buffering for the ordinary Mixer path
|
|
||||||
(typically 20 milliseconds).</p>
|
|
||||||
|
|
||||||
<h2 id="info">For More Information</h2>
|
|
||||||
<p>This section lists some additional resources about sampling and resampling.</p>
|
|
||||||
|
|
||||||
<h3>Sample rates</h3>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
<a href="http://en.wikipedia.org/wiki/Sampling_%28signal_processing%29" class="external-link" >
|
|
||||||
Sampling (signal processing)</a> at Wikipedia.</p>
|
|
||||||
|
|
||||||
<h3>Resampling</h3>
|
|
||||||
|
|
||||||
<p><a href="http://en.wikipedia.org/wiki/Sample_rate_conversion" class="external-link" >
|
|
||||||
Sample rate conversion</a> at Wikipedia.</p>
|
|
||||||
|
|
||||||
<p><a href="http://source.android.com/devices/audio/src.html" class="external-link" >
|
|
||||||
Sample Rate Conversion</a> at source.android.com.</p>
|
|
||||||
|
|
||||||
<h3>The high bit-depth and high kHz controversy</h3>
|
|
||||||
|
|
||||||
<p><a href="http://people.xiph.org/~xiphmont/demo/neil-young.html" class="external-link" >
|
|
||||||
24/192 Music Downloads ... and why they make no sense</a>
|
|
||||||
by Christopher "Monty" Montgomery of Xiph.Org.</p>
|
|
||||||
|
|
||||||
<p><a href="https://www.youtube.com/watch?v=cIQ9IXSUzuM" class="external-link" >
|
|
||||||
D/A and A/D | Digital Show and Tell</a>
|
|
||||||
video by Christopher "Monty" Montgomery of Xiph.Org.</p>
|
|
||||||
|
|
||||||
<p><a href="http://www.trustmeimascientist.com/2013/02/04/the-science-of-sample-rates-when-higher-is-better-and-when-it-isnt/" class="external-link">
|
|
||||||
The Science of Sample Rates (When Higher Is Better - And When It Isn't)</a>.</p>
|
|
||||||
|
|
||||||
<p><a href="http://www.image-line.com/support/FLHelp/html/app_audio.htm" class="external-link" >
|
|
||||||
Audio Myths & DAW Wars</a></p>
|
|
||||||
|
|
||||||
<p><a href="http://forums.stevehoffman.tv/threads/192khz-24bit-vs-96khz-24bit-debate-interesting-revelation.317660/" class="external-link">
|
|
||||||
192kHz/24bit vs. 96kHz/24bit "debate"- Interesting revelation</a></p>
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
page.title=Building Your Project
|
|
||||||
@jd:body
|
|
||||||
|
|
||||||
<p>One of the NDK's core purposes is allowing you to build C and C++ source code into shared
|
|
||||||
libraries that you can use in your app.</p>
|
|
||||||
|
|
||||||
<p>This section explains how to build native binaries for use in your Android app. It begins by
|
|
||||||
explaining the
|
|
||||||
<a href="{@docRoot}ndk/guides/android_mk.html">{@code Android.mk}</a> file, which
|
|
||||||
defines properties specific to individual <i>modules</i>, or libraries. Then, it explains the
|
|
||||||
<a href="{@docRoot}ndk/guides/application_mk.html">{@code Application.mk}</a> file, which defines
|
|
||||||
properties for all the modules that you use in your
|
|
||||||
app. Next, it tells you how to use the <a href="{@docRoot}ndk/guides/ndk-build.html">
|
|
||||||
{@code ndk-build}</a> script, which is what the NDK uses to build your sources. Last, it ventures
|
|
||||||
into advanced territory, discussing how to incorporate the NDK into your own
|
|
||||||
<a href="{@docRoot}ndk/guides/standalone_toolchain.html">toolchain</a>, if you prefer to
|
|
||||||
build that way instead of using
|
|
||||||
<a href="{@docRoot}ndk/guides/ndk-build.html">{@code ndk-build}</a>.</p>
|
|
||||||
@@ -1,303 +0,0 @@
|
|||||||
page.title=Concepts
|
|
||||||
@jd:body
|
|
||||||
|
|
||||||
<div id="qv-wrapper">
|
|
||||||
<div id="qv">
|
|
||||||
<h2>On this page</h2>
|
|
||||||
|
|
||||||
<ol>
|
|
||||||
<li><a href="#bb">Before Beginning</a></li>
|
|
||||||
<li><a href="#intro">Introduction</a></li>
|
|
||||||
<li><a href="#hiw">How It Works</a></li>
|
|
||||||
<li><a href="#naa">Native Activities and Applications</a></li>
|
|
||||||
</ol>
|
|
||||||
</li>
|
|
||||||
</ol>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<h2 id="bb">Before Beginning</h2>
|
|
||||||
|
|
||||||
<p>This guide assumes that you are already familiar with concepts inherent in native programming and
|
|
||||||
in <a href="{@docRoot}developer/index.html">Android development</a>.</p>
|
|
||||||
|
|
||||||
</ul>
|
|
||||||
<h2 id="intro">Introduction</h2>
|
|
||||||
|
|
||||||
<p>This section provides a high-level explanation of how the NDK works. The Android NDK is a set of
|
|
||||||
tools allowing you to embed C or C++ (“native code”) into your Android apps. The ability to use
|
|
||||||
native code in Android apps can be particularly useful to developers who wish to do one or more of
|
|
||||||
the following:</p>
|
|
||||||
<ul>
|
|
||||||
<li>Port their apps between platforms.</li>
|
|
||||||
<li>Reuse existing libraries, or provide their own libraries for reuse.
|
|
||||||
</li>
|
|
||||||
<li>Increase performance in certain cases, particularly computationally intensive ones like games.
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
<h2 id="hiw">How it Works</h2>
|
|
||||||
|
|
||||||
<p>This section introduces the main components used in building a native application for Android,
|
|
||||||
and goes on to describe the process of building and packaging.</p>
|
|
||||||
<h3 id="mc">Main components</h3>
|
|
||||||
|
|
||||||
<p>You should have an understanding of the following components as you build your app:</p>
|
|
||||||
<ul>
|
|
||||||
<li>ndk-build: The ndk-build script launches the build scripts at the heart of the NDK. These
|
|
||||||
scripts:
|
|
||||||
<ul>
|
|
||||||
<li>Automatically probe your development system and app project file to determine what to build.</li>
|
|
||||||
<li>Generate binaries.</li>
|
|
||||||
<li>Copy the binaries to your app's project path.</li>
|
|
||||||
</ul>
|
|
||||||
<p>For more information, see
|
|
||||||
<a href="{@docRoot}ndk/guides/ndk-build.html">ndk-build</a>.</p>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li>Java: From your Java source, the Android build process generates {@code .dex}
|
|
||||||
(Dalvik EXecutable) files, which are what the Android OS runs in the Dalvik Virtual Machine
|
|
||||||
(“DVM”). Even if your app contains no Java source code at all, the build process still generates a
|
|
||||||
{@code .dex} executable file within which the native component runs.
|
|
||||||
|
|
||||||
<p>When developing Java components, use the {@code native} keyword to indicate methods implemented
|
|
||||||
as native code. For example, the following function declaration tells the compiler that the
|
|
||||||
implementation is in a native library:</p>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
public native int add(int x, int y);
|
|
||||||
</pre>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li>Native shared libraries: The NDK builds these libraries, or {@code .so} files, from your native
|
|
||||||
source code.
|
|
||||||
|
|
||||||
<p class="note"><strong>Note:</strong> If two libraries implement respective methods with the same
|
|
||||||
signature, a link error occurs. In C, "signature" means method name only. In C++, "signature" means
|
|
||||||
not only method name, but also its argument names and types.</p>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li>Native static libraries: The NDK can also build static libraries, or {@code .a} files, which you
|
|
||||||
can link against other libraries.</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li>Java Native Interface (JNI): The JNI is the interface via which the Java and C++ components
|
|
||||||
talk to one another. This guide assumes knowledge of the JNI; for information about it, consult the
|
|
||||||
<a href="http://docs.oracle.com/javase/7/docs/technotes/guides/jni/spec/jniTOC.html">
|
|
||||||
Java Native Interface Specification</a>.</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li>Application Binary Interface (ABI): The ABI defines exactly how your app's machine code is
|
|
||||||
expected to interact with the system at runtime. The NDK builds {@code .so} files against these
|
|
||||||
definitions. Different ABIs correspond to different architectures: The NDK includes ABI support for
|
|
||||||
ARMEABI (default), MIPS, and x86. For more information, see
|
|
||||||
<a href="{@docRoot}ndk/guides/abis.html">ABI Management</a>.</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li>Manifest: If you are writing an app with no Java component to it, you must declare the
|
|
||||||
{@link android.app.NativeActivity} class in the
|
|
||||||
<a href="{@docRoot}guide/topics/manifest/manifest-intro.html">manifest</a>.
|
|
||||||
<a href="#naa">Native Activities and Applications</a> provides more detail on how to do this, under
|
|
||||||
“Using the {@code native_activity.h} interface.”
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<p>The following two items are only required for building using the
|
|
||||||
<a href="{@docRoot}ndk/guides/ndk-build.html">{@code ndk-build}</a> script,
|
|
||||||
and for debugging using the <a href="{@docRoot}ndk/guides/ndk-gdb.html">
|
|
||||||
{@code ndk-gdb}</a> script.
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><a href="{@docRoot}ndk/guides/android_mk.html">{@code Android.mk}</a>:
|
|
||||||
You must create an <a href="{@docRoot}ndk/guides/android_mk.html">
|
|
||||||
{@code Android.mk}</a> configuration file inside your {@code jni} folder. The {@code ndk-build}
|
|
||||||
script looks at this file, which defines the module and its name, the source files to be compiled,
|
|
||||||
build flags and libraries to link.</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><a href="{@docRoot}ndk/guides/application_mk.html">{@code Application.mk}</a>: This file
|
|
||||||
enumerates and describes the modules that your app requires. This information includes:
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li>ABIs used to compile for specific platforms.</li>
|
|
||||||
<li>Toolchains.</li>
|
|
||||||
<li>Standard libraries to include (static and dynamic STLport or default system).</li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
<h3 id="fl">Flow</h3>
|
|
||||||
|
|
||||||
<p>The general flow for developing a native app for Android is as follows:</p>
|
|
||||||
<ol type="1">
|
|
||||||
<li>Design your app, deciding which parts to implement in Java, and which parts to implement as
|
|
||||||
native code.
|
|
||||||
|
|
||||||
<p class="note"><strong>Note:</strong> While it is possible to completely avoid Java, you are likely
|
|
||||||
to find the Android Java framework useful for tasks including controlling the display and UI.</p>
|
|
||||||
</li>
|
|
||||||
<li>Create an Android app Project as you would for any other Android project.</li>
|
|
||||||
<li>If you are writing a native-only app, declare the {@link android.app.NativeActivity} class in
|
|
||||||
{@code AndroidManifest.xml}. For more information, see the <a href="#naa">Native Activities and
|
|
||||||
Applications</a>.
|
|
||||||
</li>
|
|
||||||
<li>Create an {@code Android.mk} file describing the native library, including name, flags, linked
|
|
||||||
libraries, and source files to be compiled in the "JNI" directory.</li>
|
|
||||||
<li>Optionally, you can create an {@code Application.mk} file configuring the target ABIs,
|
|
||||||
toolchain, release/debug mode, and STL. For any of these that you do not specify, the following
|
|
||||||
default values are used, respectively:
|
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
ABI: armeabi
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
Toolchain: GCC 4.8
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
Mode: Release
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
STL: system
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
<li>Place your native source under the project's {@code jni} directory.</li>
|
|
||||||
<li>Use ndk-build to compile the native ({@code .so}, {@code .a}) libraries.</li>
|
|
||||||
<li>Build the Java component, producing the executable {@code .dex} file.</li>
|
|
||||||
<li>Package everything into an APK file, containing {@code .so}, {@code .dex}, and other files
|
|
||||||
needed for your app to run.
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
<h2 id="naa">Native Activities and Applications</h2>
|
|
||||||
|
|
||||||
<p>The Android SDK provides a helper class, {@link android.app.NativeActivity}, that allows you to
|
|
||||||
write a completely native activity. {@link android.app.NativeActivity} handles the communication
|
|
||||||
between the Android framework and your native code, so you do not have to subclass it or call its
|
|
||||||
methods. All you need to do is declare your application to be native in your
|
|
||||||
{@code AndroidManifest.xml} file, and begin creating your native application.</p>
|
|
||||||
|
|
||||||
<p>An Android application using {@link android.app.NativeActivity} still runs in its own virtual
|
|
||||||
machine, sandboxed from other applications. You can therefore still access Android framework APIs
|
|
||||||
through the JNI. In certain cases, however–such as for sensors, input events, and
|
|
||||||
assets–the NDK provides native interfaces that you can use instead of having to call
|
|
||||||
across the JNI. For more information about such support, see
|
|
||||||
<a href="{@docRoot}ndk/guides/stable_apis.html">Android NDK Native APIs</a>.</p>
|
|
||||||
|
|
||||||
<p>Regardless of whether or not you are developing a native activity, we recommend that you create
|
|
||||||
your projects with the traditional Android build tools. Doing so helps ensure building and packaging
|
|
||||||
of Android applications with the correct structure.</p>
|
|
||||||
|
|
||||||
<p>The Android NDK provides you with two choices to implement your native activity:</p>
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li>The <a href="{@docRoot}ndk/reference/native__activity_8h.html">{@code native_activity.h}</a>
|
|
||||||
header defines the native version of the
|
|
||||||
{@link android.app.NativeActivity} class. It contains the callback interface and data structures
|
|
||||||
that you need to create your native activity. Because the main thread of your application handles
|
|
||||||
the callbacks, your callback implementations must not be blocking. If they block, you might receive
|
|
||||||
ANR (Application Not Responding) errors because your main thread is unresponsive until the callback
|
|
||||||
returns.</li>
|
|
||||||
<li>The {@code android_native_app_glue.h} file defines a static helper library built on top of the
|
|
||||||
<a href="{@docRoot}ndk/reference/native__activity_8h.html">{@code native_activity.h}</a> interface.
|
|
||||||
It spawns another thread, which handles things such as
|
|
||||||
callbacks or input events in an event loop. Moving these events to a separate thread prevents any
|
|
||||||
callbacks from blocking your main thread.</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<p>The {@code <ndk_root>/sources/android/native_app_glue/android_native_app_glue.c} source is
|
|
||||||
also available, allowing you to modify the implementation.</p>
|
|
||||||
<p>For more information on how to use this static library, examine the native-activity sample
|
|
||||||
application and its documentation. Further reading is also available in the comments in the {@code <ndk_root>/sources/android/native_app_glue/android_native_app_glue.h} file.</p>
|
|
||||||
|
|
||||||
<h3 id="na">Using the native_activity.h interface</h3>
|
|
||||||
|
|
||||||
<p>To implement a native activity with the
|
|
||||||
<a href="{@docRoot}ndk/reference/native__activity_8h.html">{@code native_activity.h}</a>
|
|
||||||
interface:</p>
|
|
||||||
|
|
||||||
<ol type="1">
|
|
||||||
<li>Create a {@code jni/} directory in your project's root directory. This directory stores all of
|
|
||||||
your native code.</li>
|
|
||||||
<li>Declare your native activity in the {@code AndroidManifest.xml} file.</li>
|
|
||||||
|
|
||||||
<p>Because your application has no Java code, set {@code android:hasCode} to {@code false}.</p>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
<application android:label="@string/app_name" android:hasCode="false">
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>You must set the {@code android:name} attribute of the activity tag to
|
|
||||||
{@link android.app.NativeActivity}.</p>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
<activity android:name="android.app.NativeActivity"
|
|
||||||
android:label="@string/app_name">
|
|
||||||
</pre>
|
|
||||||
<p class="note"><strong>Note:</strong> You can subclass {@link android.app.NativeActivity}. If you
|
|
||||||
do, use the name of the subclass instead of {@link android.app.NativeActivity}.</p>
|
|
||||||
<p>The {@code android:value} attribute of the {@code meta-data} tag specifies the name of the shared
|
|
||||||
library containing the entry point to the application (such as C/C++ {@code main}), omitting the
|
|
||||||
{@code lib} prefix and {@code .so} suffix from the library name.</p>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
<meta-data android:name="android.app.lib_name"
|
|
||||||
android:value="native-activity" />
|
|
||||||
<intent-filter>
|
|
||||||
<action android:name="android.intent.action.MAIN" />
|
|
||||||
<category android:name="android.intent.category.LAUNCHER" />
|
|
||||||
</intent-filter>
|
|
||||||
</activity>
|
|
||||||
</application>
|
|
||||||
</manifest>
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<li>Create a file for your native activity, and implement the function named in the
|
|
||||||
<a href="{@docRoot}ndk/reference/group___native_activity.html#ga02791d0d490839055169f39fdc905c5e">
|
|
||||||
{@code ANativeActivity_onCreate}</a> variable.
|
|
||||||
The app calls this function when the native activity starts. This function, analogous
|
|
||||||
to {@code main} in C/C++, receives a pointer to an
|
|
||||||
<a href="{@docRoot}ndk/reference/struct_a_native_activity.html">{@code ANativeActivity}</a>
|
|
||||||
structure, which contains function pointers to the various callback implementations that you need
|
|
||||||
to write.
|
|
||||||
Set the applicable callback function pointers in {@code ANativeActivity->callbacks} to the
|
|
||||||
implementations of your callbacks.</li>
|
|
||||||
|
|
||||||
<li>Set the {@code ANativeActivity->instance} field to the address of any instance of specific
|
|
||||||
data that you want to use.</li>
|
|
||||||
<li>Implement anything else that you want your activity to do upon starting.</li>
|
|
||||||
<li>Implement the rest of the callbacks that you set in {@code ANativeActivity->callbacks}. For
|
|
||||||
more information on when the callbacks are called, see
|
|
||||||
<a href="{@docRoot}training/basics/activity-lifecycle/index.html">Managing the Activity
|
|
||||||
Lifecycle</a>.
|
|
||||||
</li>
|
|
||||||
<li>Develop the rest of your application.</li>
|
|
||||||
<li>Create an {@code Android.mk file} in the {@code jni/} directory of your project to describe your
|
|
||||||
native module to the build system. For more information, see
|
|
||||||
<a href="{@docRoot}ndk/guides/android_mk.html">Android.mk</a>.</li>
|
|
||||||
<li>Once you have an <a href="{@docRoot}ndk/guides/android_mk.html">{@code Android.mk}</a>
|
|
||||||
file, compile your native code using the {@code ndk-build} command.</li>
|
|
||||||
|
|
||||||
<pre class="no-pretty-print">
|
|
||||||
$ cd <path>/<to>/<project>
|
|
||||||
$ <ndk>/ndk-build
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<li>Build and install your Android project as usual. If your native code is in
|
|
||||||
the {@code jni/} directory, the build script automatically packages the {@code .so} file(s) built
|
|
||||||
from it into the APK.</li>
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
@@ -1,326 +0,0 @@
|
|||||||
page.title=C++ Library Support
|
|
||||||
@jd:body
|
|
||||||
|
|
||||||
<div id="qv-wrapper">
|
|
||||||
<div id="qv">
|
|
||||||
<h2>On this page</h2>
|
|
||||||
|
|
||||||
<ol>
|
|
||||||
<li><a href="#hr">Helper Runtimes</a></li>
|
|
||||||
<li><a href="#rc">Runtime Characteristics</a></li>
|
|
||||||
<li><a href="#ic">Important Considerations</a></li>
|
|
||||||
<li><a href="#li">Licensing</a></li>
|
|
||||||
</ol>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<p>The Android platform provides a very minimal C++ runtime support library ({@code libstdc++}).
|
|
||||||
This minimal support does not include, for example:</p>
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li>Standard C++ Library support (except a few trivial headers).</li>
|
|
||||||
<li>C++ exceptions support</li>
|
|
||||||
<li>RTTI support</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<p>The NDK provides headers for use with this default library. In addition, the NDK provides a
|
|
||||||
number of helper runtimes that provide additional features. This page provides information about
|
|
||||||
these helper runtimes, their characteristics, and how to use them.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h2 id="hr">Helper Runtimes</h2>
|
|
||||||
|
|
||||||
<p>Table 1 provides names, brief explanations, and features of runtimes available inthe NDK.</p>
|
|
||||||
|
|
||||||
<p class="table-caption" id="runtimes">
|
|
||||||
<strong>Table 1.</strong> NDK Runtimes and Features.</p>
|
|
||||||
|
|
||||||
<table>
|
|
||||||
<tr>
|
|
||||||
<th>Name</th>
|
|
||||||
<th>Explanation>
|
|
||||||
<th>Features
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td><a href="#system">{@code libstdc++} (default)</a> </td>
|
|
||||||
<td>The default minimal system C++ runtime library.</td>
|
|
||||||
<td>N/A</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td><a href="#ga">{@code gabi++_static}</a> </td>
|
|
||||||
<td>The GAbi++ runtime (static).</td>
|
|
||||||
<td>C++ Exceptions and RTTI</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td><a href="#ga">{@code gabi++_shared}</a> </td>
|
|
||||||
<td>The GAbi++ runtime (shared).</td>
|
|
||||||
<td>C++ Exceptions and RTTI</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td><a href="#stl">{@code stlport_static}</a> </td>
|
|
||||||
<td>The STLport runtime (static).</td>
|
|
||||||
<td> C++ Exceptions and RTTI; Standard Library</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td><a href="#stl">{@code stlport_shared}</a> </td>
|
|
||||||
<td>The STLport runtime (shared).</td>
|
|
||||||
<td> C++ Exceptions and RTTI; Standard Library</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td><a href="#gn">{@code gnustl_static}</a> </td>
|
|
||||||
<td>The GNU STL (static).</td>
|
|
||||||
<td> C++ Exceptions and RTTI; Standard Library</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td><a href="#gn">{@code gnustl_shared}</a> </td>
|
|
||||||
<td>The GNU STL (shared).</td>
|
|
||||||
<td> C++ Exceptions and RTTI; Standard Library</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td><a href="#cs">{@code c++_static}</a> </td>
|
|
||||||
<td>The LLVM libc++ runtime (static).</td>
|
|
||||||
<td> C++ Exceptions and RTTI; Standard Library</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td><a href="#cs">{@code c++_shared}</a> </td>
|
|
||||||
<td>The LLVM libc++ runtime (shared).</td>
|
|
||||||
<td> C++ Exceptions and RTTI; Standard Library</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<h3>How to set your runtime</h3>
|
|
||||||
|
|
||||||
<p>Use the {@code APP_STL} variable in your <a href="{@docRoot}ndk/guides/application_mk.html">
|
|
||||||
{@code Application.mk}</a> file to specify the runtime you wish to use. Use the values in
|
|
||||||
the "Name" column in Table 1 as your setting. For example:</p>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
APP_STL := gnustl_static
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>You may only select one runtime for your app, and can only do in
|
|
||||||
<a href="{@docRoot}ndk/guides/application_mk.html">{@code Application.mk}</a>.</p>
|
|
||||||
|
|
||||||
<p>Even if you do not use the NDK build system, you can still use STLport, libc++ or GNU STL.
|
|
||||||
For more information on how to use these runtimes with your own toolchain, see <a href="{@docRoot}ndk/guides/standalone_toolchain.html">Standalone Toolchain</a>.</p>
|
|
||||||
|
|
||||||
<h2 id="rc">Runtime Characteristics</h2>
|
|
||||||
<h3 id="system">libstdc++ (default system runtime)</h3>
|
|
||||||
|
|
||||||
<p>This runtime only provides the following headers, with no support beyond them:</p>
|
|
||||||
<ul>
|
|
||||||
<li>{@code cassert}</li>
|
|
||||||
<li>{@code cctype}</li>
|
|
||||||
<li>{@code cerrno}</li>
|
|
||||||
<li>{@code cfloat}</li>
|
|
||||||
<li>{@code climits}</li>
|
|
||||||
<li>{@code cmath}</li>
|
|
||||||
<li>{@code csetjmp}</li>
|
|
||||||
<li>{@code csignal}</li>
|
|
||||||
<li>{@code cstddef}</li>
|
|
||||||
<li>{@code cstdint}</li>
|
|
||||||
<li>{@code cstdio}</li>
|
|
||||||
<li>{@code cstdlib}</li>
|
|
||||||
<li>{@code cstring}</li>
|
|
||||||
<li>{@code ctime}</li>
|
|
||||||
<li>{@code cwchar}</li>
|
|
||||||
<li>{@code new}</li>
|
|
||||||
<li>{@code stl_pair.h}</li>
|
|
||||||
<li>{@code typeinfo}</li>
|
|
||||||
<li>{@code utility}</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3 id="ga">GAbi++ runtime</h3>
|
|
||||||
<p>This runtime provides the same headers as the default runtime, but adds support for RTTI
|
|
||||||
(RunTime Type Information) and exception handling.</p>
|
|
||||||
|
|
||||||
|
|
||||||
<h3 id="stl">STLport runtime</h3>
|
|
||||||
<p>This runtime is an Android port of STLport
|
|
||||||
(<a href="http://www.stlport.org">http://www.stlport.org</a>). It provides a complete set of C++
|
|
||||||
standard library headers. It also, by embedding its own instance of GAbi++, provides support for
|
|
||||||
RTTI and exception handling.</p>
|
|
||||||
|
|
||||||
<p>While shared and static versions of this runtime are avilable, we recommend using the shared
|
|
||||||
version. For more information, see <a href="#sr">Static runtimes</a>.</p>
|
|
||||||
|
|
||||||
<p>The shared library file is named {@code libstlport_shared.so} instead of {@code libstdc++.so}
|
|
||||||
as is common on other platforms.</p>
|
|
||||||
|
|
||||||
<p>In addition to the static- and shared-library options, you can also force the NDK to
|
|
||||||
build the library from sources by adding the following line to your {@code Application.mk}
|
|
||||||
file, or setting it in your environment prior to building: </p>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
STLPORT_FORCE_REBUILD := true
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
|
|
||||||
<h3 id="gn">GNU STL runtime</h3>
|
|
||||||
<p>This runtime is the GNU Standard C++ Library, ({@code libstdc++-v3}). Its shared library file is
|
|
||||||
named {@code libgnustl_shared.so}.</p>
|
|
||||||
|
|
||||||
|
|
||||||
<h3 id="cs">libc++ runtime:</h3>
|
|
||||||
<p>This runtime is an Android port of <a href="http://libcxx.llvm.org/">LLVM libc++</a>. Its
|
|
||||||
shared library file is named {@code libc++_shared.so}.</p>
|
|
||||||
|
|
||||||
<p>By default, this runtime compiles with {@code -std=c++11}. As with GNU {@code libstdc++}, you
|
|
||||||
need to explicitly turn on exceptions or RTTI support. For information on how to do this, see
|
|
||||||
<a href="#xp">C++ Exceptions</a> and <a href="#rt">RTTI</a>.</p>
|
|
||||||
|
|
||||||
<p>The NDK provides prebuilt static and shared libraries for {@code libc++}, but you can force the
|
|
||||||
NDK to rebuild {@code libc++} from sources by adding the following line to your
|
|
||||||
{@code Application.mk} file, or setting it in your environment prior to building: </p>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
LIBCXX_FORCE_REBUILD := true
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<h4>Atomic support</h4>
|
|
||||||
|
|
||||||
<p>If you include {@code <atomic>}, it's likely that you also need {@code libatomic}.
|
|
||||||
If you are using {@code ndk-build}, add the following line:</p>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
LOCAL_LDLIBS += -latomic
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>If you are using your own toolchain, use:</p>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
-latomic
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
|
|
||||||
<h4>Compatibility</h4>
|
|
||||||
|
|
||||||
<p>The NDK's libc++ is not stable. Not all the tests pass, and the test suite is not comprehensive.
|
|
||||||
Some known issues are:</p>
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li>Using {@code c++_shared} on ARM can crash when an exception is thrown.</li>
|
|
||||||
<li>Support for {@code wchar_t} and the locale APIs is limited.</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<p>You should also make sure to check the "Known Issues" section of the changelog for the NDK
|
|
||||||
release you are using.</p>
|
|
||||||
|
|
||||||
<p class="note"><strong>Warning: </strong>Attempting to change to an unsupported locale will
|
|
||||||
<strong>not</strong> fail. The operation will succeed, but the locale will not change and the
|
|
||||||
following message will appear in {@code logcat}.</p>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
newlocale() WARNING: Trying to set locale to en_US.UTF-8 other than "", "C" or "POSIX"
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
|
|
||||||
<h2 id="ic">Important Considerations</h2>
|
|
||||||
|
|
||||||
<h3 id="xp">C++ Exceptions</h3>
|
|
||||||
<p>In all versions of the NDK later than NDKr5, the NDK toolchain allows you to use C++ runtimes
|
|
||||||
that support exception handling. However, to ensure compatibility with earlier releases, it
|
|
||||||
compiles all C++ sources with {@code -fno-exceptions} support by default. You can enable C++
|
|
||||||
exceptions either for your entire app, or for individual modules.
|
|
||||||
|
|
||||||
<p>To enable exception-handling support for your entire app, add the following line to
|
|
||||||
your <a href="{@docRoot}ndk/guides/application_mk.html">{@code Application.mk}</a> file.
|
|
||||||
To enable exception-handling support for individual modules', add the following line to
|
|
||||||
their respective <a href="{@docRoot}ndk/guides/android_mk.html">{@code Android.mk}</a> files.</p>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
APP_CPPFLAGS += -fexceptions
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<h3 id="rt">RTTI</h3>
|
|
||||||
<p>In all versions of the NDK later than NDKr5, the NDK toolchain allows you to use C++ runtimes
|
|
||||||
that support RTTI. However, to ensure compatibility with earlier releases, it compiles all C++
|
|
||||||
sources with {@code -fno-rtti} by default.
|
|
||||||
|
|
||||||
<p>To enable RTTI support for your entire app for your entire application, add the following line to
|
|
||||||
your <a href="{@docRoot}ndk/guides/application_mk.html">{@code Application.mk}</a> file:
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
APP_CPPFLAGS += -frtti
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
To enable RTTI support for individual modules, add the following line to
|
|
||||||
their respective <a href="{@docRoot}ndk/guides/android_mk.html">{@code Android.mk}</a> files:
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
LOCAL_CPP_FEATURES += rtti
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
Alternatively, you can use:
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
LOCAL_CPPFLAGS += -frtti
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<h3 id="sr">Static runtimes</h3>
|
|
||||||
<p>Linking the static library variant of a C++ runtime to more than one binary may result in
|
|
||||||
unexpected behavior. For example, you may experience:</p>
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li>Memory allocated in one library, and freed in the other, causing memory leakage or heap
|
|
||||||
corruption.</li>
|
|
||||||
<li>Exceptions raised in {@code libfoo.so} going uncaught in {@code libbar.so}, causing your app
|
|
||||||
to crash.</li>
|
|
||||||
<li>Buffering of {@code std::cout} not working properly</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<p>In addition, if you link two shared libraries–or a shared library and an executable–
|
|
||||||
against the same static runtime, the final binary image of each shared library includes a copy of
|
|
||||||
the runtime's code. Having multiple instances of runtime code is problematic because of duplication
|
|
||||||
of certain global variables that the runtime uses or provides internally.</p>
|
|
||||||
|
|
||||||
<p>This problem does not apply to a project comprising a single shared library. For example,
|
|
||||||
you can link against {@code stlport_static}, and expect your app to behave correctly. If your
|
|
||||||
project requires several shared library modules, we recommend that you use the shared library
|
|
||||||
variant of your C++ runtime.</p>
|
|
||||||
|
|
||||||
<h3>Shared runtimes</h3>
|
|
||||||
<p>If your app targets a version of Android earlier than Android 4.3 (Android API level 18),
|
|
||||||
and you use the shared library variant of a given C++ runtime, you must load the shared library
|
|
||||||
before any other library that depends on it.</p>
|
|
||||||
|
|
||||||
<p>For example, an app may have the following modules:</p>
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li>libfoo.so</li>
|
|
||||||
<li>libbar.so which is used by libfoo.so</li>
|
|
||||||
<li>libstlport_shared.so, used by both libfoo and libbar</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<p>You must load the libraries in reverse dependency order: </p>
|
|
||||||
<pre>
|
|
||||||
static {
|
|
||||||
System.loadLibrary("stlport_shared");
|
|
||||||
System.loadLibrary("bar");
|
|
||||||
System.loadLibrary("foo");
|
|
||||||
}
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p class="note"><strong>Note: </strong>Do not use the {@code lib} prefix when calling
|
|
||||||
{@code System.loadLibrary()}.</p>
|
|
||||||
|
|
||||||
<h2 id="li">Licensing</h2>
|
|
||||||
|
|
||||||
<p>STLport is licensed under a BSD-style open-source license. See
|
|
||||||
{@code $NDK/sources/cxx-stl/stlport/README} for more details about STLport.</p>
|
|
||||||
|
|
||||||
<p>GNU libstdc++ is covered by the GPLv3 license, and <em>not</em> the LGPLv2 or LGPLv3. For
|
|
||||||
more information, see <a href="http://gcc.gnu.org/onlinedocs/libstdc++/manual/license.html">
|
|
||||||
License</a> on the GCC website.</p>
|
|
||||||
|
|
||||||
<p><a href="https://llvm.org/svn/llvm-project/libcxx/trunk/LICENSE.TXT">LLVM {@code libc++}</a>
|
|
||||||
is dual-licensed under both the University of Illinois "BSD-Like" license and the MIT license.</p>
|
|
||||||
@@ -1,109 +0,0 @@
|
|||||||
page.title=NEON Support
|
|
||||||
@jd:body
|
|
||||||
|
|
||||||
<div id="qv-wrapper">
|
|
||||||
<div id="qv">
|
|
||||||
<h2>On this page</h2>
|
|
||||||
|
|
||||||
<ol>
|
|
||||||
<li><a href="#ul">Using {@code LOCAL_ARM_NEON}</a></li>
|
|
||||||
<li><a href="#uns">Using the {@code .neon} Suffix</a></li>
|
|
||||||
<li><a href="#build">Build Requirements</a></li>
|
|
||||||
<li><a href="#rd">Runtime Detection</a></li>
|
|
||||||
<li><a href="#sc">Sample Code</a></li>
|
|
||||||
</ol>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<p>The NDK supports the ARM Advanced SIMD, an optional instruction-set extension of the ARMv7 spec.
|
|
||||||
NEON provides a set of scalar/vector instructions and registers (shared with the FPU) comparable to
|
|
||||||
MMX/SSE/3DNow! in the x86 world. To function, it requires VFPv3-D32 (32 hardware FPU 64-bit
|
|
||||||
registers, instead of the minimum of 16).</p>
|
|
||||||
|
|
||||||
<p>The NDK supports the compilation of modules or even specific source files with support for NEON.
|
|
||||||
As a result, a specific compiler flag enables the use of GCC ARM NEON intrinsics and VFPv3-D32
|
|
||||||
at the same time.</p>
|
|
||||||
|
|
||||||
<p>Not all ARMv7-based Android devices support NEON, but devices that do may benefit significantly
|
|
||||||
from its support for scalar/vector instructions. For x86 devices, the NDK can also translate NEON
|
|
||||||
instructions into SSE, although with several restrictions. For more information, see
|
|
||||||
<a href="{@docRoot}ndk/guides/x86.html#an">x86 Support for ARM NEON Intrinsics.</a></p>
|
|
||||||
|
|
||||||
<h2 id="ul">Using LOCAL_ARM_NEON</h2>
|
|
||||||
<p>To have the NDK build all its source files with NEON support, include the following line in
|
|
||||||
your module definition:</p>
|
|
||||||
|
|
||||||
<pre class="no-pretty-print">
|
|
||||||
LOCAL_ARM_NEON := true
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>It can be especially useful to build all source files with NEON support if you want to build a
|
|
||||||
static or shared library that specifically contains NEON code paths.</p>
|
|
||||||
|
|
||||||
<h2 id="uns">Using the .neon Suffix</h2>
|
|
||||||
<p>When listing source files for your {@code LOCAL_SRC_FILES} variable, you have the option of
|
|
||||||
using the {@code .neon} suffix to indicate that you want to build binaries with NEON support.
|
|
||||||
For example, the following example builds one file with {@code .neon} support, and another
|
|
||||||
without it:</p>
|
|
||||||
|
|
||||||
<pre class="no-pretty-print">
|
|
||||||
LOCAL_SRC_FILES := foo.c.neon bar.c
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>You can combine the {@code .neon} suffix with the {@code .arm} suffix, which specifies the 32-bit
|
|
||||||
ARM instruction set for non-NEON instructions. In such a definition, {@code arm} must come before
|
|
||||||
{@code neon}. For example: {@code foo.c.arm.neon} works, but {@code foo.c.neon.arm} does not.</p>
|
|
||||||
|
|
||||||
<h2 id="build">Build Requirements</h2>
|
|
||||||
<p>NEON support only works with the {@code armeabi-v7a} and {@code x86} ABIs. If the NDK build
|
|
||||||
scripts encounter other ABIs while attempting to build with NEON support, the NDK build scripts
|
|
||||||
exit. x86 provides <a href="x86.html">partial NEON support</a> via translation header. It is
|
|
||||||
important to use checks like the following in your <a href="{@docRoot}ndk/guides/android_mk.html">
|
|
||||||
{@code Android.mk}</a> file:</p>
|
|
||||||
|
|
||||||
<pre class="no-pretty-print">
|
|
||||||
# define a static library containing our NEON code
|
|
||||||
ifeq ($(TARGET_ARCH_ABI),$(filter $(TARGET_ARCH_ABI), armeabi-v7a x86))
|
|
||||||
include $(CLEAR_VARS)
|
|
||||||
LOCAL_MODULE := mylib-neon
|
|
||||||
LOCAL_SRC_FILES := mylib-neon.c
|
|
||||||
LOCAL_ARM_NEON := true
|
|
||||||
include $(BUILD_STATIC_LIBRARY)
|
|
||||||
endif # TARGET_ARCH_ABI == armeabi-v7a || x86
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<h2 id="rd">Runtime Detection</h2>
|
|
||||||
<p>Your app must perform runtime detection to confirm that NEON-capable machine code can be run on
|
|
||||||
the target device. This is because not all ARMv7-based Android devices support NEON. The app can
|
|
||||||
perform this check using the
|
|
||||||
<a href="{@docRoot}ndk/guides/cpu-features.html">{@code cpufeatures}</a> library that comes with
|
|
||||||
this NDK.</p>
|
|
||||||
|
|
||||||
<p>You should explicitly check that {@code android_getCpuFamily()} returns {@code
|
|
||||||
ANDROID_CPU_FAMILY_ARM}, and that {@code android_getCpuFeatures()} returns a value including the
|
|
||||||
{@code ANDROID_CPU_ARM_FEATURE_NEON flag} set. For example: </p>
|
|
||||||
|
|
||||||
<pre class="no-pretty-print">
|
|
||||||
#include <cpu-features.h>
|
|
||||||
...
|
|
||||||
...
|
|
||||||
if (android_getCpuFamily() == ANDROID_CPU_FAMILY_ARM &&
|
|
||||||
(android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_NEON) != 0)
|
|
||||||
{
|
|
||||||
// use NEON-optimized routines
|
|
||||||
...
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// use non-NEON fallback routines instead
|
|
||||||
...
|
|
||||||
}
|
|
||||||
|
|
||||||
...
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<h2 id="sc">Sample Code</h2>
|
|
||||||
<p>The source code for the NDK's hello-neon sample provides an example of how to use the
|
|
||||||
{@code cpufeatures} library and NEON intrinsics at the same time. This sample implements a tiny
|
|
||||||
benchmark for a FIR filter loop using a C version, and a NEON-optimized one for devices that
|
|
||||||
support it.</p>
|
|
||||||
@@ -1,210 +0,0 @@
|
|||||||
page.title=The cpufeatures Library
|
|
||||||
@jd:body
|
|
||||||
|
|
||||||
<div id="qv-wrapper">
|
|
||||||
<div id="qv">
|
|
||||||
<h2>On this page</h2>
|
|
||||||
|
|
||||||
<ol>
|
|
||||||
<li><a href="#usage">Usage</a></li>
|
|
||||||
<li><a href="#functions">Functions</a></li>
|
|
||||||
<li><a href="#ch">Change History</a></li>
|
|
||||||
</ol>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<p>The NDK provides a small library named {@code cpufeatures} that your app can use at runtime to
|
|
||||||
detect the target device's CPU family and the optional features it supports. It is designed to work
|
|
||||||
as-is on all official Android platform versions.</p>
|
|
||||||
|
|
||||||
<h2 id="usage">Usage</h2>
|
|
||||||
<p>The {@code cpufeatures} library is available as an import module. To use it, follow the procedure
|
|
||||||
below:</p>
|
|
||||||
|
|
||||||
<ol>
|
|
||||||
<li>List {@code cpufeatures} in your list of static library dependencies. For example:
|
|
||||||
|
|
||||||
<pre class="no-pretty-print">
|
|
||||||
LOCAL_STATIC_LIBRARIES := cpufeatures
|
|
||||||
</pre>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li>In your source code, include the {@code <cpu-features.h>} header file.</li>
|
|
||||||
|
|
||||||
<li>At the end of your <a href="{@docRoot}ndk/guides/android_mk.html">{@code Android.mk}</a> file,
|
|
||||||
insert an instruction to import the {@code android/cpufeatures} module. For example:
|
|
||||||
|
|
||||||
<pre class="no-pretty-print">
|
|
||||||
$(call import-module,android/cpufeatures)
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>Here is a simple example of an {@code Android.mk} file that imports the {@code cpufeatures}
|
|
||||||
library:</p>
|
|
||||||
|
|
||||||
<pre class="no-pretty-print">
|
|
||||||
<project-path>/jni/Android.mk:
|
|
||||||
LOCAL_PATH := $(call my-dir)
|
|
||||||
|
|
||||||
include $(CLEAR_VARS)
|
|
||||||
LOCAL_MODULE := <your-module-name>
|
|
||||||
LOCAL_SRC_FILES := <your-source-files>
|
|
||||||
LOCAL_STATIC_LIBRARIES := cpufeatures
|
|
||||||
include $(BUILD_SHARED_LIBRARY)
|
|
||||||
|
|
||||||
$(call import-module,android/cpufeatures)
|
|
||||||
</pre>
|
|
||||||
</li>
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
<h2 id="functions">Functions</h2>
|
|
||||||
<p>The {@code cpufeatures} library provides two functions. The first function returns the family to
|
|
||||||
which the device's CPU belongs. Declare it as follows:</p>
|
|
||||||
|
|
||||||
<pre class="no-pretty-print">
|
|
||||||
AndroidCpuFamily android_getCpuFamily();
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>The function returns one of the following enums, representing the CPU family/architecture that
|
|
||||||
the device supports.</p>
|
|
||||||
<ul>
|
|
||||||
<li>{@code ANDROID_CPU_FAMILY_ARM}</li>
|
|
||||||
<li>{@code ANDROID_CPU_FAMILY_X86}</li>
|
|
||||||
<li>{@code ANDROID_CPU_FAMILY_MIPS}</li>
|
|
||||||
<li>{@code ANDROID_CPU_FAMILY_ARM64}</li>
|
|
||||||
<li>{@code ANDROID_CPU_FAMILY_X86_64}</li>
|
|
||||||
<li>{@code ANDROID_CPU_FAMILY_MIPS64}</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<p>For a 32-bit executable on a 64-bit system, this function returns only the 32-bit value.</p>
|
|
||||||
|
|
||||||
<p>The second function returns the set of optional features that the device's CPU supports. Declare
|
|
||||||
it as follows:
|
|
||||||
|
|
||||||
<pre class="no-pretty-print">
|
|
||||||
uint64_t android_getCpuFeatures();
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>The return value takes the form of a set of bit flags, each flag representing one
|
|
||||||
CPU-family-specific feature. The rest of this section provides information on features for
|
|
||||||
the respective families.</p>
|
|
||||||
|
|
||||||
<h4>32-bit ARM CPU family</h4>
|
|
||||||
|
|
||||||
<p>The following flags are available for the 32-bit ARM CPU family:</p>
|
|
||||||
<dl>
|
|
||||||
<dt>{@code ANDROID_CPU_ARM_FEATURE_VFPv2}</dt>
|
|
||||||
<dd>Indicates that the device's CPU supports the VFPv2 instruction set. Most ARMv6 CPUs support
|
|
||||||
this instruction set.</dd>
|
|
||||||
|
|
||||||
<dt>{@code ANDROID_CPU_ARM_FEATURE_ARMv7}</dt>
|
|
||||||
<dd>Indicates that the device's CPU supports the ARMv7-A instruction set as supported by the
|
|
||||||
<a href="{@docRoot}ndk/guides/abis.html#v7a">armeabi-v7a</a> ABI. This instruction set supports both
|
|
||||||
Thumb-2 and VFPv3-D16 instructions. This return value also indicates support for the VFPv3 hardware
|
|
||||||
FPU instruction-set extension.</dd>
|
|
||||||
|
|
||||||
<dt>{@code ANDROID_CPU_ARM_FEATURE_VFPv3}</dt>
|
|
||||||
<dd>Indicates that the device's CPU supports the VFPv3 hardware FPU instruction-set extension.
|
|
||||||
<p>This value is equivalent to the {@code VFPv3-D16} instruction set, which provides provides only
|
|
||||||
16 hardware double-precision FP registers.</p></dd>
|
|
||||||
|
|
||||||
<dt>{@code ANDROID_CPU_ARM_FEATURE_VFP_D32}</dt>
|
|
||||||
<dd> Indicates that the device's CPU supports 32 hardware double-precision FP registers instead of
|
|
||||||
16. Even when there are 32 hardware double-precision FP registers, there are still only 32
|
|
||||||
single-precision registers mapped to the same register banks.</dd>
|
|
||||||
|
|
||||||
<dt>{@code ANDROID_CPU_ARM_FEATURE_NEON}</dt>
|
|
||||||
<dd>Indicates that the device's CPU supports the ARM Advanced SIMD (NEON) vector instruction set
|
|
||||||
extension. Note that ARM mandates that such CPUs also implement VFPv3-D32, which provides 32
|
|
||||||
hardware FP registers (shared with the NEON unit).</dd>
|
|
||||||
|
|
||||||
<dt>{@code ANDROID_CPU_ARM_FEATURE_VFP_FP16}</dt>
|
|
||||||
<dd>Indicates that the device's CPU supports instructions to perform floating-point operations on
|
|
||||||
16-bit registers. This feature is part of the VFPv4 specification.</dd>
|
|
||||||
|
|
||||||
<dt>{@code ANDROID_CPU_ARM_FEATURE_VFP_FMA}</dt>
|
|
||||||
<dd>Indicates that the device's CPU supports the fused multiply-accumulate extension for the VFP
|
|
||||||
instruction set. Also part of the VFPv4 specification.</dd>
|
|
||||||
|
|
||||||
<dt>{@code ANDROID_CPU_ARM_FEATURE_NEON_FMA}</dt>
|
|
||||||
<dd>Indicates that the device's CPU supports the fused multiply-accumulate extension for the NEON
|
|
||||||
instruction set. Also part of the VFPv4 specification.</dd>
|
|
||||||
|
|
||||||
<dt>{@code ANDROID_CPU_ARM_FEATURE_IDIV_ARM}</dt>
|
|
||||||
<dd>Indicates that the device's CPU supports integer division in ARM mode. Only available on later-
|
|
||||||
model CPUs, such as Cortex-A15.</dd>
|
|
||||||
|
|
||||||
<dt>{@code ANDROID_CPU_ARM_FEATURE_IDIV_THUMB2}</dt>
|
|
||||||
<dd>Indicates that the device's CPU supports Integer division in Thumb-2 mode. Only available on
|
|
||||||
later-model CPUs, such as Cortex-A15.</dd>
|
|
||||||
|
|
||||||
<dt>{@code ANDROID_CPU_ARM_FEATURE_iWMMXt}</dt>
|
|
||||||
<dd>Indicates that the device's CPU supports an instruction-set extension that adds MMX registers
|
|
||||||
and instructions. This feature is only available on a few XScale- based CPUs.</dd>
|
|
||||||
|
|
||||||
<dt>{@code ANDROID_CPU_ARM_FEATURE_LDREX_STREX}</dt>
|
|
||||||
<dd>Indicates that the device's CPU supports LDREX and STREX instructions available since ARMv6.
|
|
||||||
Together, these instructions provide atomic updates on memory with the help of exclusive
|
|
||||||
monitor.</dd>
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
<h4>64-bit ARM CPU family</h4>
|
|
||||||
|
|
||||||
<p>The following flags are available for the 64-bit ARM CPU family:</p>
|
|
||||||
<dl>
|
|
||||||
<dt>{@code ANDROID_CPU_ARM64_FEATURE_FP}</dt>
|
|
||||||
<dd>Indicates that the device's CPU has a Floating Point Unit (FPU). All Android ARM64 devices must
|
|
||||||
support this feature.</dd>
|
|
||||||
<dt>{@code ANDROID_CPU_ARM64_FEATURE_ASIMD}</dt>
|
|
||||||
<dd>Indicates that the device's CPU has an Advanced SIMD (ASIMD) unit. All Android ARM64 devices
|
|
||||||
must support this feature.</dd>
|
|
||||||
<dt>{@code ANDROID_CPU_ARM64_FEATURE_AES}</dt>
|
|
||||||
<dd>Indicates that the device's CPU supports {@code AES} instructions.</dd>
|
|
||||||
<dt>{@code ANDROID_CPU_ARM64_FEATURE_CRC32}</dt>
|
|
||||||
<dd>Indicates that the device's CPU supports {@code CRC32} instructions.</dd>
|
|
||||||
<dt>{@code ANDROID_CPU_ARM64_FEATURE_SHA1}</dt>
|
|
||||||
<dd>Indicates that the device's CPU supports {@code SHA1} instructions.</dd>
|
|
||||||
<dt>{@code ANDROID_CPU_ARM64_FEATURE_SHA2}</dt>
|
|
||||||
<dd>Indicates that the device's CPU supports {@code SHA2} instructions.</dd>
|
|
||||||
<dt>{@code ANDROID_CPU_ARM64_FEATURE_PMULL}</dt>
|
|
||||||
<dd>Indicates that the device's CPU supports 64-bit {@code PMULL} and {@code PMULL2}
|
|
||||||
instructions.</dd>
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
<h4>32-bit x86 CPU family</h4>
|
|
||||||
|
|
||||||
<p>The following flags are available for the 32-bit x86 CPU family.<p>
|
|
||||||
<dl>
|
|
||||||
<dt>{@code ANDROID_CPU_X86_FEATURE_SSSE3}</dt>
|
|
||||||
Indicates that the device's CPU supports the SSSE3 instruction extension set.</dd>
|
|
||||||
|
|
||||||
<dt>{@code ANDROID_CPU_X86_FEATURE_POPCNT}</dt>
|
|
||||||
<dd>Indicates that the device's CPU supports the {@code POPCNT} instruction.</dd>
|
|
||||||
|
|
||||||
<dt>{@code ANDROID_CPU_X86_FEATURE_MOVBE}</dt>
|
|
||||||
<dd>Indicates that the device's CPU supports the {@code MOVBE} instruction. This instruction is
|
|
||||||
specific to some Intel IA-32 CPUs, such as Atom.</dd>
|
|
||||||
<dl>
|
|
||||||
|
|
||||||
<p>{@code android_getCpuFeatures()} returns {@code 0} for CPU families for which there are no
|
|
||||||
listed extensions.</p>
|
|
||||||
|
|
||||||
<p>The following function returns the maximum number of CPU cores on the target device: </p>
|
|
||||||
|
|
||||||
<pre class="no-pretty-print">
|
|
||||||
int android_getCpuCount(void);
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<h4>MIPS CPU family</h4>
|
|
||||||
|
|
||||||
<dl>
|
|
||||||
<dt>{@code ANDROID_CPU_MIPS_FEATURE_R6}</dt>
|
|
||||||
<dd>Indicates that the CPU executes MIPS Release 6 instructions natively, and supports obsoleted R1..R5 instructions only via kernel traps.</dd>
|
|
||||||
|
|
||||||
<dt>{@code ANDROID_CPU_MIPS_FEATURE_MSA}</dt>
|
|
||||||
<dd>Indicates that the CPU supports MIPS SIMD Architecture instructions.</dd>
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
<h2 id="ch">Change History</h2>
|
|
||||||
<p>For the complete change history of this library, see the comments in
|
|
||||||
{@code $NDK/sources/android/cpufeatures/cpu-features.c}, where {@code $NDK} is the root of your
|
|
||||||
NDK installation.</p>
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
page.title=Debugging Your Project
|
|
||||||
@jd:body
|
|
||||||
|
|
||||||
<p>After you've built your app, you'll probably need to debug it. This section introduces you to the
|
|
||||||
NDK's debugging tools.</p>
|
|
||||||
|
|
||||||
<p>It begins by telling you how to use the <a href="{@docRoot}ndk/guides/ndk-gdb.html">
|
|
||||||
{@code ndk-gdb}</a> tool to debug your code. It closes with an explanation of the
|
|
||||||
<a href="{@docRoot}ndk/guides/ndk-stack.html">{@code ndk-stack}</a> tool, which helps you use the
|
|
||||||
<a href="{@docRoot}tools/help/logcat.html">ADB logcat tool</a>
|
|
||||||
as you debug.</p>
|
|
||||||
@@ -1,121 +0,0 @@
|
|||||||
page.title=Vulkan Design Guidelines
|
|
||||||
@jd:body
|
|
||||||
|
|
||||||
<div id="qv-wrapper">
|
|
||||||
<div id="qv">
|
|
||||||
<h2>On this page</h2>
|
|
||||||
|
|
||||||
<ol>
|
|
||||||
<li><a href="#apply">Apply Display Rotation During Rendering</a></li>
|
|
||||||
<li><a href="#minimize">Minimize Render Passes Per Frame</a></li>
|
|
||||||
<li><a href="#choose">Choose Appropriate Memory Types</a></li>
|
|
||||||
<li><a href="#group">Group Descriptor Sets by Frequency</a></li>
|
|
||||||
</ol>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Vulkan is unlike earlier graphics APIs in that drivers do not perform certain
|
|
||||||
optimizations, such as pipeline reuse, for apps. Instead, apps using Vulkan must
|
|
||||||
implement such optimizations themselves. If they do not, they may exhibit worse
|
|
||||||
performance than apps running OpenGL ES.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
When apps implement these optimizations themselves, they have the potential
|
|
||||||
to do so more successfully than the driver can, because they have access to
|
|
||||||
more specific information for a given use case. As a result, skillfully
|
|
||||||
optimizing an app that uses Vulkan can yield better performance than if the
|
|
||||||
app were using OpenGL ES.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
This page introduces several optimizations that your Android app can implement
|
|
||||||
to gain performance boosts from Vulkan.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h2 id="apply">Apply Display Rotation During Rendering</h2>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
When the upward-facing direction of an app doesn’t match the orientation of the device’s
|
|
||||||
display, the compositor rotates the application’s swapchain images so that it
|
|
||||||
does match. It performs this rotation as it displays the images, which results
|
|
||||||
in more power consumption—sometimes significantly more—than if it were not
|
|
||||||
rotating them.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
By contrast, rotating swapchain images while generating them results in
|
|
||||||
little, if any, additional power consumption. The
|
|
||||||
{@code VkSurfaceCapabilitiesKHR::currentTransform} field indicates the rotation
|
|
||||||
that the compositor applies to the window. After an app applies that rotation
|
|
||||||
during rendering, the app uses the {@code VkSwapchainCreateInfoKHR::preTransform}
|
|
||||||
field to report that the rotation is complete.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h2 id="minimize">Minimize Render Passes Per Frame</h2>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
On most mobile GPU architectures, beginning and ending a render pass is an
|
|
||||||
expensive operation. Your app can improve performance by organizing rendering operations into
|
|
||||||
as few render passes as possible.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Different attachment-load and attachment-store ops offer different levels of
|
|
||||||
performance. For example, if you do not need to preserve the contents of an attachment, you
|
|
||||||
can use the much faster {@code VK_ATTACHMENT_LOAD_OP_CLEAR} or
|
|
||||||
{@code VK_ATTACHMENT_LOAD_OP_DONT_CARE} instead of {@code VK_ATTACHMENT_LOAD_OP_LOAD}. Similarly, if
|
|
||||||
you don't need to write the attachment's final values to memory for later use, you can use
|
|
||||||
{@code VK_ATTACHMENT_STORE_OP_DONT_CARE} to attain much better performance than
|
|
||||||
{@code VK_ATTACHMENT_STORE_OP_STORE}.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Also, in most render passes, your app doesn’t need to load or store the
|
|
||||||
depth/stencil attachment. In such cases, you can avoid having to allocate physical memory for
|
|
||||||
the attachment by using the {@code VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT}
|
|
||||||
flag when creating the attachment image. This bit provides the same benefits as does
|
|
||||||
{@code glFramebufferDiscard} in OpenGL ES.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h2 id="choose">Choose Appropriate Memory Types</h2>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
When allocating device memory, apps must choose a memory type. Memory type
|
|
||||||
determines how an app can use the memory, and also describes caching and
|
|
||||||
coherence properties of the memory. Different devices have different memory
|
|
||||||
types available; different memory types exhibit different performance
|
|
||||||
characteristics.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
An app can use a simple algorithm to pick the best memory type for a given
|
|
||||||
use. This algorithm picks the first memory type in the
|
|
||||||
{@code VkPhysicalDeviceMemoryProperties::memoryTypes} array that meets two criteria:
|
|
||||||
The memory type must be allowed for the buffer
|
|
||||||
or image, and must have the minimum properties that the app requires.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Mobile systems generally don’t have separate physical memory heaps for the
|
|
||||||
CPU and GPU. On such systems, {@code VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT} is not as
|
|
||||||
significant as it is on systems that have discrete GPUs with their own, dedicated
|
|
||||||
memory. An app should not assume this property is required.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h2 id="group">Group Descriptor Sets by Frequency</h2>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
If you have resource bindings that change at different frequencies, use
|
|
||||||
multiple descriptor sets per pipeline rather than rebinding all resources for
|
|
||||||
each draw. For example, you can have one set of descriptors for per-scene
|
|
||||||
bindings, another set for per-material bindings, and a third set for
|
|
||||||
per-mesh-instance bindings.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Use immediate constants for the highest-frequency changes, such as changes
|
|
||||||
executed with each draw call.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
@@ -1,201 +0,0 @@
|
|||||||
page.title=Vulkan Setup
|
|
||||||
@jd:body
|
|
||||||
|
|
||||||
|
|
||||||
<div id="qv-wrapper">
|
|
||||||
<div id="qv">
|
|
||||||
<h2>On this page</h2>
|
|
||||||
|
|
||||||
<ol>
|
|
||||||
<li><a href="#downloading">Downloading</a></li>
|
|
||||||
<li><a href="#testing">Testing Installation</a></li>
|
|
||||||
<li><a href="#compiling">Compiling Your Project</a></li>
|
|
||||||
<li><a href="#running">Running Your Project</a></li>
|
|
||||||
<li><a href="#using">Using the Dynamic Loader</a></li>
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
This document explains how to get started with the Vulkan graphics library by downloading,
|
|
||||||
compiling, and running several sample apps.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Before beginning, make sure you have the right hardware and platform version prepared. You should
|
|
||||||
be using one of the following devices, running at least Android N, Developer Preview 2:
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li>Nexus 6P.</li>
|
|
||||||
<li>Nexus 5X.</li>
|
|
||||||
<li>Nexus Player.</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
You can confirm your Android version by going to the <strong>Settings</strong> menu, and
|
|
||||||
selecting <strong>About <device></strong> > <strong>Android Version</strong>.
|
|
||||||
Once you’ve confirmed that you have the right hardware and platform version set up, you can
|
|
||||||
download the necessary software.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h2 id="downloading">Downloading</h2>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Before getting started, you must download several tools and other software.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<ol style="1">
|
|
||||||
<li>If you don’t already have Android Studio,
|
|
||||||
<a href="{@docRoot}studio/index.html">download it.</a></li>
|
|
||||||
|
|
||||||
<li><a href="https://github.com/android-ndk/ndk/wiki">Download</a> NDK r12-beta.</li>
|
|
||||||
|
|
||||||
<li><a href="{@docRoot}preview/setup-sdk.html">Download and install
|
|
||||||
the Android N-Preview SDK.</a></li>
|
|
||||||
|
|
||||||
<li>(Optional) Build shaderc in NDK r12-beta by navigating to
|
|
||||||
{@code <ndk-root>/sources/third_party/shaderc/},
|
|
||||||
and running the following command:
|
|
||||||
|
|
||||||
<pre class="no-pretty-print">
|
|
||||||
../../../ndk-build NDK_PROJECT_PATH=. APP_BUILD_SCRIPT=Android.mk \
|
|
||||||
APP_STL:=c++_shared APP_ABI=all libshaderc_combined
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
You can specify {@code APP_STL} as {@code gnustl_static},
|
|
||||||
{@code gnustl_shared}, {@code c++_static},
|
|
||||||
or {@code c++_shared}.</li>
|
|
||||||
|
|
||||||
<li>Open a terminal window, and use git to clone the Android Vulkan samples from the
|
|
||||||
repository in which they reside.
|
|
||||||
|
|
||||||
<pre class="no-pretty-print">
|
|
||||||
$ git clone https://github.com/googlesamples/vulkan-basic-samples.git
|
|
||||||
</pre>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li>
|
|
||||||
Navigate to the {@code LunarGSamples/} directory, which is in the local repository
|
|
||||||
that you checked out in the previous step.
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li>Update the gslang source by entering the following command:
|
|
||||||
|
|
||||||
<pre class="no-pretty-print">
|
|
||||||
$ ./update_external_sources.sh -s -g
|
|
||||||
</pre>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
<h2 id="testing">Testing Installation</h2>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
To confirm that Vulkan is set up properly, you can test it with
|
|
||||||
the set of Vulkan API samples provided partly for that purpose. Follow these steps to
|
|
||||||
build and execute these samples:
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<ol style="1">
|
|
||||||
|
|
||||||
|
|
||||||
<li>(Optional) Build the source by entering the following commands:
|
|
||||||
|
|
||||||
<pre class="no-pretty-print">
|
|
||||||
$ cd API-samples
|
|
||||||
$ cmake -DANDROID=ON -DANDROID_ABI=[armeabi-v7a|arm64-v8a| x86|x86_64|all(default)]
|
|
||||||
</pre>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li>
|
|
||||||
Import the samples into Android Studio. To do so, choose <strong>File</strong> >
|
|
||||||
<strong>Import
|
|
||||||
project (Eclipse, ADT, Gradle)</strong> and
|
|
||||||
select the {@code LunarGSamples/API-Samples/android} directory.
|
|
||||||
|
|
||||||
<p>You may see an error about missing components or missing SDK version.
|
|
||||||
Ignore this error message, and follow the installation prompts.</p>
|
|
||||||
|
|
||||||
<p>After several minutes, the <em>Project</em> pane should
|
|
||||||
resemble the window shown in Figure 1.</p>
|
|
||||||
|
|
||||||
<img src="../images/project-pane.png"
|
|
||||||
alt="Project pane after importing samples into Android Studio" id="figure1" />
|
|
||||||
|
|
||||||
<p class="img-caption">
|
|
||||||
<strong>Figure 1.</strong> Project pane displaying samples after they've been imported.
|
|
||||||
|
|
||||||
</li>
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
<h2 id="compiling">Compiling Your Project</h2>
|
|
||||||
|
|
||||||
<p>To compile your project, follow these steps:</p>
|
|
||||||
|
|
||||||
<ol style="1">
|
|
||||||
<li>Select your project in the Android Studio <em>Project</em> panel.</li>
|
|
||||||
<li>From the <strong>Build</strong> menu, choose <strong>Make Module <module-name> </strong>; or select <strong> Build APK </strong> to generate APK.</li>
|
|
||||||
<li>Resolve any dependency issues, and then compile. As Figure 2 shows, you can select individual projects to compile by choosing them from the configuration pulldown.</li>
|
|
||||||
|
|
||||||
<img src="../images/config-pulldown.png"
|
|
||||||
alt="Selecting the "drawcube" project from the config pulldown id="figure2" />
|
|
||||||
|
|
||||||
<p class="img-caption">
|
|
||||||
<strong>Figure 2.</strong> Selecting an individual project to compile.
|
|
||||||
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
<p class="note"><strong>Note: </strong>
|
|
||||||
<a href="https://github.com/googlesamples/android-vulkan-tutorials">Additional
|
|
||||||
tutorial samples</a> illustrate the use of shaders compiled with off-line
|
|
||||||
compilation integrated into Android Studio. For simplicity, each tutorial
|
|
||||||
is self-contained, and builds according to standard Android Studio
|
|
||||||
<a href="{@docRoot}tools/studio/index.html">build procedures.</a>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h2 id="running">Running Your Project</h2>
|
|
||||||
|
|
||||||
<p>To run your project, choose an APK to run by choosing <strong>Run</strong> > <strong>Run <project-name></strong>.</p>
|
|
||||||
|
|
||||||
<p>To debug an APK, choose <strong>Run</strong> >
|
|
||||||
<strong>Debug <project-name></strong>. For each project,
|
|
||||||
there’s a Java version and a native (C or C++) version. Run the
|
|
||||||
native version of the app. For example, for drawcube,
|
|
||||||
run drawcube-native.</p>
|
|
||||||
|
|
||||||
<p>Most of the samples have simple functionality, and most stop
|
|
||||||
automatically after running. The drawcube example is one of
|
|
||||||
the more visually interesting examples. When you run it, it
|
|
||||||
should display the image in Figure 3</p>.
|
|
||||||
|
|
||||||
<img src="../images/drawcube-output.png"
|
|
||||||
alt="Successfully running shows a multicolored cube" id="figure3" />
|
|
||||||
|
|
||||||
<p class="img-caption">
|
|
||||||
<strong>Figure 3.</strong> The successfully compiled program runs and produces a display.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h2 id="using">Using the Dynamic Loader</h2>
|
|
||||||
<p>
|
|
||||||
The samples use a dynamic loader helper function defined in {@code vulkan_wrapper.h/cpp} to
|
|
||||||
retrieve Vulkan API pointers using {@code dlopen()} and {@code dlsym()}. It does this rather
|
|
||||||
than statically linking them with {@code vulkan.so}.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Using this loader allows the code to link against API level 23 and earlier versions of the platform, which don’t include the {@code vulkan.so} shared library, but can run on devices that support Vulkan API.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
The following snippet shows how to use the dynamic loader.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
#include "vulkan_wrapper.h" // Include Vulkan_wrapper and dynamically load symbols.
|
|
||||||
...
|
|
||||||
// Before any Vulkan API usage,
|
|
||||||
InitVulkan();
|
|
||||||
</pre>
|
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
page.title=Vulkan Graphics API
|
|
||||||
@jd:body
|
|
||||||
|
|
||||||
|
|
||||||
<p>The Android platform includes an Android-specific implementation of the
|
|
||||||
<a class="external-link" href="https://www.khronos.org/vulkan/">Vulkan</a> API
|
|
||||||
specification from the Khronos Group. Vulkan is a
|
|
||||||
low-overhead, cross-platform API for high-performance, 3D graphics. It provides tools
|
|
||||||
for creating high-quality, real-time graphics in
|
|
||||||
applications. Vulkan also provides advantages such as reducing
|
|
||||||
CPU overhead and providing support for the
|
|
||||||
<a class="external-link" href="https://www.khronos.org/spir">SPIR-V Binary
|
|
||||||
Intermediate language</a>.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
This section begins with information on how to
|
|
||||||
<a href="{@docRoot}ndk/guides/graphics/getting-started.html">get started</a> using Vulkan in your
|
|
||||||
Android app. Next, it provides useful information that you should know about
|
|
||||||
<a href="{@docRoot}ndk/guides/graphics/design-notes.html">Vulkan design guidelines</a>
|
|
||||||
on the Android platform. From there, it explains how
|
|
||||||
to use Vulkan's <a href="{@docRoot}ndk/guides/graphics/shader-compilers.html">shader compilers</a>.
|
|
||||||
Last, it teaches you how to use
|
|
||||||
<a href="{@docRoot}ndk/guides/graphics/validation-layer.html">validation layers</a>
|
|
||||||
to help assure stability in apps using Vulkan.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
For more general information about this cross-platform API specification, see
|
|
||||||
Khronos's
|
|
||||||
<a class="external-link" href="http://khr.io/vulkanlaunchoverview">
|
|
||||||
Vulkan Overview</a>.
|
|
||||||
You can also keep up with the latest Vulkan-related developments at the
|
|
||||||
Vulkan
|
|
||||||
<a class="external-link" href="https://www.khronos.org/#slider_vulkan">news page</a>.
|
|
||||||
</p>
|
|
||||||
@@ -1,194 +0,0 @@
|
|||||||
page.title=Vulkan Shader Compilers on Android
|
|
||||||
@jd:body
|
|
||||||
|
|
||||||
<div id="qv-wrapper">
|
|
||||||
<div id="qv">
|
|
||||||
<h2>On this page</h2>
|
|
||||||
|
|
||||||
<ol>
|
|
||||||
<li><a href="#aot">AOT Compilation</a></li>
|
|
||||||
<li><a href="#runtime">Runtime Compilation</a></li>
|
|
||||||
<li><a href="#integrating">Integrating Into your Project</a></li>
|
|
||||||
</ol>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
A Vulkan app must manage shaders differently from the way an OpenGL ES app does so:
|
|
||||||
In OpenGL ES, you provide a shader as a set of strings forming the source text of a
|
|
||||||
GLSL shader program. By contrast, the Vulkan API requires you to provide a shader in
|
|
||||||
the form of an entry point in a <a href=”https://www.khronos.org/spir”>SPIR-V</a> module.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
The NDK includes a runtime library for compiling GLSL into SPIR-V.
|
|
||||||
The runtime library is the same as the one in the
|
|
||||||
<a href="https://github.com/google/shaderc">Shaderc</a> open source project, and use the same
|
|
||||||
<a href="https://github.com/KhronosGroup/glslang">Glslang GLSL</a> reference compiler as a
|
|
||||||
back end. By default, the Shaderc version of the
|
|
||||||
compiler assumes you are compiling for Vulkan. After checking whether your code is valid for
|
|
||||||
Vulkan, the compiler automatically enables the {@code KHR_vulkan_glsl} extension. The Shaderc
|
|
||||||
version of the compiler also generates Vulkan-compliant SPIR-V code.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
You can choose to compile SPIR-V modules into your Vulkan app during development, a
|
|
||||||
practice called <em>ahead-of-time</em>, or <em>AOT</em>, compiling. Alternatively,
|
|
||||||
you can have your app compile them from shipped or procedurally generated shader
|
|
||||||
source when needed during runtime. This practice is called <em>runtime compiling</em>.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
The rest of this page provides more detail about each practice, and then explains
|
|
||||||
how to integrate shader compilation into your Vulkan app.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h2 id=”aot”>AOT Compilation</h2>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
For AOT compilation, we recommend the <em>glslc</em> command-line compiler from GLSL to SPIR-V.
|
|
||||||
This compiler is available from the <a href="https://github.com/google/shaderc">Shaderc</a>
|
|
||||||
project.</a>Many of its command-line options are similar to those of GCC and Clang, allowing
|
|
||||||
you to integrate glslc into build systems easily.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
The glslc tool compiles a single-source file to a SPIR-V module with a single shader
|
|
||||||
entry point. By default, the output file has the same name as that of the source file,
|
|
||||||
but with the {@code .spv} extension appended.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
You use filename extensions to tell the glslc tool which graphics shader stage to compile,
|
|
||||||
or whether a compute shader is being compiled. For information on how to use these filename
|
|
||||||
extensions, and options you can use with the tool, see
|
|
||||||
<a href="https://github.com/google/shaderc/tree/master/glslc#user-content-shader-stage-specification">
|
|
||||||
Shader stage specification</a> in the
|
|
||||||
<a href="https://github.com/google/shaderc/tree/master/glslc">
|
|
||||||
glslc</a> manual.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h2 id="runtime">Runtime Compilation</h2>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
For JIT compilation of shaders during runtime, the NDK provides the libshaderc library,
|
|
||||||
which has both C and C++ APIs.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
C++ applications should use the C++ API. We recommend that apps in other languages
|
|
||||||
use the C API, because the C ABI is lower level, and likely to provide better stability.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
The following example shows how to use the C++ API:
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
#include <iostream>
|
|
||||||
#include <string>
|
|
||||||
#include <vector>
|
|
||||||
#include <shaderc/shaderc.hpp>
|
|
||||||
|
|
||||||
std::vector<uint32_t> compile_file(const std::string& name,
|
|
||||||
shaderc_shader_kind kind,
|
|
||||||
const std::string& data) {
|
|
||||||
shaderc::Compiler compiler;
|
|
||||||
shaderc::CompileOptions options;
|
|
||||||
|
|
||||||
// Like -DMY_DEFINE=1
|
|
||||||
options.AddMacroDefinition("MY_DEFINE", "1");
|
|
||||||
|
|
||||||
shaderc::SpvCompilationResult module = compiler.CompileGlslToSpv(
|
|
||||||
data.c_str(), data.size(), kind, name.c_str(), options);
|
|
||||||
|
|
||||||
if (module.GetCompilationStatus() !=
|
|
||||||
shaderc_compilation_status_success) {
|
|
||||||
std::cerr << module.GetErrorMessage();
|
|
||||||
}
|
|
||||||
|
|
||||||
std::vector<uint32_t> result(module.cbegin(), module.cend());
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h2 id=”integrating”>Integrating into Your Projects</h2>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
You can integrate the Vulkan shader compiler into your app using either the project's
|
|
||||||
{@code Android.mk} file or Gradle.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h3 id=”androidmk”>Android.mk</h3>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Perform the following steps to use your project's {@code Android.mk}
|
|
||||||
file to integrate the shader compiler.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<ol>
|
|
||||||
<li>
|
|
||||||
Include the following lines in your Android.mk file:
|
|
||||||
<pre class="no-pretty-print">
|
|
||||||
include $(CLEAR_VARS)
|
|
||||||
...
|
|
||||||
LOCAL_STATIC_LIBRARIES := shaderc
|
|
||||||
...
|
|
||||||
include $(BUILD_SHARED_LIBRARY)
|
|
||||||
|
|
||||||
$(call import-module, third_party/shaderc)
|
|
||||||
</pre>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li>
|
|
||||||
Set APP_STL to one of {@code c++_static}, {@code c++_shared}, {@code gnustl_static},
|
|
||||||
or {@code gnustl_shared}.
|
|
||||||
</li>
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h3 id=”gradle”>Gradle</h3>
|
|
||||||
|
|
||||||
<ol>
|
|
||||||
<li>
|
|
||||||
In a terminal window, navigate to
|
|
||||||
{@code <ndk_root>/sources/third_party/shaderc/}.
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li>
|
|
||||||
Run the following command:
|
|
||||||
|
|
||||||
<pre class="no-pretty-print">
|
|
||||||
$ ../../../ndk-build NDK_PROJECT_PATH=. APP_BUILD_SCRIPT=Android.mk \
|
|
||||||
APP_STL:=<stl_version> APP_ABI=all libshaderc_combined
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
This command places two folders in <ndk_root>/sources/third_party/shaderc/. The directory
|
|
||||||
structure is as follows:
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<pre class="no-pretty-print">
|
|
||||||
include/
|
|
||||||
shaderc/
|
|
||||||
shaderc.h
|
|
||||||
shaderc.hpp
|
|
||||||
libs/
|
|
||||||
<stl_version>/
|
|
||||||
{all of the abis}
|
|
||||||
libshaderc.a
|
|
||||||
</pre>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li>
|
|
||||||
Add includes and link lines as you normally would for external libraries.
|
|
||||||
</li>
|
|
||||||
<p>
|
|
||||||
The STL that you use to build your program must match the {@code stl} specified in
|
|
||||||
{@code stl_version}.
|
|
||||||
Only {@code c++_static}, {@code c++_shared}, {@code gnustl_static}, and
|
|
||||||
{@code gnustl_shared} are supported.
|
|
||||||
</p>
|
|
||||||
@@ -1,433 +0,0 @@
|
|||||||
page.title=Vulkan Validation Layers on Android
|
|
||||||
@jd:body
|
|
||||||
|
|
||||||
<div id="qv-wrapper">
|
|
||||||
<div id="qv">
|
|
||||||
<h2>On this page</h2>
|
|
||||||
|
|
||||||
<ol>
|
|
||||||
<li><a href="#ilp">Add Validation Layers to Project</a></li>
|
|
||||||
<li><a href="#gls">Getting Layer Source</a></li>
|
|
||||||
<li><a href="#verifying">Verifying Layer Build</a></li>
|
|
||||||
<li><a href="#enabling">Enabling Layers</a></li>
|
|
||||||
<li><a href="#debug">Enabling the Debug Callback</a></li>
|
|
||||||
</ol>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Most explicit graphics APIs do not perform error-checking, because doing so can result in a
|
|
||||||
performance penalty. Vulkan provides error-checking in a manner that lets you use this feature at
|
|
||||||
development time, but exclude it from the release build of your app, thus avoiding the penalty when
|
|
||||||
it matters most. You do this by enabling <em>validation layers</em>. Validation layers intercept
|
|
||||||
or hook Vulkan entry points for various debug and validation purposes.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Each validation layer can contain definitions for one or more of these entry points, and
|
|
||||||
intercepts the entry points for which it contains definitions. When a validation
|
|
||||||
layer does not define an entry point, the system passes the entry point on to the next
|
|
||||||
layer. Ultimately, an entry point not defined in any layer reaches the driver, the
|
|
||||||
base level, unvalidated.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
The Android SDK, NDK, and Vulkan samples include Vulkan validation layers for
|
|
||||||
use during development. You can hook these validation layers into the graphics stack, allowing
|
|
||||||
them to report validation issues. This instrumentation allows you to catch and fix misuses
|
|
||||||
during development.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
This page explains how to:
|
|
||||||
<ul>
|
|
||||||
<li>Integrate NDK's Layer Binaries.</li>
|
|
||||||
<li>Get source code for validation layers.</li>
|
|
||||||
<li>Verifying Layer Build.</li>
|
|
||||||
<li>Enabling Layers in Vulkan Application.</li>
|
|
||||||
|
|
||||||
</ul>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h2 id="ilp">Add Validation Layers to Project</h2>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
NDK release 12 and higher includes pre-built validation layer binaries. At
|
|
||||||
instance and device creation time, when requested by your application, the
|
|
||||||
Vulkan loader finds them in the APK installed location and loads them.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
To use the pre-built validation layer binaries, either modify the gradle build
|
|
||||||
configuration of your project or manually add the binaries into the JNI
|
|
||||||
libraries directory of your project.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
|
|
||||||
<h3 id="vl-gradle">Adding validation layers with Gradle</h3>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
You can add the validation layer your project using either Andorid Studio's
|
|
||||||
support for CMake and Ndk-build, or using Studio's experimental plugin for
|
|
||||||
Gradle. In general, you should use the CMake and Ndk-build configuration.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p>
|
|
||||||
To add the libraries using Android Studio's support for CMake/Ndk-build,
|
|
||||||
add the following to your project's gradle configuration:
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<pre class="no-pretty-print">
|
|
||||||
sourceSets {
|
|
||||||
main {
|
|
||||||
jniLibs {
|
|
||||||
srcDir "${your-ndk-dir}/sources/third_party/vulkan/src/build-android/jniLibs"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}</pre>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
To add the libraries using Android Studio's experimental plugin for Gradle,
|
|
||||||
add the following to your project's gradle configuration:
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<pre class="no-pretty-print">
|
|
||||||
sources {
|
|
||||||
main {
|
|
||||||
jniLibs {
|
|
||||||
source.srcDir "${your-ndk-dir}/sources/third_party/vulkan/src/build-android/jniLibs"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}</pre>
|
|
||||||
|
|
||||||
|
|
||||||
<h3 id="vl-jni-lib">Adding validation layers to JNI libraries</h3>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
If configuring your project's gradle build file is not working, you can
|
|
||||||
manually add the validation layer binaries to your project's JNI libraries
|
|
||||||
directory by using the following command line options:
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<pre class="no-pretty-print">
|
|
||||||
$ cd ${your-app-project-root}
|
|
||||||
$ mkdir -p app/src/main
|
|
||||||
$ cp -fr ${your-ndk-dir}/sources/third_party/vulkan/src/build-android/jniLibs app/src/main/
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
|
|
||||||
<h2 id="gls">Getting Layer Source</h2>
|
|
||||||
<p>
|
|
||||||
If your app needs the latest validation layer, you can pull the latest source from the Khronos Group
|
|
||||||
<a class="external-link" href="https://github.com/KhronosGroup/Vulkan-LoaderAndValidationLayers">
|
|
||||||
GitHub repository</a> and follow the build instructions there.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h2 id="verifying">Verifying Layer Build</h2>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Regardless of whether you build with NDK's prebuilt layers or you build from the latest source code,
|
|
||||||
the build process produces final file structure like the following:
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<pre class="no-pretty-print">
|
|
||||||
src/main/jniLibs/
|
|
||||||
arm64-v8a/
|
|
||||||
libVkLayer_core_validation.so
|
|
||||||
libVkLayer_device_limits.so
|
|
||||||
libVkLayer_image.so
|
|
||||||
libVkLayer_object_tracker.so
|
|
||||||
libVkLayer_parameter_validation.so
|
|
||||||
libVkLayer_swapchain.so
|
|
||||||
libVkLayer_threading.so
|
|
||||||
libVkLayer_unique_objects.so
|
|
||||||
armeabi-v7a/
|
|
||||||
libVkLayer_core_validation.so
|
|
||||||
...
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
The following example shows how to verify that your APK contains the validation layers
|
|
||||||
as expected:
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<pre class="no-pretty-print">
|
|
||||||
$ jar -xvf project.apk
|
|
||||||
...
|
|
||||||
inflated: lib/arm64-v8a/libVkLayer_threading.so
|
|
||||||
inflated: lib/arm64-v8a/libVkLayer_object_tracker.so
|
|
||||||
inflated: lib/arm64-v8a/libVkLayer_swapchain.so
|
|
||||||
inflated: lib/arm64-v8a/libVkLayer_unique_objects.so
|
|
||||||
inflated: lib/arm64-v8a/libVkLayer_parameter_validation.so
|
|
||||||
inflated: lib/arm64-v8a/libVkLayer_image.so
|
|
||||||
inflated: lib/arm64-v8a/libVkLayer_core_validation.so
|
|
||||||
inflated: lib/arm64-v8a/libVkLayer_device_limits.so
|
|
||||||
...
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
|
|
||||||
<h2 id="enabling">Enabling Layers</h2>
|
|
||||||
|
|
||||||
<p>The Vulkan API allows an app to enable both instance layers and device layers.</p>
|
|
||||||
|
|
||||||
<h3>Instance layers</h3>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
A layer that can intercept Vulkan instance-level entry points is called an instance layer.
|
|
||||||
Instance-level entry points are those with {@code VkInstance} or {@code VkPhysicalDevice}
|
|
||||||
as the first parameter.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
You can call {@code vkEnumerateInstanceLayerProperties()} to list the available instance layers
|
|
||||||
and their properties. The system enables instance layers when {@code vkCreateInstace()} executes.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
The following code snippet shows how an app can use the Vulkan API to programmatically enable and
|
|
||||||
query an instance layer:
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
// Get instance layer count using null pointer as last parameter
|
|
||||||
uint32_t instance_layer_present_count = 0;
|
|
||||||
vkEnumerateInstanceLayerProperties(&instance_layer_present_count, nullptr);
|
|
||||||
|
|
||||||
// Enumerate instance layers with valid pointer in last parameter
|
|
||||||
VkLayerProperties* layer_props =
|
|
||||||
(VkLayerProperties*)malloc(instance_layer_present_count * sizeof(VkLayerProperties));
|
|
||||||
vkEnumerateInstanceLayerProperties(&instance_layer_present_count, layer_props));
|
|
||||||
|
|
||||||
// Make sure the desired instance validation layers are available
|
|
||||||
// NOTE: These are not listed in an arbitrary order. Threading must be
|
|
||||||
// first, and unique_objects must be last. This is the order they
|
|
||||||
// will be inserted by the loader.
|
|
||||||
const char *instance_layers[] = {
|
|
||||||
"VK_LAYER_GOOGLE_threading",
|
|
||||||
"VK_LAYER_LUNARG_parameter_validation",
|
|
||||||
"VK_LAYER_LUNARG_object_tracker",
|
|
||||||
"VK_LAYER_LUNARG_core_validation",
|
|
||||||
"VK_LAYER_LUNARG_device_limits",
|
|
||||||
"VK_LAYER_LUNARG_image",
|
|
||||||
"VK_LAYER_LUNARG_swapchain",
|
|
||||||
"VK_LAYER_GOOGLE_unique_objects"
|
|
||||||
};
|
|
||||||
|
|
||||||
uint32_t instance_layer_request_count =
|
|
||||||
sizeof(instance_layers) / sizeof(instance_layers[0]);
|
|
||||||
for (uint32_t i = 0; i < instance_layer_request_count; i++) {
|
|
||||||
bool found = false;
|
|
||||||
for (uint32_t j = 0; j < instance_layer_present_count; j++) {
|
|
||||||
if (strcmp(instance_layers[i], layer_props[j].layerName) == 0) {
|
|
||||||
found = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!found) {
|
|
||||||
error();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Pass desired instance layers into vkCreateInstance
|
|
||||||
VkInstanceCreateInfo instance_info = {};
|
|
||||||
instance_info.sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO;
|
|
||||||
instance_info.enabledLayerCount = instance_layer_request_count;
|
|
||||||
instance_info.ppEnabledLayerNames = instance_layers;
|
|
||||||
...
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<h3>Device layers</h3>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
A layer that can intercept device-level entry points is called a device layer. Device-level entry
|
|
||||||
points are those whose first parameter is {@code VkDevice}, {@code VkCommandBuffer},
|
|
||||||
or {@code VkQueue}. The list of
|
|
||||||
device layers to enable is included in the {@code ppEnabledLayerNames} field of the
|
|
||||||
{@code VkDeviceCreateInfo}
|
|
||||||
struct that the app passes into {@code vkCreateDevice()}.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
You can call {@code vkEnumerateDeviceLayerProperties} to list the available layers
|
|
||||||
and their properties. The system enables device layers when it calls {@code vkCreateDevice()}.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
The following code snippet shows how an app can use the Vulkan API to programmatically enable a
|
|
||||||
device layer.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
|
|
||||||
// Get device layer count using null as last parameter
|
|
||||||
uint32_t device_layer_present_count = 0;
|
|
||||||
vkEnumerateDeviceLayerProperties(&device_layer_present_count, nullptr);
|
|
||||||
|
|
||||||
// Enumerate device layers with valid pointer in last parameter
|
|
||||||
VkLayerProperties* layer_props =
|
|
||||||
(VkLayerProperties *)malloc(device_layer_present_count * sizeof(VkLayerProperties));
|
|
||||||
vkEnumerateDeviceLayerProperties(physical_device, device_layer_present_count, layer_props));
|
|
||||||
|
|
||||||
// Make sure the desired device validation layers are available
|
|
||||||
// Ensure threading is first and unique_objects is last!
|
|
||||||
const char *device_layers[] = {
|
|
||||||
"VK_LAYER_GOOGLE_threading",
|
|
||||||
"VK_LAYER_LUNARG_parameter_validation",
|
|
||||||
"VK_LAYER_LUNARG_object_tracker",
|
|
||||||
"VK_LAYER_LUNARG_core_validation",
|
|
||||||
"VK_LAYER_LUNARG_device_limits",
|
|
||||||
"VK_LAYER_LUNARG_image",
|
|
||||||
"VK_LAYER_LUNARG_swapchain",
|
|
||||||
"VK_LAYER_GOOGLE_unique_objects"
|
|
||||||
};
|
|
||||||
|
|
||||||
uint32_t device_layer_request_count =
|
|
||||||
sizeof(device_layers) / sizeof(device_layers[0]);
|
|
||||||
for (uint32_t i = 0; i < device_layer_request_count; i++) {
|
|
||||||
bool found = false;
|
|
||||||
for (uint32_t j = 0; j < device_layer_present_count; j++) {
|
|
||||||
if (strcmp(device_layers[i],
|
|
||||||
layer_props[j].layerName) == 0) {
|
|
||||||
found = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!found) {
|
|
||||||
error();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Pass desired device layers into vkCreateDevice
|
|
||||||
VkDeviceCreateInfo device_info = {};
|
|
||||||
device_info.sType = VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO;
|
|
||||||
device_info.enabledLayerCount = device_layer_request_count;
|
|
||||||
device_info.ppEnabledLayerNames = device_layers;
|
|
||||||
...
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<h2 id="debug">Enabling the Debug Callback</h2>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
The Debug Report extension {@code VK_EXT_debug_report} allows your application to control
|
|
||||||
layer behavior when an event occurs.</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Before using this extension, you must first make sure that the platform supports it.
|
|
||||||
The following example shows how to check for debug extension support and
|
|
||||||
register a callback if the extension is supported.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
// Get the instance extension count
|
|
||||||
uint32_t inst_ext_count = 0;
|
|
||||||
vkEnumerateInstanceExtensionProperties(nullptr, &inst_ext_count, nullptr);
|
|
||||||
|
|
||||||
// Enumerate the instance extensions
|
|
||||||
VkExtensionProperties* inst_exts =
|
|
||||||
(VkExtensionProperties *)malloc(inst_ext_count * sizeof(VkExtensionProperties));
|
|
||||||
vkEnumerateInstanceExtensionProperties(nullptr, &inst_ext_count, inst_exts);
|
|
||||||
|
|
||||||
const char * enabled_inst_exts[16] = {};
|
|
||||||
uint32_t enabled_inst_ext_count = 0;
|
|
||||||
|
|
||||||
// Make sure the debug report extension is available
|
|
||||||
for (uint32_t i = 0; i < inst_ext_count; i++) {
|
|
||||||
if (strcmp(inst_exts[i].extensionName,
|
|
||||||
VK_EXT_DEBUG_REPORT_EXTENSION_NAME) == 0) {
|
|
||||||
enabled_inst_exts[enabled_inst_ext_count++] =
|
|
||||||
VK_EXT_DEBUG_REPORT_EXTENSION_NAME;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (enabled_inst_ext_count == 0)
|
|
||||||
return;
|
|
||||||
|
|
||||||
// Pass the instance extensions into vkCreateInstance
|
|
||||||
VkInstanceCreateInfo instance_info = {};
|
|
||||||
instance_info.sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO;
|
|
||||||
instance_info.enabledExtensionCount = enabled_inst_ext_count;
|
|
||||||
instance_info.ppEnabledExtensionNames = enabled_inst_exts;
|
|
||||||
|
|
||||||
PFN_vkCreateDebugReportCallbackEXT vkCreateDebugReportCallbackEXT;
|
|
||||||
PFN_vkDestroyDebugReportCallbackEXT vkDestroyDebugReportCallbackEXT;
|
|
||||||
|
|
||||||
vkCreateDebugReportCallbackEXT = (PFN_vkCreateDebugReportCallbackEXT)
|
|
||||||
vkGetInstanceProcAddr(instance, "vkCreateDebugReportCallbackEXT");
|
|
||||||
vkDestroyDebugReportCallbackEXT = (PFN_vkDestroyDebugReportCallbackEXT)
|
|
||||||
vkGetInstanceProcAddr(instance, "vkDestroyDebugReportCallbackEXT");
|
|
||||||
|
|
||||||
assert(vkCreateDebugReportCallbackEXT);
|
|
||||||
assert(vkDestroyDebugReportCallbackEXT);
|
|
||||||
|
|
||||||
// Create the debug callback with desired settings
|
|
||||||
VkDebugReportCallbackEXT debugReportCallback;
|
|
||||||
if (vkCreateDebugReportCallbackEXT) {
|
|
||||||
VkDebugReportCallbackCreateInfoEXT debugReportCallbackCreateInfo;
|
|
||||||
debugReportCallbackCreateInfo.sType =
|
|
||||||
VK_STRUCTURE_TYPE_DEBUG_REPORT_CREATE_INFO_EXT;
|
|
||||||
debugReportCallbackCreateInfo.pNext = NULL;
|
|
||||||
debugReportCallbackCreateInfo.flags = VK_DEBUG_REPORT_ERROR_BIT_EXT |
|
|
||||||
VK_DEBUG_REPORT_WARNING_BIT_EXT |
|
|
||||||
VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT;
|
|
||||||
debugReportCallbackCreateInfo.pfnCallback = DebugReportCallback;
|
|
||||||
debugReportCallbackCreateInfo.pUserData = NULL;
|
|
||||||
|
|
||||||
vkCreateDebugReportCallbackEXT(instance, &debugReportCallbackCreateInfo,
|
|
||||||
nullptr, &debugReportCallback);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Later, when shutting down Vulkan, call the following
|
|
||||||
if (vkDestroyDebugReportCallbackEXT) {
|
|
||||||
vkDestroyDebugReportCallbackEXT(instance, debugReportCallback, nullptr);
|
|
||||||
}
|
|
||||||
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Once your app has registered and enabled the debug callback, the system routes debugging
|
|
||||||
messages to a callback that you register. An example of such a callback appears below:
|
|
||||||
</p>
|
|
||||||
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
#include <android/log.h>
|
|
||||||
|
|
||||||
static VKAPI_ATTR VkBool32 VKAPI_CALL DebugReportCallback(
|
|
||||||
VkDebugReportFlagsEXT msgFlags,
|
|
||||||
VkDebugReportObjectTypeEXT objType,
|
|
||||||
uint64_t srcObject, size_t location,
|
|
||||||
int32_t msgCode, const char * pLayerPrefix,
|
|
||||||
const char * pMsg, void * pUserData )
|
|
||||||
{
|
|
||||||
if (msgFlags & VK_DEBUG_REPORT_ERROR_BIT_EXT) {
|
|
||||||
__android_log_print(ANDROID_LOG_ERROR,
|
|
||||||
"AppName",
|
|
||||||
"ERROR: [%s] Code %i : %s",
|
|
||||||
pLayerPrefix, msgCode, pMsg);
|
|
||||||
} else if (msgFlags & VK_DEBUG_REPORT_WARNING_BIT_EXT) {
|
|
||||||
__android_log_print(ANDROID_LOG_WARN,
|
|
||||||
"AppName",
|
|
||||||
"WARNING: [%s] Code %i : %s",
|
|
||||||
pLayerPrefix, msgCode, pMsg);
|
|
||||||
} else if (msgFlags & VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT) {
|
|
||||||
__android_log_print(ANDROID_LOG_WARN,
|
|
||||||
"AppName",
|
|
||||||
"PERFORMANCE WARNING: [%s] Code %i : %s",
|
|
||||||
pLayerPrefix, msgCode, pMsg);
|
|
||||||
} else if (msgFlags & VK_DEBUG_REPORT_INFORMATION_BIT_EXT) {
|
|
||||||
__android_log_print(ANDROID_LOG_INFO,
|
|
||||||
"AppName", "INFO: [%s] Code %i : %s",
|
|
||||||
pLayerPrefix, msgCode, pMsg);
|
|
||||||
} else if (msgFlags & VK_DEBUG_REPORT_DEBUG_BIT_EXT) {
|
|
||||||
__android_log_print(ANDROID_LOG_VERBOSE,
|
|
||||||
"AppName", "DEBUG: [%s] Code %i : %s",
|
|
||||||
pLayerPrefix, msgCode, pMsg);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Returning false tells the layer not to stop when the event occurs, so
|
|
||||||
// they see the same behavior with and without validation layers enabled.
|
|
||||||
return VK_FALSE;
|
|
||||||
}
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,113 +0,0 @@
|
|||||||
<?cs # Table of contents for Dev Guide.
|
|
||||||
|
|
||||||
For each document available in translation, add an localized title to this TOC.
|
|
||||||
Do not add localized title for docs not available in translation.
|
|
||||||
Below are template spans for adding localized doc titles. Please ensure that
|
|
||||||
localized titles are added in the language order specified below.
|
|
||||||
?>
|
|
||||||
|
|
||||||
<ul id="nav">
|
|
||||||
<li class="nav-section">
|
|
||||||
<div class="nav-section-header"><a href="<?cs var:toroot ?>ndk/guides/index.html">
|
|
||||||
<span class="en">Getting Started</span></a></div>
|
|
||||||
<ul>
|
|
||||||
<li><a href="<?cs var:toroot ?>ndk/guides/setup.html">Setup</a></li>
|
|
||||||
<li><a href="<?cs var:toroot ?>ndk/guides/concepts.html">Concepts</a></li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="nav-section">
|
|
||||||
<div class="nav-section-header"><a href="<?cs var:toroot ?>ndk/guides/build.html">
|
|
||||||
<span class="en">
|
|
||||||
Building</span></a></div>
|
|
||||||
<ul>
|
|
||||||
<li><a href="<?cs var:toroot ?>ndk/guides/android_mk.html">Android.mk</a></li>
|
|
||||||
<li><a href="<?cs var:toroot ?>ndk/guides/application_mk.html">Application.mk</a></li>
|
|
||||||
<li><a href="<?cs var:toroot ?>ndk/guides/ndk-build.html">ndk-build</a></li>
|
|
||||||
<li><a href="<?cs var:toroot ?>ndk/guides/standalone_toolchain.html">Standalone Toolchain
|
|
||||||
</a></li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="nav-section">
|
|
||||||
<div class="nav-section-header"><a href="<?cs var:toroot ?>ndk/guides/arch.html">
|
|
||||||
<span class="en">Architectures and CPUs</span></a></div>
|
|
||||||
<ul>
|
|
||||||
<li><a href="<?cs var:toroot ?>ndk/guides/abis.html">ABI Management</a></li>
|
|
||||||
<li><a href="<?cs var:toroot ?>ndk/guides/cpu-arm-neon.html">NEON</a></li>
|
|
||||||
<li><a href="<?cs var:toroot ?>ndk/guides/x86.html">x86</a></li>
|
|
||||||
<li><a href="<?cs var:toroot ?>ndk/guides/x86-64.html">x86-64</a></li>
|
|
||||||
<li><a href="<?cs var:toroot ?>ndk/guides/mips.html">MIPS</a></li>
|
|
||||||
<li><a href="<?cs var:toroot ?>ndk/guides/cpu-features.html">The cpufeatures Library</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="nav-section">
|
|
||||||
<div class="nav-section-header"><a href="<?cs var:toroot ?>ndk/guides/debug.html">
|
|
||||||
<span class="en">Debugging</span></a></div>
|
|
||||||
<ul>
|
|
||||||
<li><a href="<?cs var:toroot ?>ndk/guides/ndk-gdb.html">ndk-gdb</a></li>
|
|
||||||
<li><a href="<?cs var:toroot ?>ndk/guides/ndk-stack.html">ndk-stack</a></li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="nav-section">
|
|
||||||
<div class="nav-section-header"><a href="<?cs var:toroot ?>ndk/guides/libs.html">
|
|
||||||
<span class="en">Libraries</span></a></div>
|
|
||||||
<ul>
|
|
||||||
<li><a href="<?cs var:toroot ?>ndk/guides/prebuilts.html">Prebuilt Libraries</a></li>
|
|
||||||
<li><a href="<?cs var:toroot ?>ndk/guides/cpp-support.html">C++ Support</a></li>
|
|
||||||
<li><a href="<?cs var:toroot ?>ndk/guides/stable_apis.html">Stable APIs</a></li>
|
|
||||||
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="nav-section">
|
|
||||||
<div class="nav-section-header"><a href="<?cs var:toroot ?>ndk/guides/audio/index.html">
|
|
||||||
<span class="en">Audio</span></a></div>
|
|
||||||
<ul>
|
|
||||||
<li><a href="<?cs var:toroot ?>ndk/guides/audio/basics.html">Basics</a></li>
|
|
||||||
<li><a href="<?cs var:toroot ?>ndk/guides/audio/opensl-for-android.html">OpenSL ES for
|
|
||||||
Android</a></li>
|
|
||||||
<li><a href="<?cs var:toroot ?>ndk/guides/audio/input-latency.html">Audio Input
|
|
||||||
Latency</a></li>
|
|
||||||
<li><a href="<?cs var:toroot ?>ndk/guides/audio/output-latency.html">Audio Output
|
|
||||||
Latency</a></li>
|
|
||||||
<li><a href="<?cs var:toroot ?>ndk/guides/audio/floating-point.html">Floating-Point
|
|
||||||
Audio</a></li>
|
|
||||||
<li><a href="<?cs var:toroot ?>ndk/guides/audio/sample-rates.html">Sample Rates
|
|
||||||
</a></li>
|
|
||||||
<li><a href="<?cs var:toroot ?>ndk/guides/audio/opensl-prog-notes.html">OpenSL ES Programming Notes
|
|
||||||
</a></li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="nav-section">
|
|
||||||
<div class="nav-section-header">
|
|
||||||
<a href="<?cs var:toroot ?>ndk/guides/graphics/index.html">
|
|
||||||
<span class="en">Vulkan</span></a></div>
|
|
||||||
<ul>
|
|
||||||
<li><a href="<?cs var:toroot ?>ndk/guides/graphics/getting-started.html">
|
|
||||||
Getting Started</a></li>
|
|
||||||
<li><a href="<?cs var:toroot ?>ndk/guides/graphics/design-notes.html">
|
|
||||||
Design Guidelines</a></li>
|
|
||||||
<li><a href="<?cs var:toroot ?>ndk/guides/graphics/shader-compilers.html">
|
|
||||||
Shader Compilers</a></li>
|
|
||||||
<li><a href="<?cs var:toroot ?>ndk/guides/graphics/validation-layer.html">
|
|
||||||
Validation Layers</a></li>
|
|
||||||
</ul>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
|
||||||
<!--
|
|
||||||
buildToggleLists();
|
|
||||||
changeNavLang(getLangPref());
|
|
||||||
//-->
|
|
||||||
</script>
|
|
||||||
|
|
||||||
|
Before Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 43 KiB |
|
Before Width: | Height: | Size: 146 KiB |
|
Before Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 90 KiB |
|
Before Width: | Height: | Size: 56 KiB |
|
Before Width: | Height: | Size: 280 KiB |
@@ -1,25 +0,0 @@
|
|||||||
page.title=Getting Started with the NDK
|
|
||||||
@jd:body
|
|
||||||
|
|
||||||
<p>The Native Development Kit (NDK) is a set of tools that allow you to leverage C and
|
|
||||||
C++ code in your Android apps. You can use it either to build from your own source code, or to take
|
|
||||||
advantage of existing prebuilt libraries.</p>
|
|
||||||
|
|
||||||
<p>The NDK is not appropriate for most novice Android programmers, and has little value for many
|
|
||||||
types of Android apps. It is often not worth the additional complexity it inevitably brings to the
|
|
||||||
development process. However, it can be useful in cases in which you need to:</p>
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li>Squeeze extra performance out of a device for computationally intensive applications like
|
|
||||||
games or physics simulations.</li>
|
|
||||||
<li>Reuse your own or other developers' C or C++ libraries.</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<p>This guide gives you the information you need to get up and running with the NDK. It starts by
|
|
||||||
explaining the <a href="{@docRoot}ndk/guides/concepts.html">concepts</a> underpinning the NDK, and
|
|
||||||
how to <a href="{@docRoot}ndk/guides/setup.html">set it up</a>. Next, it continues with information
|
|
||||||
about targeting <a href="{@docRoot}ndk/guides/arch.html">different hardware platforms</a> in your
|
|
||||||
builds. Then, it explains how to use
|
|
||||||
the NDK to <a href="{@docRoot}ndk/guides/build.html">build</a> and
|
|
||||||
<a href="{@docRoot}ndk/guides/debug.html">debug</a> your app. Finally, it discusses how to use your
|
|
||||||
own and other prebuilt <a href="{@docRoot}ndk/guides/libs.html">libraries</a>.</p>
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
page.title=Using Existing Libraries
|
|
||||||
@jd:body
|
|
||||||
|
|
||||||
<p>This section discusses the use of existing libraries–both your own, and those that the NDK
|
|
||||||
provides.</p>
|
|
||||||
|
|
||||||
<p>It begins by telling you how to use your own <a href="{@docRoot}ndk/guides/prebuilts.html">
|
|
||||||
prebuilt libraries</a>. Then, it explains the <a href="{@docRoot}ndk/guides/cpp-support.html">
|
|
||||||
C++ helper runtimes</a> available with the NDK, and how to use them. Finally, it provides
|
|
||||||
information on <a href="{@docRoot}ndk/guides/stable_apis.html">the other libraries</a> that the NDK provides, such
|
|
||||||
as <a href="https://www.khronos.org/opengles/">OpenGL ES</a> and
|
|
||||||
<a href="https://www.khronos.org/opensles/">OpenSL ES</a>, and the minimum Android API levels
|
|
||||||
required to support those libraries.</p>
|
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
page.title=MIPS Support
|
|
||||||
@jd:body
|
|
||||||
|
|
||||||
<div id="qv-wrapper">
|
|
||||||
<div id="qv">
|
|
||||||
<h2>On this page</h2>
|
|
||||||
|
|
||||||
<ol>
|
|
||||||
<li><a href="#over">Overview</a></li>
|
|
||||||
<li><a href="#comp">Compatibility</a></li>
|
|
||||||
</ol>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<p>The NDK supports the {@code mips} ABI, which allows native code to run on Android-based devices
|
|
||||||
that have CPUs supporting the MIPS32 instruction set.</p>
|
|
||||||
|
|
||||||
<h2 id="over">Overview</h2>
|
|
||||||
<p>To generate MIPS machine code, include {@code mips} in your
|
|
||||||
<a href="{@docRoot}ndk/guides/application_mk.html">{@code Application.mk}</a> file's
|
|
||||||
{@code APP_ABI} definition. For example: </p>
|
|
||||||
|
|
||||||
<pre class="no-pretty-print">
|
|
||||||
APP_ABI := mips
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>For more information about defining the {@code APP_ABI} variable, see
|
|
||||||
<a href="{@docRoot}ndk/guides/application_mk.html">{@code Application.mk}</a>.</p>
|
|
||||||
|
|
||||||
<p>The build system places generated libraries into {@code $PROJECT/libs/mips/}, where
|
|
||||||
{@code $PROJECT} represents your project's root directory, and embeds them in your APK under
|
|
||||||
the {@code /lib/mips/} directory.</p>
|
|
||||||
|
|
||||||
<p>The Android package manager extracts these libraries when installing your APK on a compatible
|
|
||||||
MIPS-based device, placing them under your app's private data directory.</p>
|
|
||||||
|
|
||||||
<p>In the Google Play store, the server filters applications so that a consumer sees only the native
|
|
||||||
libraries that run on the CPU powering his or her device.</p>
|
|
||||||
|
|
||||||
<h2 id="comp">Compatibility</h2>
|
|
||||||
<p>MIPS support requires, at minimum, Android 2.3 (Android API level 9). If your project files
|
|
||||||
target an older API level, but include MIPS as a targeted platform, the NDK build script
|
|
||||||
automatically selects the right set of native platform headers/libraries for you.</p>
|
|
||||||
@@ -1,168 +0,0 @@
|
|||||||
page.title=ndk-build
|
|
||||||
@jd:body
|
|
||||||
|
|
||||||
<div id="qv-wrapper">
|
|
||||||
<div id="qv">
|
|
||||||
<h2>On this page</h2>
|
|
||||||
|
|
||||||
<ol>
|
|
||||||
<li><a href="#int">Internals</a></li>
|
|
||||||
<li><a href="#ifc">Invoking from the Command Line</a></li>
|
|
||||||
<li><a href="#6432">64-Bit and 32-Bit Toolchains</a></li>
|
|
||||||
<li><a href="#req">Requirements</a></li>
|
|
||||||
</ol>
|
|
||||||
</li>
|
|
||||||
</ol>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<p>The {@code ndk-build} file is a shell script introduced in Android NDK r4. Its purpose
|
|
||||||
is to invoke the right NDK build script.
|
|
||||||
|
|
||||||
<h2 id="int">Internals</h2>
|
|
||||||
|
|
||||||
<p>Running the {@code ndk-build} script is equivalent to running the following command:</p>
|
|
||||||
|
|
||||||
<pre class="no-pretty-print">
|
|
||||||
$GNUMAKE -f <ndk>/build/core/build-local.mk
|
|
||||||
<parameters>
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p><code>$GNUMAKE</code> points to GNU Make 3.81 or later, and
|
|
||||||
<code><ndk></code> points to your NDK installation directory. You can use
|
|
||||||
this information to invoke ndk-build from other shell scripts, or even your own
|
|
||||||
make files.</p>
|
|
||||||
|
|
||||||
<h2 id="ifc">Invoking from the Command Line</h2>
|
|
||||||
<p>The {@code ndk-build} file lives in the top level the NDK installation directory. To run it
|
|
||||||
from the command line, invoke it while in or under your application project directory.
|
|
||||||
For example: </p>
|
|
||||||
|
|
||||||
<pre class="no-pretty-print">
|
|
||||||
cd <project>
|
|
||||||
$ <ndk>/ndk-build
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>In this example, <code><project></code> points to your
|
|
||||||
project’s root directory, and <code><ndk></code> is the directory where
|
|
||||||
you installed the NDK.</p>
|
|
||||||
|
|
||||||
<p><a class="anchor" id="options"></a> </p>
|
|
||||||
<h3>Options</h3>
|
|
||||||
<p>All parameters to ndk-build are passed directly to the underlying GNU {@code make}
|
|
||||||
command that runs the NDK build scripts. Combine <code>ndk-build</code> and
|
|
||||||
options in the form <code>ndk-build <option></code>. For example: </p>
|
|
||||||
|
|
||||||
<pre class="no-pretty-print">
|
|
||||||
$ ndk-build clean
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>The following options are available:</p>
|
|
||||||
<dl>
|
|
||||||
<dt>{@code clean}</dt>
|
|
||||||
<dd>Remove any previously generated binaries.</dd>
|
|
||||||
<dt>{@code V=1}</dt>
|
|
||||||
<dd>Launch build, and display build commands.<dd>
|
|
||||||
<dt>{@code -B}</dt>
|
|
||||||
<dd>Force a complete rebuild.</dd>
|
|
||||||
<dt>{@code -B V=1}</dt>
|
|
||||||
<dd>Force a complete rebuild, and display build commands.</dd>
|
|
||||||
<dt>{@code NDK_LOG=1}</dd>
|
|
||||||
<dd>Display internal NDK log messages (used for debugging the NDK itself).</dd>
|
|
||||||
<dt>{@code NDK_DEBUG=1}</dt>
|
|
||||||
<dd>Force a debuggable build (see <a href="#dvr">Table 1</a>).</dd>
|
|
||||||
<dt>{@code NDK_DEBUG=0}</dt>
|
|
||||||
<dd>Force a release build (see <a href="#dvr">Table 1</a>).</dd>
|
|
||||||
<dt>{@code NDK_HOST_32BIT=1}</dt>
|
|
||||||
<dd>Always use the toolchain in 32-bit mode (see <a href="#6432">64-bit and 32-bit
|
|
||||||
Toolchains</a>).</dd>
|
|
||||||
<dt>{@code NDK_APPLICATION_MK=<file>}</dt>
|
|
||||||
<dd>Build, using a specific <code>Application.mk</code> file pointed to by the
|
|
||||||
{@code NDK_APPLICATION_MK} variable.</dd>
|
|
||||||
<dt>{@code -C <project>}</dt>
|
|
||||||
<dd>Build the native code for the project path located at {@code <project>}. Useful if you
|
|
||||||
don't want to {@code cd} to it in your terminal.</dd>
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
<p><a class="anchor" id="dvr"></a> </p>
|
|
||||||
<h3>Debuggable versus Release builds</h3>
|
|
||||||
<p>Use the <code>NDK_DEBUG</code> option and, in certain cases,
|
|
||||||
{@code AndroidManifest.xml} to specify debug or release build,
|
|
||||||
optimization-related behavior, and inclusion of symbols. Table 1 shows the
|
|
||||||
results of each possible combination of settings.</p>
|
|
||||||
<p><em>Table 1.</em> Results of <code>NDK_DEBUG</code> (command line) and
|
|
||||||
<code>android:debuggable</code> (manifest) combinations.</p>
|
|
||||||
<table>
|
|
||||||
<tr>
|
|
||||||
<th></th><th>NDK_DEBUG=0 </th><th>NDK_DEBUG=1</th><th>NDK_DEBUG not specified
|
|
||||||
</th></tr>
|
|
||||||
<tr>
|
|
||||||
<td>android:debuggble="true" </td><td>Debug; Symbols; Optimized*1
|
|
||||||
</td><td>Debug; Symbols; Not optimized*2 </td><td>(same as NDK_DEBUG=1)
|
|
||||||
</td></tr>
|
|
||||||
<tr>
|
|
||||||
<td>android:debuggable="false"</td><td>Release; Symbols; Optimized
|
|
||||||
</td><td>Release; Symbols; Not optimized</td><td>Release; No symbols;
|
|
||||||
Optimized*3 </td></tr>
|
|
||||||
</table>
|
|
||||||
*1: Useful for profiling.<br>
|
|
||||||
*2: Default for running <a href="{@docRoot}ndk/guides/ndk-gdb.html">{@code ndk-gdb}</a>.<br>
|
|
||||||
*3: Default mode.<br>
|
|
||||||
<br>
|
|
||||||
<p class="note"><strong>Note:</strong> {@code NDK_DEBUG=0} is the equivalent of
|
|
||||||
{@code APP_OPTIM=release}, and complies with the GCC {@code -O2} option. {@code NDK_DEBUG=1} is the
|
|
||||||
equivalent of {@code APP_OPTIM=debug} in {@code Application.mk}, and complies with the GCC
|
|
||||||
{@code -O0} option. For more information about {@code APP_OPTIM}, see
|
|
||||||
<a href="{@docRoot}ndk/guides/application_mk.html">Application.mk</a>.</p>
|
|
||||||
<p>The syntax on the command line is, for example: </p>
|
|
||||||
|
|
||||||
<pre class="no-pretty-print">
|
|
||||||
$ ndk-build NDK_DEBUG=1
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>If you are using build tools from prior to SDK r8, you must also modify your
|
|
||||||
{@code AndroidManifest.xml} file to specify debug mode. The syntax for doing so resembles the
|
|
||||||
following:</p>
|
|
||||||
|
|
||||||
<pre class="no-pretty-print"><application android:label="@string/app_name"
|
|
||||||
android:debuggable="true">
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
From SDK r8 onward, you do not need to touch {@code AndroidManifest.xml}. Building a debug package
|
|
||||||
(e.g. with ant debug or the corresponding option of the ADT plugin) causes the tool automatically to
|
|
||||||
pick the native debug files generated with {@code NDK_DEBUG=1}.
|
|
||||||
|
|
||||||
|
|
||||||
<h2 id="6432">64-Bit and 32-Bit Toolchains</h2>
|
|
||||||
<p>Some toolchains come with both 64-bit and 32-bit versions. For example,
|
|
||||||
directories {@code <ndk>/toolchain/<name>/prebuilt/} and
|
|
||||||
{@code <ndk>/prebuilt/} may contain both {@code linux-x86} and
|
|
||||||
{@code linux-x86_64} folders for Linux tools in 32-bit and 64-bit modes,
|
|
||||||
respectively. The ndk-build script automatically chooses a 64-bit version of
|
|
||||||
the toolchain if the host OS supports it. You can force the use of a 32-bit
|
|
||||||
toolchain by using {@code NDK_HOST_32BIT=1} either in your environment or
|
|
||||||
on the ndk-build command line.</p>
|
|
||||||
<p>Note that 64-bit tools utilize host resources better (for instance, they are faster, and handle
|
|
||||||
larger programs), and they can still generate 32-bit binaries for Android.</p>
|
|
||||||
|
|
||||||
<h2 id="req">Requirements</h2>
|
|
||||||
<p>You need GNU Make 3.81 or later to use ndk-build or the NDK in general.
|
|
||||||
The build scripts will detect a non-compliant Make tool, and generate an error
|
|
||||||
message.</p>
|
|
||||||
<p>If you have GNU Make 3.81 installed, but the default <code>make</code>
|
|
||||||
command doesn’t launch it, define {@code GNUMAKE} in your environment to point to it
|
|
||||||
before launching ndk-build. For example: </p>
|
|
||||||
|
|
||||||
<pre class="no-pretty-print">
|
|
||||||
$ export GNUMAKE=/usr/local/bin/gmake
|
|
||||||
$ ndk-build
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>You can override other host prebuilt tools in {@code $NDK/prebuilt/<OS>/bin/}
|
|
||||||
with the following environment variables: </p>
|
|
||||||
|
|
||||||
<pre class="no-pretty-print">
|
|
||||||
$ export NDK_HOST_AWK=<path-to-awk>
|
|
||||||
$ export NDK_HOST_ECHO=<path-to-echo>
|
|
||||||
$ export NDK_HOST_CMP=<path-to-cmp>
|
|
||||||
</pre>
|
|
||||||
@@ -1,231 +0,0 @@
|
|||||||
page.title=ndk-gdb
|
|
||||||
@jd:body
|
|
||||||
|
|
||||||
<div id="qv-wrapper">
|
|
||||||
<div id="qv">
|
|
||||||
<h2>On this page</h2>
|
|
||||||
|
|
||||||
<ol>
|
|
||||||
<li><a href="#req">Requirements</a></li>
|
|
||||||
<li><a href="#use">Usage</a></li>
|
|
||||||
<li><a href="#thread">Thread Support</a></li>
|
|
||||||
</ol>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<p>The NDK includes a helper shell script named {@code ndk-gdb} to easily launch a native debugging
|
|
||||||
session for your NDK-generated machine code.</p>
|
|
||||||
|
|
||||||
<h2 id="req">Requirements</h2>
|
|
||||||
|
|
||||||
<p>For native debugging to work, you must follow these requirements:</p>
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li>Build your app using the {@code ndk-build} script. The {@code ndk-gdb} script
|
|
||||||
does not support using the legacy {@code make APP=<name>} method to build.</p></li>
|
|
||||||
<li>Enable app debugging in your {@code AndroidManifest.xml} file by including an
|
|
||||||
{@code <application>} element that sets the {@code android:debuggable} attribute to {@code
|
|
||||||
true}.</li>
|
|
||||||
<li>Build your app to run on Android 2.2 (Android API level 8) or higher.</li>
|
|
||||||
<li>Debug on a device or emulator running Android 2.2 or higher.
|
|
||||||
For debugging purposes, the target
|
|
||||||
API level that you declare in your {@code AndroidManifest.xml} file does not matter.</li>
|
|
||||||
<li>Develop your app in a Unix shell. On Windows, use <a href="https://www.cygwin.com/">Cygwin</a>
|
|
||||||
or the experimental {@code ndk-gdb-py} <a href="https://www.python.org/">Python</a>
|
|
||||||
implementation.</li>
|
|
||||||
<li>Use GNU Make 3.81 or higher.</li></ul>
|
|
||||||
|
|
||||||
<h2 id="use">Usage</h2>
|
|
||||||
To invoke the {@code ndk-gdb} script, change into the application directory or any directory under
|
|
||||||
it. For example:</p>
|
|
||||||
|
|
||||||
<pre class="no-pretty-print">
|
|
||||||
cd $PROJECT
|
|
||||||
$NDK/ndk-gdb
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>Here, {@code $PROJECT} points to your project's root directory, and {@code $NDK} points to your
|
|
||||||
NDK installation path.</p>
|
|
||||||
|
|
||||||
<p>When you invoke {@code ndk-gdb}, it configures the session to look for your source files
|
|
||||||
and symbol/debug versions of your generated native libraries. On successfully attaching to your
|
|
||||||
application process, {@code ndk-gdb} outputs a long series of error messages, noting that it cannot
|
|
||||||
find various system libraries. This is normal, because your host machine does not contain
|
|
||||||
symbol/debug versions of these libraries on your target device. You can safely ignore these
|
|
||||||
messages.</p>
|
|
||||||
|
|
||||||
<p>Next, {@code ndk-gdb} displays a normal GDB prompt.</p>
|
|
||||||
|
|
||||||
<p>You interact with {@code ndk-gdb} in the same way as you would with GNU GDB. For example, you can
|
|
||||||
use {@code b <location>} to set breakpoints, and {@code c} (for "continue") to
|
|
||||||
resume execution. For a comprehensive list of commands, see the
|
|
||||||
<a href="http://www.gnu.org/software/gdb/">GDB manual.</a></p>
|
|
||||||
|
|
||||||
<p>Note that when you quit the GDB prompt, the application process that you're debugging stops. This
|
|
||||||
behavior is a gdb limitation.</p>
|
|
||||||
|
|
||||||
<p>{@code ndk-gdb} handles many error conditions, and displays an informative error message if it
|
|
||||||
finds a problem. these checks include making sure that the following conditions are satisfied:</p>
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li>Checks that ADB is in your path.</li>
|
|
||||||
<li>Checks that your application is declared debuggable in its manifest.</li>
|
|
||||||
<li>Checks that, on the device, the installed application with the same package name is also
|
|
||||||
debuggable.</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<p>By default, {@code ndk-gdb} searches for an already-running application process, and displays an
|
|
||||||
error if it doesn't find one. You can, however, use the {@code --start} or
|
|
||||||
{@code --launch=<name>} option to automatically start your activity before the debugging
|
|
||||||
session. For more information, see <a href="#opt">Options</a>.</p>
|
|
||||||
|
|
||||||
|
|
||||||
<h3 id="opt">Options</h3>
|
|
||||||
<p>To see a complete list of options, type {@code ndk-gdb --help} on the command line. Table 1
|
|
||||||
shows a number of the more commonly used ones, along with brief descriptions.</p>
|
|
||||||
|
|
||||||
<p class="table-caption" id="table1">
|
|
||||||
<strong>Table 1.</strong> Common ndk-gdb options and their descriptions.</p>
|
|
||||||
|
|
||||||
<table>
|
|
||||||
<tr>
|
|
||||||
<th>Option</th>
|
|
||||||
<th>Description></th>
|
|
||||||
<tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td>{@code --verbose}</td>
|
|
||||||
<td><p>This option tells the build system to print verbose information about the native-debugging
|
|
||||||
session setup. It is necessary only for debugging problems when the debugger can't connect to the
|
|
||||||
app, and the error messages that {@code ndk-gdb} displays are not enough.</p></td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td>{@code --force}</td>
|
|
||||||
<td>By default, {@code ndk-gdb} aborts if it finds that another native debugging session is already
|
|
||||||
running on the same device. This option kills the other session, and replaces it with a new one.
|
|
||||||
Note that this option does not kill the actual app being debugged, which you must kill
|
|
||||||
separately.</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td>{@code --start}</td>
|
|
||||||
<td><p>When you start {@code ndk-gdb}, it tries by default to attach to an existing running instance of
|
|
||||||
your app on the target device. You can override this default behavior by using {@code --start} to
|
|
||||||
explicitly launch the application on the target device before the debugging session.</p></td>
|
|
||||||
|
|
||||||
<p>Starting {@code ndk-gdb} with this option specified launches the first launchable activity listed
|
|
||||||
in your application manifest. Use {@code --launch=<name>} to start the next launchable
|
|
||||||
activity. To dump the list of launchable activities, run {@code --launch-list} from the command
|
|
||||||
line.</p>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td>{@code --launch=<name>}</td>
|
|
||||||
<td><p>This option is similar to {@code --start}, except that it allows you to start a specific
|
|
||||||
activity from your application. This feature is only useful if your manifest defines multiple
|
|
||||||
launchable activities.</p></td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td>{@code --launch-list}</td>
|
|
||||||
<td><p>This convenience option prints the list of all launchable activity names found in your
|
|
||||||
app manifest. {@code --start} uses the first activity name.</p></td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td>{@code --project=<path>}</td>
|
|
||||||
<td>This option specifies the app project directory. It is useful if you want to launch the
|
|
||||||
script without first having to change to the project directory.</p></td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td>{@code --port=<port>}</td>
|
|
||||||
<td> <p>By default, {@code ndk-gdb} uses local TCP port 5039 to communicate with the app it
|
|
||||||
is debugging on the target device. Using a different port allows you to natively debug programs
|
|
||||||
running on different devices or emulators connected to the same host machine.</p></td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td>{@code --adb=<file>}</td>
|
|
||||||
<td><p>This option specifies the <a href="{@docRoot}tools/help/adb.html">adb</a>
|
|
||||||
tool executable. It is only necessary if you have not set your path to include that executable.</p>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<li>{@code -d}</li>
|
|
||||||
<li>{@code -e}</li>
|
|
||||||
<li>{@code -s <serial>}</li></td>
|
|
||||||
<td><p>These flags are similar to the adb commands with the same names. Set these flags if you have
|
|
||||||
several devices or emulators connected to your host machine. Their meanings are as follows:</p>
|
|
||||||
<dl>
|
|
||||||
<dt>{@code -d}</dt>
|
|
||||||
<dd>Connect to a single physical device.</dd>
|
|
||||||
<dt>{@code -e}</dt>
|
|
||||||
<dd>Connect to a single emulator device.</dd>
|
|
||||||
<dt>{@code -s <serial>}</dt>
|
|
||||||
<dd>Connect to a specific device or emulator. Here, {@code <serial>} is the device's name
|
|
||||||
as listed by the {@code adb devices} command.</dd>
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
<p>Alternatively, you can define the {@code ADB_SERIAL} environment variable to list a specific
|
|
||||||
device, without the need for a specific option.</p></td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<li>{@code --exec=<file>}</li>
|
|
||||||
<li>{@code -x <file>}</li>
|
|
||||||
</td>
|
|
||||||
<td><p>This option tells {@code ndk-gdb} to run the GDB initialization commands found in
|
|
||||||
{@code <file>} after connecting to the process it is debugging. This is a useful feature if
|
|
||||||
you want to do something repeatedly, such as setting up a list of breakpoints, and then resuming
|
|
||||||
execution automatically.</p></td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td>{@code --nowait}</td>
|
|
||||||
<td><p>Disable pausing the Java code until GDB connects. Passing this option may cause the debugger
|
|
||||||
to miss early breakpoints.</p>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td>{@code --tui}
|
|
||||||
{@code -t}</td>
|
|
||||||
<td><p>Enable Text User Interface if it is available.</p></td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td>{@code --gnumake-flag=<flag>}</td>
|
|
||||||
<td><p>This option is an extra flag (or flags) to pass to the
|
|
||||||
{@code ndk-build} system when
|
|
||||||
querying it for project information. You can use multiple instances of this option in the
|
|
||||||
same command.</p></td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td>{@code --stdcxx-py-pr={auto|none|gnustdcxx[-GCCVER]|stlport}}</td>
|
|
||||||
<td><p>Use specified Python pretty-printers for displaying types in the Standard C++ Library.
|
|
||||||
{@code auto} mode works by looking at the {@code .so} files for a {@code libstdc++} library,
|
|
||||||
and as such only works for a shared library. When linking statically to a {@code libstdc++} library,
|
|
||||||
you must specify the required printers. The default is {@code none}.</p></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<p class="note"><strong>Note: </strong>The final three options in this table are only for the
|
|
||||||
Python version of {@code ndk-gdb}.</p></td>
|
|
||||||
|
|
||||||
<h2 id="thread">Thread Support</h2>
|
|
||||||
<p>If your app runs on a platform older than Android 2.3 (API level 9), {@code ndk-gdb}
|
|
||||||
cannot debug native threads properly. The debugger can only debug the main thread, abd completely
|
|
||||||
ignores the execution of other threads.</p>
|
|
||||||
|
|
||||||
<p>If you place a breakpoint on a function executed on a non-main thread, the program exits, and
|
|
||||||
GDB displays the following message:</p>
|
|
||||||
|
|
||||||
<pre class="no-pretty-print">
|
|
||||||
Program terminated with signal SIGTRAP, Trace/breakpoint trap.
|
|
||||||
The program no longer exists.
|
|
||||||
</pre>
|
|
||||||
@@ -1,86 +0,0 @@
|
|||||||
page.title=ndk-stack
|
|
||||||
@jd:body
|
|
||||||
|
|
||||||
<div id="qv-wrapper">
|
|
||||||
<div id="qv">
|
|
||||||
<h2>On this page</h2>
|
|
||||||
|
|
||||||
<ol>
|
|
||||||
<li><a href="#use">Usage</a></li>
|
|
||||||
</ol>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<p>The {@code ndk-stack} tool allows you to filter stack traces as they appear in the
|
|
||||||
output of <a href="{@docRoot}tools/help/logcat.html">{@code adb logcat}</a>. It also replaces any
|
|
||||||
address inside a shared library with the corresponding
|
|
||||||
{@code <source-file>:<line-number>} values from your source code, making issues easier
|
|
||||||
to pinpoint.</p>
|
|
||||||
|
|
||||||
<p>For example, it translates something like:</p>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
I/DEBUG ( 31): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
|
|
||||||
I/DEBUG ( 31): Build fingerprint: 'generic/google_sdk/generic/:2.2/FRF91/43546:eng/test-keys'
|
|
||||||
I/DEBUG ( 31): pid: 351, tid: 351 %gt;%gt;%gt; /data/local/ndk-tests/crasher <<<
|
|
||||||
I/DEBUG ( 31): signal 11 (SIGSEGV), fault addr 0d9f00d8
|
|
||||||
I/DEBUG ( 31): r0 0000af88 r1 0000a008 r2 baadf00d r3 0d9f00d8
|
|
||||||
I/DEBUG ( 31): r4 00000004 r5 0000a008 r6 0000af88 r7 00013c44
|
|
||||||
I/DEBUG ( 31): r8 00000000 r9 00000000 10 00000000 fp 00000000
|
|
||||||
I/DEBUG ( 31): ip 0000959c sp be956cc8 lr 00008403 pc 0000841e cpsr 60000030
|
|
||||||
I/DEBUG ( 31): #00 pc 0000841e /data/local/ndk-tests/crasher
|
|
||||||
I/DEBUG ( 31): #01 pc 000083fe /data/local/ndk-tests/crasher
|
|
||||||
I/DEBUG ( 31): #02 pc 000083f6 /data/local/ndk-tests/crasher
|
|
||||||
I/DEBUG ( 31): #03 pc 000191ac /system/lib/libc.so
|
|
||||||
I/DEBUG ( 31): #04 pc 000083ea /data/local/ndk-tests/crasher
|
|
||||||
I/DEBUG ( 31): #05 pc 00008458 /data/local/ndk-tests/crasher
|
|
||||||
I/DEBUG ( 31): #06 pc 0000d362 /system/lib/libc.so
|
|
||||||
I/DEBUG ( 31):
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>into the more readable output: </p>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
********** Crash dump: **********
|
|
||||||
Build fingerprint: 'generic/google_sdk/generic/:2.2/FRF91/43546:eng/test-keys'
|
|
||||||
pid: 351, tid: 351 >>> /data/local/ndk-tests/crasher <<<
|
|
||||||
signal 11 (SIGSEGV), fault addr 0d9f00d8
|
|
||||||
Stack frame #00 pc 0000841e /data/local/ndk-tests/crasher : Routine zoo in /tmp/foo/crasher/jni/zoo.c:13
|
|
||||||
Stack frame #01 pc 000083fe /data/local/ndk-tests/crasher : Routine bar in /tmp/foo/crasher/jni/bar.c:5
|
|
||||||
Stack frame #02 pc 000083f6 /data/local/ndk-tests/crasher : Routine my_comparison in /tmp/foo/crasher/jni/foo.c:9
|
|
||||||
Stack frame #03 pc 000191ac /system/lib/libc.so
|
|
||||||
Stack frame #04 pc 000083ea /data/local/ndk-tests/crasher : Routine foo in /tmp/foo/crasher/jni/foo.c:14
|
|
||||||
Stack frame #05 pc 00008458 /data/local/ndk-tests/crasher : Routine main in /tmp/foo/crasher/jni/main.c:19
|
|
||||||
Stack frame #06 pc 0000d362 /system/lib/libc.so
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<h2>Usage</h2>
|
|
||||||
<p>To use {@code ndk-stack}, you first need a directory containing symbolic versions of your app's
|
|
||||||
shared libraries. If you use the NDK build system ({@code ndk-build}), these shared-library
|
|
||||||
files reside under {@code $PROJECT_PATH/obj/local/<abi>}, where {@code <abi>} represents
|
|
||||||
your device's ABI. By default, the system uses the {@code armeabi} ABI.</p>
|
|
||||||
|
|
||||||
<p>There are two ways to use the tool. You can feed the logcat text as direct input to the program.
|
|
||||||
For example:</p>
|
|
||||||
|
|
||||||
<pre class="no-pretty-print">
|
|
||||||
adb logcat | $NDK/ndk-stack -sym $PROJECT_PATH/obj/local/armeabi
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>You can also use the {@code -dump} option to specify the logcat as an input file. For example:
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<pre class="no-pretty-print">
|
|
||||||
adb logcat > /tmp/foo.txt
|
|
||||||
$NDK/ndk-stack -sym $PROJECT_PATH/obj/local/armeabi -dump foo.txt
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>When it begins parsing the logcat output, the tool looks for an initial line of asterisks.
|
|
||||||
For example:</p>
|
|
||||||
|
|
||||||
<pre class="no-pretty-print">
|
|
||||||
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p class="note"><strong>Note: </strong>When copy/pasting traces, don't forget this line, or
|
|
||||||
{@code ndk-stack} won't work correctly.</p>
|
|
||||||
@@ -1,145 +0,0 @@
|
|||||||
page.title=Using Prebuilt Libraries
|
|
||||||
@jd:body
|
|
||||||
|
|
||||||
<div id="qv-wrapper">
|
|
||||||
<div id="qv">
|
|
||||||
<h2>On this page</h2>
|
|
||||||
|
|
||||||
<ol>
|
|
||||||
<li><a href="#dm">Declaring a Prebuilt Library</a></li>
|
|
||||||
<li><a href="#rp">Referencing the Prebuilt Library from Other Modules</a></li>
|
|
||||||
<li><a href="#dp">Debugging Prebuilt Libraries</a></li>
|
|
||||||
<li><a href="#sa">Selecting ABIs for Prebuilt Libraries</a></li>
|
|
||||||
</ol>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<p>The NDK supports the use of prebuilt libraries, both static and shared. There are two principal
|
|
||||||
use cases for this functionality:</p>
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li>Distributing your own libraries to third-party NDK developers without distributing your
|
|
||||||
sources.</li>
|
|
||||||
<li>Using a prebuilt version of your own libraries to speed up your build.</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<p>This page explains how to use prebuilt libraries.</p>
|
|
||||||
|
|
||||||
<h2 id="dm">Declaring a Prebuilt Library</h2>
|
|
||||||
<p>You must declare each prebuilt library you use as a <em>single</em> independent module. To do
|
|
||||||
so, perform the following steps:
|
|
||||||
|
|
||||||
<ol type="1">
|
|
||||||
<li>Give the module a name. This name does not need to be the same as that of the prebuilt
|
|
||||||
library, itself.</li>
|
|
||||||
<li>In the module's <a href="{@docRoot}ndk/guides/android_mk.html">{@code Android.mk}</a>
|
|
||||||
file, assign to {@code LOCAL_SRC_FILES} the path to the prebuilt library you are providing.
|
|
||||||
Specify the path relative to the value of your {@code LOCAL_PATH} variable.</p>
|
|
||||||
<p class="note"><strong>Note: </strong> You must make sure to select the version of your prebuilt
|
|
||||||
library appropriate to your target ABI. For more information on ensuring library support for
|
|
||||||
ABIs, see <a href="#sa">Selecting ABIs for Prebuilt Libraries.</a></p></li>
|
|
||||||
<li>Include {@code PREBUILT_SHARED_LIBRARY} or {@code PREBUILT_STATIC_LIBRARY}, depending on
|
|
||||||
whether you are using a shared ({@code .so}) or static ({@code .a}) library.</li>
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
<p>Here is a trivial example that assumes the prebuilt library {@code libfoo.so} resides in
|
|
||||||
the same directory as the <a href="{@docRoot}ndk/guides/android_mk.html">{@code Android.mk}</a>
|
|
||||||
file that describes it.</p>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
LOCAL_PATH := $(call my-dir)
|
|
||||||
|
|
||||||
include $(CLEAR_VARS)
|
|
||||||
LOCAL_MODULE := foo-prebuilt
|
|
||||||
LOCAL_SRC_FILES := libfoo.so
|
|
||||||
include $(PREBUILT_SHARED_LIBRARY)
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>In this example, the name of the module is the same as that of the prebuilt library.</p>
|
|
||||||
|
|
||||||
<p>The build system places a copy of your prebuilt shared library into {@code $PROJECT/obj/local},
|
|
||||||
and another copy, stripped of debug information, into {@code $PROJECT/libs/<abi>}. Here,
|
|
||||||
{@code $PROJECT} is the root directory of your project.</p>
|
|
||||||
|
|
||||||
<h2 id="rp">Referencing the Prebuilt Library from Other Modules</h2>
|
|
||||||
<p>To reference a prebuilt library from other modules, specify its name as the value
|
|
||||||
of the {@code LOCAL_STATIC_LIBRARIES} or {@code LOCAL_SHARED_LIBRARIES} variable in the
|
|
||||||
<a href="{@docRoot}ndk/guides/android_mk.html">{@code Android.mk}</a> files associated with those
|
|
||||||
other modules.</p>
|
|
||||||
|
|
||||||
<p>For example, the description of a module using {@code libfoo.so} might be as follows:</p>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
include $(CLEAR_VARS)
|
|
||||||
LOCAL_MODULE := foo-user
|
|
||||||
LOCAL_SRC_FILES := foo-user.c
|
|
||||||
LOCAL_SHARED_LIBRARIES := foo-prebuilt
|
|
||||||
include $(BUILD_SHARED_LIBRARY)
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>Here, {@code LOCAL_MODULE} is the name of the module referring to the prebuilt; {@code
|
|
||||||
LOCAL_SHARED_LIBRARIES} is the name of the prebuilt, itself.</p>
|
|
||||||
|
|
||||||
<h2>Exporting Headers for Prebuilt Libraries</h2>
|
|
||||||
<p>The code in {@code foo-user.c} depends on specific declarations that normally
|
|
||||||
reside in a header file, such as {@code foo.h}, distributed with the prebuilt library.
|
|
||||||
For example, {@code foo-user.c} might have a line like the following:</p>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
#include <foo.h>
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>In such a case, you need to provide the header and its include path to the compiler when you
|
|
||||||
build the {@code foo-user} module. A simple way to accomplish this task is to use exports in the
|
|
||||||
prebuilt module definition. For example, as long as header {@code foo.h} is located under the
|
|
||||||
{@code include} directory associated with the prebuilt module, you can declare it as follows:</p>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
include $(CLEAR_VARS)
|
|
||||||
LOCAL_MODULE := foo-prebuilt
|
|
||||||
LOCAL_SRC_FILES := libfoo.so
|
|
||||||
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include
|
|
||||||
include $(PREBUILT_SHARED_LIBRARY)
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>The {@code LOCAL_EXPORT_C_INCLUDES} definition here ensures that the build system
|
|
||||||
exports the path to the prebuilt library's {@code include} directory, prepending that path onto the
|
|
||||||
value of the {@code LOCAL_C_INCLUDES} for the module dependent on it.</p>
|
|
||||||
|
|
||||||
<p>This operation allows the build system to find the necessary headers.</p>
|
|
||||||
|
|
||||||
<h2 id="dp">Debugging Prebuilt Libraries</h2>
|
|
||||||
<p>We recommend that you provide prebuilt shared libraries containing debug symbols. The NDK build
|
|
||||||
system always strips the symbols from the version of the library that it installs into
|
|
||||||
{@code $PROJECT/libs/<abi>/}, but you can use the debug version for debugging with
|
|
||||||
{@code ndk-gdb}.</p>
|
|
||||||
|
|
||||||
<h2 id="sa">Selecting ABIs for Prebuilt Libraries</h2>
|
|
||||||
<p>You must make sure to select the right version of your prebuilt shared library for your targeted
|
|
||||||
ABI. The <a href="{@docRoot}ndk/guides/android_mk.html#taa">
|
|
||||||
{@code TARGET_ARCH_ABI}</a> variable in the <a href="{@docRoot}ndk/guides/android_mk.html">
|
|
||||||
{@code Android.mk}</a> file can point the build system at the appropriate version of the library.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>For example, assume that your project contains two versions of library {@code libfoo.so}:</p>
|
|
||||||
|
|
||||||
<pre class="no-pretty-print">
|
|
||||||
armeabi/libfoo.so
|
|
||||||
x86/libfoo.so
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>The following snippet shows how to use {@code TARGET_ARCH_ABI} so that the build system selects
|
|
||||||
the appropriate version of the library:</p>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
include $(CLEAR_VARS)
|
|
||||||
LOCAL_MODULE := foo-prebuilt
|
|
||||||
LOCAL_SRC_FILES := $(TARGET_ARCH_ABI)/libfoo.so
|
|
||||||
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include
|
|
||||||
include $(PREBUILT_SHARED_LIBRARY)
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>If you have specified {@code armeabi} as the value of {@code TARGET_ARCH_ABI}, the build system
|
|
||||||
uses the version of {@code libfoo.so} located in the {@code armeabi} directory. If you have
|
|
||||||
specified {@code x86} as the value {@code TARGET_ARCH_ABI}, the build system uses the version in the
|
|
||||||
{@code x86} directory.</p>
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
page.title=Sample Walkthroughs
|
|
||||||
@jd:body
|
|
||||||
|
|
||||||
<div class="contents">
|
|
||||||
<div class="textblock"><p>This section explains several of the sample apps provided with the NDK. It assumes that you already have a working knowledge of programming in Java and native code, and focuses on issues particular to working with the NDK.</p>
|
|
||||||
<p>It discusses the following samples:</p>
|
|
||||||
<ul>
|
|
||||||
<li><a href="./md_2__samples_sample--hellojni.html">hello-jni</a>: A very basic app that illustrates core workings of the NDK.</li>
|
|
||||||
<li><a href="./md_2__samples_sample--nativeactivity.html">native-activity</a>: An app that shows the fundamentals of how to construct a purely native app. It places particular emphasis on the android_native_app_glue library.</li>
|
|
||||||
<li><a href="./md_2__samples_samples-teapot.html">Teapot</a>: A simple OpenGL demo, showcasing the <code>ndk_helper</code> class. </li>
|
|
||||||
</ul>
|
|
||||||
@@ -1,93 +0,0 @@
|
|||||||
page.title=Setup
|
|
||||||
@jd:body
|
|
||||||
|
|
||||||
|
|
||||||
<div id="qv-wrapper">
|
|
||||||
<div id="qv">
|
|
||||||
<h2>On this page</h2>
|
|
||||||
|
|
||||||
<ol>
|
|
||||||
<li><a href="#install">Installation</a></li>
|
|
||||||
<li><a href="#configure">Configuring Eclipse</a></li>
|
|
||||||
<li><a href="#verify">Verification</a></li>
|
|
||||||
</ol>
|
|
||||||
</li>
|
|
||||||
</ol>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="contents">
|
|
||||||
<div class="textblock"><p>This document explains how to:</p>
|
|
||||||
<ul>
|
|
||||||
<li><a href="#install">Get</a> and install the NDK.</li>
|
|
||||||
<li><a href="#configure">Configure</a> your system and the Eclipse and the Android Development Tool
|
|
||||||
(ADT) for use with it.</li>
|
|
||||||
<li><a href="#verify">Verify</a>, using a simple sample, that everything is working as expected.
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
<p>This document assumes that you are already familiar with Java-based Android development. For more
|
|
||||||
information on that topic, see the
|
|
||||||
<a href="{@docRoot}">Android developer site</a>.</p>
|
|
||||||
|
|
||||||
<h2 id="install">Installation</h2>
|
|
||||||
<p>To install and configure the NDK, follow these steps:</p>
|
|
||||||
<ol type="1">
|
|
||||||
<li>Get and install the <a href="{@docRoot}studio/index.html">Android SDK</a>.</li>
|
|
||||||
<li><a href="{@docRoot}ndk/downloads/index.html">Download</a> the NDK,
|
|
||||||
making sure to download the correct version for your development platform. You may place the
|
|
||||||
unzipped directory anywhere on your local drive.</li>
|
|
||||||
<li>Update your {@code PATH} environment variable with the location of the directory that
|
|
||||||
contains the NDK.</li>
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
<h2 id="configure">Configuring Eclipse</h2>
|
|
||||||
<p>Eclipse must know where the NDK is in order to use it when building your app. Follow these steps
|
|
||||||
to set the location of the NDK.</p>
|
|
||||||
<ol type="1">
|
|
||||||
<li>Launch Eclipse, which is installed as part of the Android SDK.</li>
|
|
||||||
<li>Open <b>Window</b> > <b>Preferences</b>.</li>
|
|
||||||
<li>In the pane on the left side of the <i>Preferences</i> window, select <i>Android</i>.
|
|
||||||
The <i>Android</i> section expands, revealing a number of subsections.</li>
|
|
||||||
<li>Select <b>NDK</b>. In the pane on the right side of the <i>Preferences</i> window, browse to
|
|
||||||
the directory that contains the NDK.</li>
|
|
||||||
<li>Click <b>OK</b> to return to the <i>Package Explorer</i> display.</li>
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
<h2 id="verify">Verification</h2>
|
|
||||||
<h3>Eclipse</h3>
|
|
||||||
<p>To confirm that you have installed the NDK, set it up correctly, and properly configured Eclipse,
|
|
||||||
follow these steps:</p>
|
|
||||||
<ol type="1">
|
|
||||||
<li>Import the hello-jni sample from {@code <ndk>/samples/}, as you would any other Android
|
|
||||||
project.</li>
|
|
||||||
<li>In the <i>Project Explorer</i> pane, right-click the project name (<i>HelloJni</i>). A
|
|
||||||
context menu appears.</li>
|
|
||||||
<li>From the context menu, select <b>Android Tools</b> > <b>Add Native Support</b>. The
|
|
||||||
<i>Add Android Native Support</i> window appears.</li>
|
|
||||||
<li>Accept the default library name (“hello-jni”), and click <b>Finish</b>.</li>
|
|
||||||
<li>Build and execute the application.</li>
|
|
||||||
</ol>
|
|
||||||
<h3>Command line</h3>
|
|
||||||
<p>Follow these steps to build from the command line:</p>
|
|
||||||
<ol type="1">
|
|
||||||
<li>Change to the root directory of your project.</li>
|
|
||||||
<li>Execute ndk-build to build the native component of your app. do this by
|
|
||||||
typing {@code ndk-build} at the command prompt.</li>
|
|
||||||
<li>Build and install your project as you would a regular Android app written in Java. For more
|
|
||||||
information, see
|
|
||||||
<a href="{@docRoot}tools/building/index.html">Building and Running</a> and
|
|
||||||
<a href="{@docRoot}tools/building/building-cmdline.html">Building and Running
|
|
||||||
from the Command Line</a>.</li>
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
<p>If you have successfully installed and configured the NDK, the screen on your target device looks
|
|
||||||
as shown in Figure 1.</p>
|
|
||||||
|
|
||||||
<img src="./images/verification_screen.png" srcset="./images/verification_screen@2x.png 2x"
|
|
||||||
alt="Output: Hello from JNI!" id="figure1" />
|
|
||||||
|
|
||||||
<p class="img-caption">
|
|
||||||
<strong>Figure 1.</strong> Target-device screen after successful launch.
|
|
||||||
</p>
|
|
||||||
@@ -1,501 +0,0 @@
|
|||||||
page.title=Android NDK Native APIs
|
|
||||||
@jd:body
|
|
||||||
|
|
||||||
<div id="qv-wrapper">
|
|
||||||
<div id="qv">
|
|
||||||
<h2>On this page</h2>
|
|
||||||
|
|
||||||
<ol>
|
|
||||||
<li><a href="#purpose">Overview</a></li>
|
|
||||||
<li><a href="#mnu">Major Native API Updates</a><li>
|
|
||||||
<ol>
|
|
||||||
<li><a href="#a3">Android API level 3</a></li>
|
|
||||||
<li><a href="#a4">Android API level 4</a></li>
|
|
||||||
<li><a href="#a5">Android API level 5</a></li>
|
|
||||||
<li><a href="#a8">Android API level 8</a></li>
|
|
||||||
<li><a href="#a9">Android API level 9</a></li>
|
|
||||||
<li><a href="#a14">Android API level 14</a></li>
|
|
||||||
<li><a href="#a18">Android API level 18</a></li>
|
|
||||||
</ol>
|
|
||||||
</ol>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<p>The Android NDK provides a set of native headers and shared library files that has gradually
|
|
||||||
increased with successive releases of new Android API levels. This page explains these headers and
|
|
||||||
files, and maps them to specific
|
|
||||||
<a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#ApiLevels"> Android API levels</a>.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h2 id="purpose">Overview</h2>
|
|
||||||
<p>There are two basic steps to enable your app to use the libraries that the NDK provides:
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<ol type ="1">
|
|
||||||
<li>Include in your code the headers associated with the libraries you wish to use.</li>
|
|
||||||
|
|
||||||
<li>Tell the build system that your native module needs to link against the libraries at load time.
|
|
||||||
For example, to link against {@code /system/lib/libfoo.so}, add the following line to your
|
|
||||||
<a href="{@docRoot}ndk/guides/android_mk.html">Android.mk</a> file:</li>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
LOCAL_LDLIBS := -lfoo
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>To list multiple libraries, use a space as a delimiter. For more information about using the
|
|
||||||
{@code LOCAL_LDLIBS} variable, see <a href="{@docRoot}ndk/guides/android_mk.html">Android.mk</a>.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
<p>For all API levels, the build system automatically links the standard C libraries, the
|
|
||||||
standard C++ libraries, real-time extensions, and {@code pthread}; you do not need
|
|
||||||
to include them when defining your {@code LOCAL_LDLIBS} variable. For more information about
|
|
||||||
the C and C++ libraries, see <a href="#a3">Android API level 3</a>.</p>
|
|
||||||
|
|
||||||
<p>The NDK often provides new headers and libraries for new Android releases. These files reside
|
|
||||||
under {@code $NDK/platforms/android-<level>/<abi>/usr/include}. When the NDK does not
|
|
||||||
have a specific new group of headers and libraries for an Android API level, it means that
|
|
||||||
an app targeting that level should use the most recently released NDK assets. For example,
|
|
||||||
there was no new release of NDK headers or libraries for Android API levels 6 and 7. Therefore,
|
|
||||||
when developing an app targeting Android API level 7, you should use the headers and libraries
|
|
||||||
located under {@code android-5/}.</p>
|
|
||||||
|
|
||||||
<p>Table 1 shows the correspondence between NDK-supported API levels and Android releases.</p>
|
|
||||||
|
|
||||||
<p class="table-caption" id="table1">
|
|
||||||
<strong>Table 1.</strong> NDK-supported API levels and corresponding Android releases.</p>
|
|
||||||
<table>
|
|
||||||
<tr>
|
|
||||||
<th scope="col">NDK-supported API level</th>
|
|
||||||
<th scope="col">Android release</th>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>3</td>
|
|
||||||
<td>1.5</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>4</td>
|
|
||||||
<td>1.6</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>5</td>
|
|
||||||
<td>2.0</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>8</td>
|
|
||||||
<td>2.2</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>9</td>
|
|
||||||
<td>2.3 through 3.0.x</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>12</td>
|
|
||||||
<td>3.1.x</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>13</td>
|
|
||||||
<td>3.2</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>14</td>
|
|
||||||
<td>4.0 through 4.0.2</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>15</td>
|
|
||||||
<td>4.0.3 and 4.0.4</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>16</td>
|
|
||||||
<td>4.1 and 4.1.1</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>17</td>
|
|
||||||
<td>4.2 and 4.2.2</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>18</td>
|
|
||||||
<td>4.3</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>19</td>
|
|
||||||
<td>4.4</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>21</td>
|
|
||||||
<td>4.4W and 5.0</td>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<p>Each new release of NDK headers and libraries for a given Android API level is cumulative; you
|
|
||||||
are nearly always safe if you use the most recently released headers when building your app. For
|
|
||||||
example, you can use the NDK headers for Android API level 21 for an app targeting API level 16. By doing so, however, you increase your APK's footprint.</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
For more information about Android API levels, see
|
|
||||||
<a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#ApiLevels">What is API Level?</a>.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h2 id="mnu">Major Native API Updates</h2>
|
|
||||||
|
|
||||||
<h3 id="a3">Android API level 3</h3>
|
|
||||||
<p>The NDK provides the following APIs for developing native code that runs on Android 1.5 system
|
|
||||||
images and above.</p>
|
|
||||||
|
|
||||||
<h4>C library</h4>
|
|
||||||
<p>The C library headers for Android 1.5 are available through their standard names, such as
|
|
||||||
{@code stdlib.h} and {@code stdio.h}. If a header is missing at build time, it's because the
|
|
||||||
header is not available on the 1.5 system image.</p>
|
|
||||||
|
|
||||||
<h4>C++ library</h4>
|
|
||||||
<p>An <em>extremely</em> minimal C++ support API is available. For more
|
|
||||||
information on C++ library support, see
|
|
||||||
<a href="{@docRoot}ndk/guides/cpp-support.html">C++ Library Support</a>.</p>
|
|
||||||
|
|
||||||
<h4>Android-specific log support</h4>
|
|
||||||
|
|
||||||
<p>{@code <android/log.h>} contains various definitions that an app can use to send log
|
|
||||||
messages to the kernel from native code. For more information about these definitions, see the
|
|
||||||
comments in {@code $NDK/platforms/android-3/arch-arm/usr/include/android/log.h}, where {@code $NDK}
|
|
||||||
is the root of your NDK installation.</p>
|
|
||||||
|
|
||||||
<p>You can write your own wrapper macros to access this functionality. If you wish to perform
|
|
||||||
logging, your native module should link to {@code /system/lib/liblog.so}. Implement this
|
|
||||||
linking by including the following line in your <a href="{@docRoot}ndk/guides/android_mk.html">
|
|
||||||
{@code Android.mk}</a> file:</p>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
LOCAL_LDLIBS := -llog
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<h4>ZLib compression library</h4>
|
|
||||||
<p>You can use the <a href="http://www.zlib.net/manual.html">Zlib compression library</a>
|
|
||||||
by including {@code zlib.h} and {@code zconf.h}. You must also link your native
|
|
||||||
module against {@code /system/lib/libz.so} by including the following line in your
|
|
||||||
<a href="{@docRoot}ndk/guides/android_mk.html">{@code Android.mk}</a> file:</p>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
LOCAL_LDLIBS := -lz
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<h4>Dynamic linker library</h4>
|
|
||||||
<p>You can access the Android dynamic linker's {@code dlopen()}, {@code dlsym()}, and
|
|
||||||
{@code dlclose()} functions by including {@code dlfcn.h}. You must also link against
|
|
||||||
{@code /system/lib/libdl.so} by including the following line in your
|
|
||||||
<a href="{@docRoot}ndk/guides/android_mk.html">{@code Android.mk}</a> file:</p>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
LOCAL_LDLIBS := -ldl
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<h3 id="a4">Android API level 4</h3>
|
|
||||||
<p>The NDK provides the following APIs for developing native code that runs on Android 1.6 system
|
|
||||||
images and above.</p>
|
|
||||||
|
|
||||||
<h4>OpenGL ES 1.x Library</h4>
|
|
||||||
<p>The standard OpenGL ES headers {@code gl.h} and {@code glext.h} contain
|
|
||||||
the declarations necessary for performing OpenGL ES 1.x rendering calls from native code.</p>
|
|
||||||
|
|
||||||
<p>To use these headers, link your native module to {@code /system/lib/libGLESv1_CM.so} by
|
|
||||||
including the following line in your <a href="{@docRoot}ndk/guides/android_mk.html">
|
|
||||||
{@code Android.mk}</a> file:</p>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
LOCAL_LDLIBS := -lGLESv1_CM
|
|
||||||
</pre>
|
|
||||||
<p>All Android-based devices support OpenGL ES 1.0, because Android provides an Open GL 1.0-capable
|
|
||||||
software renderer that can be used on devices without GPUs.</p>
|
|
||||||
<p>Only Android devices that have the necessary GPU fully support OpenGL ES 1.1. An app can
|
|
||||||
query the OpenGL ES version string and extension string to determine whether the current device
|
|
||||||
supports the features it needs. For information on how to perform this query, see the description of
|
|
||||||
<a href="http://www.khronos.org/opengles/sdk/1.1/docs/man/glGetString.xml">{@code glGetString()}</a>
|
|
||||||
in the OpenGL specification.</p>
|
|
||||||
|
|
||||||
<p>Additionally, you must put a
|
|
||||||
<a href="http://developer.android.com/guide/topics/manifest/uses-feature-element.html">{@code
|
|
||||||
<uses-feature>}</a> tag in your manifest file to indicate the version of
|
|
||||||
<a href="http://developer.android.com/guide/topics/graphics/opengl.html#manifest">OpenGL ES</a>
|
|
||||||
that your application requires.</p>
|
|
||||||
|
|
||||||
<p>The <a href="#egl">EGL APIs</a> are only available starting from API level 9. You can, however,
|
|
||||||
use the VM to perform some of the operations that you would get from those APIS. These operations
|
|
||||||
include surface creation and flipping. For an example of how to use {@code GLSurfaceView}, see
|
|
||||||
<a href="http://android-developers.blogspot.com/2009/04/introducing-glsurfaceview.html">
|
|
||||||
Introducing GLSurfaceView</a>.</p>
|
|
||||||
|
|
||||||
<p>The san-angeles sample application provides an example of how to perform these operations,
|
|
||||||
rendering each frame in native code. This sample is a small Android port of the excellent
|
|
||||||
<a href="http://jet.ro/visuals/san-angeles-observation/">San Angeles Observation</a> demo
|
|
||||||
program.</p>
|
|
||||||
|
|
||||||
<h3 id="a5">Android API level 5</h3>
|
|
||||||
<p>The NDK provides the following APIs for developing native code that runs on Android 2.0 system
|
|
||||||
images and above.</p>
|
|
||||||
|
|
||||||
<h4>OpenGL ES 2.0 library:</h4>
|
|
||||||
<p>The standard OpenGL ES 2.0 headers {@code <GLES2/gl2.h>} and {@code <GLES2/gl2ext.h>}
|
|
||||||
contain the declarations needed for performing OpenGL ES 2.0 rendering calls from native code.
|
|
||||||
These rendering calls provide the ability to use the GLSL language to define and use vertex and
|
|
||||||
fragment shaders.</p>
|
|
||||||
|
|
||||||
<p>To use OpenGL ES 2.0, link your native module to {@code /system/lib/libGLESv2.so} by
|
|
||||||
including the following line in your <a href="{@docRoot}ndk/guides/android_mk.html">
|
|
||||||
{@code Android.mk}</a> file:</p>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
LOCAL_LDLIBS := -lGLESv2
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>Not all devices support OpenGL ES 2.0. An app can query the OpenGL
|
|
||||||
ES version string and extension string to determine whether the current device
|
|
||||||
supports the features it needs. For information on how to perform this query, see the description of
|
|
||||||
<a href="https://www.khronos.org/opengles/sdk/docs/man/xhtml/glGetString.xml">
|
|
||||||
{@code glGetString()}</a> in the OpenGL specification.</p>
|
|
||||||
|
|
||||||
<p>Additionally, you must put a
|
|
||||||
<a href="http://developer.android.com/guide/topics/manifest/uses-feature-element.html">{@code
|
|
||||||
<uses-feature>}</a> tag in your manifest file to indicate which version of OpenGL ES your
|
|
||||||
application requires. For more information about the OpenGL ES settings for
|
|
||||||
{@code <uses-feature>}, see
|
|
||||||
<a href="http://developer.android.com/guide/topics/graphics/opengl.html#manifest">OpenGL ES</a>.</p>
|
|
||||||
|
|
||||||
<p>The hello-gl2 sample application provies a basic example of how to use OpenGL ES 2.0 with the
|
|
||||||
NDK.</p>
|
|
||||||
|
|
||||||
<p>The <a href="#egl">EGL APIs</a> are only available starting from API level 9. You can, however,
|
|
||||||
use the VM to perform some of the operations that you would get from those APIs. These operations
|
|
||||||
include surface creation and flipping. For an example of how to use {@code GLSurfaceView}, see
|
|
||||||
<a href="http://android-developers.blogspot.com/2009/04/introducing-glsurfaceview.html">
|
|
||||||
Introducing GLSurfaceView</a>.</p>
|
|
||||||
|
|
||||||
<p class="note"><strong>Note:</strong> The Android emulator does not support OpenGL ES 2.0 hardware
|
|
||||||
emulation. Running and testing code that uses this API requires a real device with hardware that can
|
|
||||||
support OpenGL ES 2.0.</p>
|
|
||||||
|
|
||||||
<h3 id="a8">Android API level 8</h3>
|
|
||||||
<p>The NDK provides the following APIs for developing native code that runs on Android 2.2 system
|
|
||||||
images and above.</p>
|
|
||||||
|
|
||||||
<h4>jnigraphics</h4>
|
|
||||||
<p>The {@code jnigraphics} library exposes a C-based interface that allows native code to reliably access
|
|
||||||
the pixel buffers of Java bitmap objects. The workflow for using {@code jnigraphics} is as follows:
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<ol type="1">
|
|
||||||
<li>Use {@code AndroidBitmap_getInfo()} to retrieve information from JNI, such as width and height,
|
|
||||||
about a given bitmap handle.</li>
|
|
||||||
|
|
||||||
<li>Use {@code AndroidBitmap_lockPixels()} to lock the pixel buffer and retrieve a pointer to it.
|
|
||||||
Doing so ensures that the pixels do not move until the app calls
|
|
||||||
{@code AndroidBitmap_unlockPixels()}.</li>
|
|
||||||
|
|
||||||
<li>In native code, modify the pixel buffer as appropriate for its pixel format, width, and other
|
|
||||||
characteristics.</li>
|
|
||||||
|
|
||||||
<li>Call {@code AndroidBitmap_unlockPixels()} to unlock the buffer.</li>
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
<p>To use {@code jnigraphics}, include the {@code <bitmap.h>} header in your source code, and
|
|
||||||
link against {@code jnigraphics} by including the following line in your
|
|
||||||
<a href="{@docRoot}ndk/guides/android_mk.html">{@code Android.mk}</a> file:</p>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
LOCAL_LDLIBS += -ljnigraphics
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>Additional details about this feature are in the comments of the {@code bitmap.h} file.
|
|
||||||
|
|
||||||
<h3 id="a9">Android API level 9</h3>
|
|
||||||
<p>The NDK provides the following APIs for developing native code that runs on Android 2.3 system
|
|
||||||
images and above.</p>
|
|
||||||
|
|
||||||
<h4 id="egl"> EGL</h4>
|
|
||||||
<p>EGL provides a native platform interface for allocating and managing OpenGLES surfaces.
|
|
||||||
For more information about its features, see <a href="http://www.khronos.org/egl">
|
|
||||||
EGL Native Platform Interface</a>.</p>
|
|
||||||
|
|
||||||
<p>EGL allows you to perform the following operations from native code:</p>
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li>List supported EGL configurations.</li>
|
|
||||||
<li>Allocate and release OpenGLES surfaces.</li>
|
|
||||||
<li>Swap or flip surfaces.</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<p>The following headers provide EGL functionality:</p>
|
|
||||||
<ul>
|
|
||||||
<li>{@code EGL/egl.h}: the main EGL API definitions.</li>
|
|
||||||
<li>{@code EGL/eglext.h}: EGL extension-related definitions.</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<p>To link against the system's EGL library, add the following line to your
|
|
||||||
<a href="{@docRoot}ndk/guides/android_mk.html">{@code Android.mk}</a> file:</p>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
LOCAL_LDLIBS += -lEGL
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<h4 id="osl">OpenSL ES</h4>
|
|
||||||
<p>Android native audio handling is based on the Khronos Group OpenSL ES 1.0.1 API.</p>
|
|
||||||
|
|
||||||
<p>The standard OpenSL ES headers {@code OpenSLES.h} and {@code OpenSLES_Platform.h} contain
|
|
||||||
the declarations necessary for performing audio input and output from the native side of Android.
|
|
||||||
The NDK distribution of the OpenSL ES also provides Android-specific extensions. For information
|
|
||||||
about these extensions, see the comments in {@code OpenSLES_Android.h} and
|
|
||||||
{@code OpenSLES_AndroidConfiguration.h}.</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p>The system library {@code libOpenSLES.so} implements the public native audio functions. Link
|
|
||||||
against it by adding the following line to your <a href="{@docRoot}ndk/guides/android_mk.html">
|
|
||||||
{@code Android.mk}</a> file:</p>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
LOCAL_LDLIBS += -lOpenSLES
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>For more information about the OpenSL ES API, refer to
|
|
||||||
{@code $NDK/docs/Additional_library_docs/opensles/index.html}, where {@code $NDK} is your NDK
|
|
||||||
installation root directory.</p>
|
|
||||||
|
|
||||||
<h4>Android native application APIs</h4>
|
|
||||||
<p>Starting from API level 9, you can write an entire Android app with native code, without using
|
|
||||||
any Java.</p>
|
|
||||||
|
|
||||||
<p class="note"><strong>Note: </strong>Writing your app in native code is not, in itself, enough
|
|
||||||
for your app to run in the VM. Moreover, your app must still access most features of the Android
|
|
||||||
platform via JNI.</p>
|
|
||||||
|
|
||||||
<p>This release provides the following native headers:</p>
|
|
||||||
<ul>
|
|
||||||
<li>{@code <native_activity.h>}</li>
|
|
||||||
<li>{@code <looper.h>}</li>
|
|
||||||
<li>{@code <input.h>}</li>
|
|
||||||
<li>{@code <keycodes.h>}</li>
|
|
||||||
<li>{@code <sensor.h>}</li>
|
|
||||||
<li>{@code <rect.h>}</li>
|
|
||||||
<li>{@code <window.h>}</li>
|
|
||||||
<li>{@code <native_window.h>}</li>
|
|
||||||
<li>{@code <native_window_jni.h>}</li>
|
|
||||||
<li>{@code <configuration.h>}</li>
|
|
||||||
<li>{@code <asset_manager.h>}</li>
|
|
||||||
<li>{@code <storage_manager.h>}</li>
|
|
||||||
<li>{@code <obb.h>}</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<p>For more information about these headers, see the
|
|
||||||
<a href="{@docRoot}ndk/reference/index.html">NDK API Reference documentation</a>, as well as
|
|
||||||
the comments in the headers, themselves. Also, for more information about the larger topic of
|
|
||||||
writing native apps, see <a href="{@docRoot}ndk/guides/concepts.html#naa">
|
|
||||||
Native Activities and Applications</a>.
|
|
||||||
|
|
||||||
<p>When you include one or more of these headers, you must also link against the
|
|
||||||
{@code libandroid.so} library. To link against {@code libandroid.so}, include the following line in
|
|
||||||
your <a href="{@docRoot}ndk/guides/android_mk.html"> {@code Android.mk}</a> file:</p>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
LOCAL_LDLIBS += -landroid
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<h3 id="a14">Android API level 14</h3>
|
|
||||||
<p>The NDK provides the following APIs for developing native code that runs on Android 4.0 system
|
|
||||||
images and above.</p>
|
|
||||||
|
|
||||||
<h4>OpenMAX AL</h4>
|
|
||||||
<p>Android native multimedia handling is based on Khronos Group OpenMAX AL 1.0.1 API.</p>
|
|
||||||
<p>The standard OpenMAX AL headers {@code <OMXAL/OpenMAXAL.h>} and
|
|
||||||
{@code <OMXAL/OpenMAXAL_Platform.h>} contain the declarations necessary for performing
|
|
||||||
multimedia output from the native side of Android.</p>
|
|
||||||
|
|
||||||
<p>The NDK distribution of OpenMAX AL also provides Android-specific extensions. For information
|
|
||||||
about these extensions, see the comments in {@code OpenMAXAL_Android.h}.</p>
|
|
||||||
|
|
||||||
<p>The system library {@code libOpenMAXAL.so} implements the public native multimedia functions.
|
|
||||||
To link against this library, include the following line in your
|
|
||||||
<a href="{@docRoot}ndk/guides/android_mk.html"> {@code Android.mk}</a> file:</p>
|
|
||||||
|
|
||||||
<pre class="fragment"> LOCAL_LDLIBS += -lOpenMAXAL
|
|
||||||
</pre><p>For more information about this topic, see {@code $NDK/docs/openmaxal/index.html},
|
|
||||||
where {@code $NDK} is the root directory of your NDK installation.</p>
|
|
||||||
|
|
||||||
<h4>OpenSL ES</h4>
|
|
||||||
<p>OpenSL ES support for this Android API level adds PCM support. For more information about
|
|
||||||
OpenSL ES support in the NDK, see <a href="#osl">OpenSL ES</a>.</p>
|
|
||||||
|
|
||||||
<h3 id="a18">Android API level 18</h3>
|
|
||||||
<p>The NDK provides the following APIs for developing native code that runs on Android 4.3 system
|
|
||||||
images and above.</p>
|
|
||||||
|
|
||||||
<h4>OpenGL ES 3.0</h4>
|
|
||||||
|
|
||||||
<p>The standard OpenGL ES 3.0 headers {@code gl3.h} and {@code gl3ext.h} contain the declarations
|
|
||||||
needed for performing OpenGL ES 3.0 rendering calls from native code. These rendering calls provide
|
|
||||||
the ability to use the GLSL language to define and use vertex and fragment shaders.
|
|
||||||
|
|
||||||
<p>To use OpenGL ES 3.0, link your native module against {@code /system/lib/libGLESv3.so} by
|
|
||||||
including the following line in your <a href="{@docRoot}ndk/guides/android_mk.html">
|
|
||||||
{@code Android.mk}</a> file:</p>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
LOCAL_LDLIBS := -lGLESv3
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>Not all devices support OpenGL ES 3.0. An app can query the OpenGL
|
|
||||||
ES version string and extension string to determine whether the current device
|
|
||||||
supports the features it needs. For information on how to perform this query, see the description of
|
|
||||||
<a href="https://www.khronos.org/opengles/sdk/docs/man/xhtml/glGetString.xml">
|
|
||||||
{@code glGetString()}</a> in the OpenGL specification.</p>
|
|
||||||
|
|
||||||
<p>Additionally, you must put a
|
|
||||||
<a href="http://developer.android.com/guide/topics/manifest/uses-feature-element.html">{@code
|
|
||||||
<uses-feature>}</a> tag in your manifest file to indicate which version of OpenGL ES your
|
|
||||||
application requires. For more information about the OpenGL ES settings for
|
|
||||||
{@code <uses-feature>}, see
|
|
||||||
<a href="http://developer.android.com/guide/topics/graphics/opengl.html#manifest">OpenGL ES</a>.</p>
|
|
||||||
|
|
||||||
<p>The gles3jni sample application provides a basic example of how to use OpenGL ES 3.0 with the
|
|
||||||
NDK.</p>
|
|
||||||
|
|
||||||
<p class="note"><strong>Note:</strong> The Android emulator does not support OpenGL ES 3.0 hardware
|
|
||||||
emulation. Running and testing code that uses this API requires a real device with hardware that can
|
|
||||||
support OpenGL ES 3.0.</p>
|
|
||||||
|
|
||||||
|
|
||||||
<h3 id="a18">Android API level 21</h3>
|
|
||||||
<p>The NDK provides the following APIs for developing native code that runs on Android 4.3 system
|
|
||||||
images and above.</p>
|
|
||||||
|
|
||||||
<h4>OpenGL ES 3.1</h4>
|
|
||||||
|
|
||||||
<p>The standard OpenGL ES 3.1 headers {@code gl31.h} and {@code gl3ext.h} contain the declarations
|
|
||||||
needed for performing OpenGL ES 3.1 rendering calls from native code. These rendering calls provide
|
|
||||||
the ability to use the GLSL language to define and use vertex and fragment shaders.
|
|
||||||
|
|
||||||
<p>To use OpenGL ES 3.1, link your native module against {@code /system/lib/libGLESv3.so} by
|
|
||||||
including the following line in your <a href="{@docRoot}ndk/guides/android_mk.html">
|
|
||||||
{@code Android.mk}</a> file:</p>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
LOCAL_LDLIBS := -lGLESv3
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>Not all devices support OpenGL ES 3.1. An app can query the OpenGL
|
|
||||||
ES version string and extension string to determine whether the current device
|
|
||||||
supports the features it needs. For information on how to perform this query, see the description of
|
|
||||||
<a href="https://www.khronos.org/opengles/sdk/docs/man/xhtml/glGetString.xml">
|
|
||||||
{@code glGetString()}</a> in the OpenGL specification.</p>
|
|
||||||
|
|
||||||
<p>Additionally, you must put a
|
|
||||||
<a href="http://developer.android.com/guide/topics/manifest/uses-feature-element.html">{@code
|
|
||||||
<uses-feature>}</a> tag in your manifest file to indicate which version of OpenGL ES your
|
|
||||||
application requires. For more information about the OpenGL ES settings for
|
|
||||||
{@code <uses-feature>}, see
|
|
||||||
<a href="http://developer.android.com/guide/topics/graphics/opengl.html#manifest">OpenGL ES</a>.</p>
|
|
||||||
|
|
||||||
<p>The gles3jni sample application provides a basic example of how to use OpenGL ES 3.1 with the
|
|
||||||
NDK.</p>
|
|
||||||
|
|
||||||
<p class="note"><strong>Note:</strong> The Android emulator does not support OpenGL ES 3.1 hardware
|
|
||||||
emulation. Running and testing code that uses this API requires a real device with hardware that can
|
|
||||||
support OpenGL ES 3.1.</p>
|
|
||||||
|
|
||||||
@@ -1,605 +0,0 @@
|
|||||||
page.title=Standalone Toolchain
|
|
||||||
@jd:body
|
|
||||||
|
|
||||||
<div id="qv-wrapper">
|
|
||||||
<div id="qv">
|
|
||||||
<h2>On this page</h2>
|
|
||||||
|
|
||||||
<ol>
|
|
||||||
<li><a href="#syt">Selecting Your Toolchain</a></li>
|
|
||||||
<li><a href="#sys">Selecting Your Sysroot</a></li>
|
|
||||||
<li><a href="#itc">Invoking the Compiler</a></li>
|
|
||||||
<li><a href="#wwc">Working with Clang</a></li>
|
|
||||||
<li><a href="#abi">ABI Compatibility</a></li>
|
|
||||||
<li><a href="#war">Warnings and Limitations</a></li>
|
|
||||||
</ol>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<p>You can use the toolchains provided with the Android NDK independently, or as plug-ins
|
|
||||||
with an existing IDE. This flexibility
|
|
||||||
can be useful if you already have your own build system, and only need the ability to invoke the
|
|
||||||
cross-compiler in order to add support to Android for it.</p>
|
|
||||||
|
|
||||||
<p>A typical use case is invoking the configure script of an open-source library that expects a
|
|
||||||
cross-compiler in the {@code CC} environment variable.</p>
|
|
||||||
|
|
||||||
<p class="note"><strong>Note:</strong> This page assumes significant understanding of
|
|
||||||
compiling, linking, and low-level architecture. In addition, the techniques it describes are
|
|
||||||
unnecessary for most use cases. In most cases, we recommend that you forego using a standalone
|
|
||||||
toolchain, and instead stick to the NDK build system.</p>
|
|
||||||
|
|
||||||
<h2 id="syt">Selecting Your Toolchain</h2>
|
|
||||||
<p>Before anything else, you need to decide which processing architecture your standalone toolchain
|
|
||||||
is going to target. Each architecture corresponds to a different toolchain name, as Table 1
|
|
||||||
shows.</p>
|
|
||||||
|
|
||||||
<p class="table-caption" id="table1">
|
|
||||||
<strong>Table 1.</strong> {@code APP_ABI} settings for different instruction sets.</p>
|
|
||||||
<table>
|
|
||||||
<tr>
|
|
||||||
<th scope="col">Architecture</th>
|
|
||||||
<th scope="col">Toolchain name</th>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>ARM-based</td>
|
|
||||||
<td>{@code arm-linux-androideabi-<gcc-version>}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>x86-based</td>
|
|
||||||
<td>{@code x86-<gcc-version>}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>MIPS-based</td>
|
|
||||||
<td>{@code mipsel-linux-android-<gcc-version>}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>ARM64-based</td>
|
|
||||||
<td>{@code aarch64-linux-android-<gcc-version>}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>X86-64-based</td>
|
|
||||||
<td>{@code x86_64-<gcc-version>}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>MIPS64-based</td>
|
|
||||||
<td>{@code mips64el-linux-android--<gcc-version>}</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h2 id="sys">Selecting Your Sysroot</h2>
|
|
||||||
<p>The next thing you need to do is define your <i>sysroot</i> (A sysroot is a directory containing
|
|
||||||
the system headers and libraries for your target). To define the sysroot, you must must know the
|
|
||||||
Android API level you want to target for native support; available native APIs vary by Android API
|
|
||||||
level.</p>
|
|
||||||
|
|
||||||
<p>Native APIs for the respective <a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html">
|
|
||||||
Android API levels</a> reside under {@code $NDK/platforms/}; each API-level
|
|
||||||
directory, in turn, contains subdirectories for the various CPUs and architectures. The
|
|
||||||
following example shows how to define a <em>sysroot</em> for a build targeting Android 5.0
|
|
||||||
(API level 21), for ARM architecture:</p>
|
|
||||||
|
|
||||||
<pre class="no-pretty-print">
|
|
||||||
SYSROOT=$NDK/platforms/android-21/arch-arm
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
For more detail about the Android API levels and the respective native APIs they support, see
|
|
||||||
<a href={@docRoot}ndk/guides/stable_apis.html>Android NDK Native APIs</a>.
|
|
||||||
|
|
||||||
<h2 id="itc">Invoking the Compiler</h2>
|
|
||||||
|
|
||||||
<p>There are two ways to invoke the compiler. One method is simple, and leaves most of the lifting
|
|
||||||
to the build system. The other is more advanced, but provides more flexibility.</p>
|
|
||||||
|
|
||||||
<h3 id="sm">Simple method</h3>
|
|
||||||
<p>The simplest way to build is by invoking the appropriate compiler directly from the command
|
|
||||||
line, using the {@code --sysroot} option to indicate the location of the system files for the
|
|
||||||
platform you're targeting. For example:</p>
|
|
||||||
|
|
||||||
<pre class="no-pretty-print">
|
|
||||||
export CC="$NDK/toolchains/arm-linux-androideabi-4.8/prebuilt/ \
|
|
||||||
linux-x86/bin/arm-linux-androideabi-gcc-4.8 --sysroot=$SYSROOT"
|
|
||||||
$CC -o foo.o -c foo.c
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>While this method is simple, it lacks in flexibility: It does not allow you to use any C++ STL
|
|
||||||
(STLport, libc++, or the GNU libstdc++) with it. It also does not support exceptions or RTTI.</p>
|
|
||||||
|
|
||||||
<p>For Clang, you need to perform an additional two steps:</p>
|
|
||||||
<ul>
|
|
||||||
<ol type="1">
|
|
||||||
<li>Add the appropriate {@code -target} for the target architecture, as Table 2 shows.</li>
|
|
||||||
|
|
||||||
<p class="table-caption" id="table2">
|
|
||||||
<strong>Table 2.</strong> Architectures and corresponding values for {@code -target}.</p>
|
|
||||||
<table>
|
|
||||||
<tr>
|
|
||||||
<th scope="col">Architecture</th>
|
|
||||||
<th scope="col">Value</th>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>armeabi</td>
|
|
||||||
<td>{@code -target armv5te-none-linux-androideabi}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>armeabi-v7a</td>
|
|
||||||
<td>{@code -target armv7-none-linux-androideabi}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>arm64-v8a</td>
|
|
||||||
<td>{@code -target aarch64-none-linux-android}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>x86</td>
|
|
||||||
<td>{@code -target i686-none-linux-android}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>x86_64</td>
|
|
||||||
<td>{@code -target x86_64-none-linux-android}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>mips</td>
|
|
||||||
<td>{@code -target mipsel-none-linux-android}</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<li>Add assembler and linker support by adding the {@code -gcc-toolchain} option, as in the
|
|
||||||
following example:</li>
|
|
||||||
<pre class="no-pretty-print">
|
|
||||||
-gcc-toolchain $NDK/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64
|
|
||||||
</pre>
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
Ultimately, a command to compile using Clang might look like this:
|
|
||||||
|
|
||||||
<pre class="no-pretty-print">
|
|
||||||
export CC="$NDK/toolchains/arm-linux-androideabi-4.8/prebuilt/ \
|
|
||||||
linux-x86/bin/arm-linux-androideabi-gcc-4.8 --sysroot=$SYSROOT" -target \
|
|
||||||
armv7-none-linux-androideabi \
|
|
||||||
-gcc-toolchain $NDK/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64"
|
|
||||||
$CC -o foo.o -c foo.c
|
|
||||||
</pre>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3>Advanced method</h3>
|
|
||||||
<p>The NDK provides the {@code make-standalone-toolchain.sh} shell script to allow you to perform a
|
|
||||||
customized toolchain installation from the command line. This approach affords you more flexibility
|
|
||||||
than the procedure described in <a href="#sm">Simple method</a>.</p>
|
|
||||||
|
|
||||||
<p>The script is located in the {@code $NDK/build/tools/} directory, where {@code $NDK} is the
|
|
||||||
installation root for the NDK. An example of the use of this script appears below:</p>
|
|
||||||
|
|
||||||
<pre class="no-pretty-print">
|
|
||||||
$NDK/build/tools/make-standalone-toolchain.sh \
|
|
||||||
--arch=arm --platform=android-21 --install-dir=/tmp/my-android-toolchain
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>This command creates a directory named {@code /tmp/my-android-toolchain/}, containing a copy of
|
|
||||||
the {@code android-21/arch-arm} sysroot, and of the toolchain binaries for a 32-bit ARM
|
|
||||||
architecture.</p>
|
|
||||||
|
|
||||||
<p>Note that the toolchain binaries do not depend on or contain host-specific paths, in other words,
|
|
||||||
you can install them in any location, or even move them if you need to.</p>
|
|
||||||
|
|
||||||
<p>By default, the build system uses the 32-bit, ARM-based GCC 4.8 toolchain. You can specify a
|
|
||||||
different value, however, by specifying {@code --arch=<toolchain>} as an option.
|
|
||||||
Table 3 shows the values to use for other toolchains:
|
|
||||||
|
|
||||||
<p class="table-caption" id="table3">
|
|
||||||
<strong>Table 3.</strong> Toolchains and corresponding values, using {@code --arch}.</p>
|
|
||||||
<table>
|
|
||||||
<tr>
|
|
||||||
<th scope="col">Toolchain</th>
|
|
||||||
<th scope="col">Value</th>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>mips64 compiler</td>
|
|
||||||
<td>{@code --arch=mips64}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>mips GCC 4.8 compiler</td>
|
|
||||||
<td>{@code --arch=mips}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>x86 GCC 4.8 compiler</td>
|
|
||||||
<td>{@code --arch=x86}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>x86_64 GCC 4.8 compiler</td>
|
|
||||||
<td>{@code --arch=x86_64}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>mips GCC 4.8 compiler</td>
|
|
||||||
<td>{@code --arch=mips}</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<p>Alternatively, you can use the {@code --toolchain=<toolchain>} option. Table 4 shows the
|
|
||||||
values you can specify for {@code <toolchain>}:</p>
|
|
||||||
|
|
||||||
<p class="table-caption" id="table4">
|
|
||||||
<strong>Table 4.</strong> Toolchains and corresponding values, using {@code --toolchain}.</p>
|
|
||||||
<table>
|
|
||||||
<tr>
|
|
||||||
<th scope="col">Toolchain</th>
|
|
||||||
<th scope="col">Value</th>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td>arm</td>
|
|
||||||
<td>
|
|
||||||
<li>{@code --toolchain=arm-linux-androideabi-4.8}</li>
|
|
||||||
<li>{@code --toolchain=arm-linux-androideabi-4.9}</li>
|
|
||||||
<li>{@code --toolchain=arm-linux-android-clang3.5}</li>
|
|
||||||
<li>{@code --toolchain=arm-linux-android-clang3.6}</li>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>x86</td>
|
|
||||||
<td>
|
|
||||||
<li>{@code --toolchain=x86-linux-android-4.8}</li>
|
|
||||||
<li>{@code --toolchain=x86-linux-android-4.9}</li>
|
|
||||||
<li>{@code --toolchain=x86-linux-android-clang3.5}</li>
|
|
||||||
<li>{@code --toolchain=x86-linux-android-clang3.6}</li>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>mips</td>
|
|
||||||
<td>
|
|
||||||
<li>{@code --toolchain=mips-linux-android-4.8}</li>
|
|
||||||
<li>{@code --toolchain=mips-linux-android-4.9}</li>
|
|
||||||
<li>{@code --toolchain=mips-linux-android-clang3.5}</li>
|
|
||||||
<li>{@code --toolchain=mips-linux-android-clang3.6}</li>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td>arm64</td>
|
|
||||||
<td>
|
|
||||||
<li>{@code --toolchain=aarch64-linux-android-4.9}</li>
|
|
||||||
<li>{@code --toolchain=aarch64-linux-android-clang3.5}</li>
|
|
||||||
<li>{@code --toolchain=aarch64-linux-android-clang3.6}</li>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>x86_64</td>
|
|
||||||
<td>
|
|
||||||
<li>{@code --toolchain=x86_64-linux-android-4.9}</li>
|
|
||||||
<li>{@code --toolchain=x86_64-linux-android-clang3.5}</li>
|
|
||||||
<li>{@code --toolchain=x86_64-linux-android-clang3.6}</li>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>mips64</td>
|
|
||||||
<td>
|
|
||||||
<li>{@code --toolchain=mips64el-linux-android-4.9}</li>
|
|
||||||
<li>{@code --toolchain=mips64el-linux-android-clang3.5}</li>
|
|
||||||
<li>{@code --toolchain=mips64el-linux-android-clang3.6}</li>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<p class="note"><strong>Note: </strong> Table 4 is not an exhaustive list. Other combinations may
|
|
||||||
also be valid, but are unverified.</p>
|
|
||||||
|
|
||||||
<p>You can also copy Clang/LLVM 3.6, using one of two methods: You can append {@code -clang3.6} to
|
|
||||||
the {@code --toolchain} option, so that the {@code --toolchain} option looks like the following
|
|
||||||
example:
|
|
||||||
|
|
||||||
<pre class="no-pretty-print">
|
|
||||||
--toolchain=arm-linux-androideabi-clang3.6
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>You can also add {@code -llvm-version=3.6} as a separate option on the command
|
|
||||||
line.</p>
|
|
||||||
|
|
||||||
<p class="note"><strong>Note: </strong>Instead of specifying a specific version, you can also
|
|
||||||
use {@code <version>}, which defaults
|
|
||||||
to the highest available version of Clang.</p>
|
|
||||||
|
|
||||||
<p>By default, the build system builds for a 32-bit host toolchain. You can specify a 64-bit
|
|
||||||
host toolchain instead. Table 5 shows the value to use with {@code -system} for different
|
|
||||||
platforms.</p>
|
|
||||||
|
|
||||||
<p class="table-caption" id="table5">
|
|
||||||
<strong>Table 5.</strong> Host toolchains and corresponding values, using {@code -system}.</p>
|
|
||||||
<table>
|
|
||||||
<tr>
|
|
||||||
<th scope="col">Host toolchain</th>
|
|
||||||
<th scope="col">Value</th>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>64-bit Linux</td>
|
|
||||||
<td>{@code -system=linux-x86_64}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>64-bit MacOSX</td>
|
|
||||||
<td>{@code -system=darwin-x86_64}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>64-bit Windows</td>
|
|
||||||
<td>{@code -system=windows-x86_64}</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
For more information on specifying a 64- or 32-bit instruction host toolchain, see
|
|
||||||
<a href="{@docRoot}ndk/guides/ndk-build.html#6432">64-Bit and 32-Bit Toolchains</a>.
|
|
||||||
|
|
||||||
<p>You may specify {@code --stl=stlport} to copy {@code libstlport} instead of the default
|
|
||||||
{@code libgnustl}. If you do so, and you wish to link against the shared library, you must
|
|
||||||
explicitly use {@code -lstlport_shared}. This requirement is similar to having to use
|
|
||||||
{@code -lgnustl_shared} for GNU {@code libstdc++}.</p>
|
|
||||||
|
|
||||||
<p>Similarly, you can specify {@code --stl=libc++} to copy the LLVM libc++ headers and libraries.
|
|
||||||
To link against the shared library, you must explicitly use -lc++_shared.</p>
|
|
||||||
|
|
||||||
<p>You can make these settings directly, as in the following example:</p>
|
|
||||||
|
|
||||||
<pre class="no-pretty-print">
|
|
||||||
export PATH=/tmp/my-android-toolchain/bin:$PATH
|
|
||||||
export CC=arm-linux-androideabi-gcc # or export CC=clang
|
|
||||||
export CXX=arm-linux-androideabi-g++ # or export CXX=clang++
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>Note that if you omit the {@code -install-dir} option, the {@code make-standalone-toolchain.sh}
|
|
||||||
shell script creates a tarball in {@code tmp/ndk/<toolchain-name>.tar.bz2}. This tarball makes
|
|
||||||
it easy to archive, as well as to redistribute the binaries.</p>
|
|
||||||
|
|
||||||
<p>This standalone toolchain provides an additional benefit, as well, in that it contains a working
|
|
||||||
copy of a C++ STL library, with working exceptions and RTTI support.</p>
|
|
||||||
|
|
||||||
<p>For more options and details, use {@code --help}.</p>
|
|
||||||
|
|
||||||
<h2 id="wwc">Working with Clang</h2>
|
|
||||||
<p>You can install Clang binaries in the standalone installation by using the
|
|
||||||
{@code --llvm-version=<version>} option. {@code <version>} is a LLVM/Clang version
|
|
||||||
number, such as {@code 3.5} or {@code 3.6}. For example:
|
|
||||||
|
|
||||||
<pre class="no-pretty-print">
|
|
||||||
build/tools/make-standalone-toolchain.sh \
|
|
||||||
--install-dir=/tmp/mydir \
|
|
||||||
--toolchain=arm-linux-androideabi-4.8 \
|
|
||||||
--llvm-version=3.6
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>Note that Clang binaries are copied along with the GCC ones, because they rely on the same
|
|
||||||
assembler, linker, headers, libraries, and C++ STL implementation.</p>
|
|
||||||
|
|
||||||
<p>This operation also installs two scripts, named {@code clang} and {@code clang++}, under
|
|
||||||
{@code <install-dir>/bin/@}. These scripts invoke the real {@code clang} binary with default
|
|
||||||
target architecture flags. In other words, they should work without any modification, and you should
|
|
||||||
be able to use them in your own builds by just setting the {@code CC} and {@code CXX} environment
|
|
||||||
variables to point to them.</p>
|
|
||||||
|
|
||||||
<h4>Invoking Clang</h4>
|
|
||||||
<p>In an ARM standalone installation built with {@code llvm-version=3.6}, invoking
|
|
||||||
<a href="http://clang.llvm.org/">Clang</a> on a Unix system takes the form of a single line. For
|
|
||||||
instance:</p>
|
|
||||||
|
|
||||||
<pre class="no-pretty-print">
|
|
||||||
`dirname $0`/clang36 -target armv5te-none-linux-androideabi "$@"
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p><code>clang++</code> invokes <code>clang++31</code> in the same way.</p>
|
|
||||||
|
|
||||||
<h4>Clang targets with ARM</h4>
|
|
||||||
|
|
||||||
<p>When building for ARM, Clang changes the target based on the presence of the
|
|
||||||
{@code -march=armv7-a} and/or {@code -mthumb} options:</p>
|
|
||||||
|
|
||||||
<p class="table-caption" id="table5">
|
|
||||||
<strong>Table 5.</strong> Specifiable {@code -march} values and their resulting targets.</p>
|
|
||||||
<table>
|
|
||||||
<tr>
|
|
||||||
<th scope="col">{@code -march} value</th>
|
|
||||||
<th scope="col">Resulting target</th>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>{@code -march=armv7-a}</td>
|
|
||||||
<td>{@code armv7-none-linux-androideabi}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>{@code -mthumb}</td>
|
|
||||||
<td>{@code thumb-none-linux-androideabi}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>Both {@code -march=armv7-a} and {@code -mthumb}</td>
|
|
||||||
<td>{@code thumbv7-none-linux-androideabi}</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<p>You may also override with your own {@code -target} if you wish.</p>
|
|
||||||
|
|
||||||
<p>The {@code -gcc-toolchain} option is unnecessary because, in a standalone package,
|
|
||||||
Clang locates {@code as} and {@code ld} in a predefined relative location. <p>
|
|
||||||
|
|
||||||
<p>{@code clang} and {@code clang++} should be easy drop-in replacements for {@code gcc} and
|
|
||||||
{@code g++} in a makefile. When in doubt, add the following options to verify that they are
|
|
||||||
working properly:</p>
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li>{@code -v} to dump commands associated with compiler driver issues</li>
|
|
||||||
<li>{@code -###} to dump command line options, including implicitly predefined ones.</li>
|
|
||||||
<li>{@code -x c < /dev/null -dM -E} to dump predefined preprocessor definitions</li>
|
|
||||||
<li>{@code -save-temps} to compare {@code *.i} or {@code *.ii} preprocessed files.</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<p>For more information about Clang, see
|
|
||||||
<a href="http://clang.llvm.org/">http://clang.llvm.org/</a>, especially the GCC compatibility
|
|
||||||
section.</p>
|
|
||||||
|
|
||||||
|
|
||||||
<h2 id="abi">ABI Compatibility</h2>
|
|
||||||
<p>The machine code that the ARM toolchain generates should be compatible with the official Android
|
|
||||||
{@code armeabi} <a href="{@docRoot}ndk/guides/abis.html">ABI</a> by default.</p>
|
|
||||||
|
|
||||||
<p>We recommend use of the {@code -mthumb} compiler flag to force the generation of 16-bit Thumb-1
|
|
||||||
instructions (the default being 32-bit ARM instructions).</p>
|
|
||||||
|
|
||||||
<p>If you want to target the armeabi-v7a ABI, you must set the following flags: </p>
|
|
||||||
|
|
||||||
<pre class="no-pretty-print">
|
|
||||||
CFLAGS= -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>The first flag enables Thumb-2 instructions. The second flag enables hardware-FPU instructions
|
|
||||||
while ensuring that the system passes floating-point parameters in core registers, which is critical
|
|
||||||
for ABI compatibility.</p>
|
|
||||||
|
|
||||||
<p class="note"><strong>Note: </strong>In versions of the NDK prior to r9b, do not use these flags
|
|
||||||
separately. You must set all or none of them. Otherwise, unpredictable behavior and crashes may
|
|
||||||
result.</p>
|
|
||||||
|
|
||||||
<p>To use NEON instructions, you must change the {@code -mfpu} compiler flag:</p>
|
|
||||||
|
|
||||||
<pre class="no-pretty-print">
|
|
||||||
CFLAGS= -march=armv7-a -mfloat-abi=softfp -mfpu=neon
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>Note that this setting forces the use of {@code VFPv3-D32}, per the ARM specification.</p>
|
|
||||||
|
|
||||||
<p>Also, make sure to provide the following two flags to the linker:</p>
|
|
||||||
|
|
||||||
<pre class="no-pretty-print">
|
|
||||||
LDFLAGS= -march=armv7-a -Wl,--fix-cortex-a8
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>The first flag instructs the linker to pick {@code libgcc.a}, {@code libgcov.a}, and
|
|
||||||
{@code crt*.o}, which are tailored for armv7-a. The 2nd flag is required as a workaround for a CPU
|
|
||||||
bug in some Cortex-A8 implementations.</p>
|
|
||||||
|
|
||||||
<p>Since NDK version r9b, all Android native APIs taking or returning double or float values have
|
|
||||||
{@code attribute((pcs("aapcs")))} for ARM. This makes it possible to compile user code in
|
|
||||||
{@code -mhard-float} (which implies {@code -mfloat-abi=hard}), and still link with the Android
|
|
||||||
native APIs that comply with the softfp ABI. For more information on this, see the comments in
|
|
||||||
{@code $NDK/tests/device/hard-float/jni/Android.mk}.</p>
|
|
||||||
|
|
||||||
<p>If you want to use NEON intrinsics on x86, the build system can translate them to the native x86
|
|
||||||
SSE intrinsics using a special C/C++ language header with the same name, {@code arm_neon.h}, as the
|
|
||||||
standard ARM NEON intrinsics header.</p>
|
|
||||||
|
|
||||||
<p>By default, the x86 ABI supports SIMD up to SSSE3, and the header covers ~93% of (1869 of 2009)
|
|
||||||
NEON functions.</p>
|
|
||||||
|
|
||||||
<p>You don't have to use any specific compiler flag when targeting the MIPS ABI.</p>
|
|
||||||
|
|
||||||
<p>To learn more about ABI support, see <a href="{@docRoot}ndk/guides/x86.html">x86 Support</a>.</p>
|
|
||||||
|
|
||||||
<h2 id="war">Warnings and Limitations</h2>
|
|
||||||
<h3>Windows support</h3>
|
|
||||||
<p>The Windows binaries do not depend on Cygwin. This lack of dependency makes them faster. The
|
|
||||||
cost, however, is that they do not understand Cygwin path specifications like
|
|
||||||
{@code cygdrive/c/foo/bar}, as opposed to {@code C:/foo/bar}.</p>
|
|
||||||
|
|
||||||
<p>The NDK build system ensures that all paths passed to the compiler from Cygwin are automatically
|
|
||||||
translated, and manages other complexities, as well. If you have a custom build system,
|
|
||||||
you may need to resolve these complexities yourself.</p>
|
|
||||||
|
|
||||||
<p>For information on contributing to support for Cygwin/MSys, visit the android-ndk
|
|
||||||
<a href="https://groups.google.com/forum/#!forum/android-ndk">forum</a>.</p>
|
|
||||||
|
|
||||||
<h3>wchar_t support</h3>
|
|
||||||
|
|
||||||
<p>The Android platform did not really support {@code wchar_t} until Android 2.3 (API level 9). This
|
|
||||||
fact has several ramifications:</p>
|
|
||||||
<ul>
|
|
||||||
<li>If you target platform Android 2.3 or higher, the size of {@code wchar_t} is 4 bytes, and most
|
|
||||||
{@code wide-char} functions are available in the C library (with the exception of multi-byte
|
|
||||||
encoding/decoding functions and {@code wsprintf}/{@code wsscanf}).</li>
|
|
||||||
|
|
||||||
<li>If you target any lower API level, the size of {@code wchar_t} is 1 byte, and none of the
|
|
||||||
wide-char functions works.</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<p>We recommend that you get rid of any dependencies on the {@code wchar_t} type, and switch to
|
|
||||||
better representations. The support provided in Android is only there to help you migrate existing
|
|
||||||
code.</p>
|
|
||||||
|
|
||||||
<h3>Exceptions, RTTI, and STL</h3>
|
|
||||||
<p>The toolchain binaries support C++ exceptions and RTTI by default. To disable C++ exceptions
|
|
||||||
and RTTI when building sources (to generate lighter-weight machine code, for example), use
|
|
||||||
{@code -fno-exceptions} and {@code -fno-rtti}.</p>
|
|
||||||
|
|
||||||
<p>To use these features in conjunction with GNU libstdc++, you must explicitly link with libsupc++.
|
|
||||||
To do so, use {@code -lsupc++} when linking binaries. For example:</p>
|
|
||||||
|
|
||||||
<pre class="no-pretty-print">
|
|
||||||
arm-linux-androideabi-g++ .... -lsupc++
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>You do not need to do this when using the STLport or libc++ library.</p>
|
|
||||||
|
|
||||||
<h3>C++ STL support</h3>
|
|
||||||
<p>The standalone toolchain includes a copy of a C++ Standard Template Library implementation. This
|
|
||||||
implementation is either for GNU libstdc++, STLport, or libc++, depending on what you specify for the
|
|
||||||
{@code --stl=<name>} option described previously. To use this implementation of STL, you need
|
|
||||||
to link your project with the proper library:</p>
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
Use {@code -lstdc++} to link against the static library version of any implementation. Doing so
|
|
||||||
ensures that all required C++ STL code is included into your final binary. This method is ideal if
|
|
||||||
you are only generating a single shared library or executable.</p>
|
|
||||||
|
|
||||||
<p>This is the method that we recommend.</p>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li>Alternatively, use {@code -lgnustl_shared} to link against the shared library version of GNU
|
|
||||||
{@code libstdc++}. If you use this option, you must also make sure to copy
|
|
||||||
{@code libgnustl_shared.so} to your device in order for your code to load properly. Table 6 shows
|
|
||||||
where this file is for each toolchain type.
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<p class="note"><strong>Note: </strong>GNU libstdc++ is licensed under the GPLv3 license, with a
|
|
||||||
linking exception. If you cannot comply with its requirements, you cannot redistribute the
|
|
||||||
shared library in your project.</p>
|
|
||||||
|
|
||||||
|
|
||||||
<li>Use {@code -lstlport_shared} to link against the shared library version of STLport. When you do
|
|
||||||
so, you need to make sure that you also copy {@code libstlport_shared.so} to your device in order
|
|
||||||
for your code to load properly. Table 6 shows where this file is for each toolchain:</li>
|
|
||||||
|
|
||||||
<p class="table-caption" id="table6">
|
|
||||||
<strong>Table 6.</strong> Specifiable {@code -march} values and their resulting targets.</p>
|
|
||||||
<table>
|
|
||||||
<tr>
|
|
||||||
<th scope="col">Toolchain</th>
|
|
||||||
<th scope="col">Location</th>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>arm</td>
|
|
||||||
<td>{@code $TOOLCHAIN/arm-linux-androideabi/lib/}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>arm64</td>
|
|
||||||
<td>{@code $TOOLCHAIN/aarch64-linux-android/lib/}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>x86</td>
|
|
||||||
<td>{@code $TOOLCHAIN/i686-linux-android/lib/}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>x86_64</td>
|
|
||||||
<td>{@code $TOOLCHAIN/x86_64-linux-android/lib/}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>mips</td>
|
|
||||||
<td>{@code $TOOLCHAIN/mipsel-linux-android/lib/}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>mips64</td>
|
|
||||||
<td>{@code $TOOLCHAIN/mips64el-linux-android/lib/}</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<p class="note"><strong>Note: </strong>If your project contains multiple shared libraries or
|
|
||||||
executables, you must link against a shared-library STL implementation. Otherwise, the build
|
|
||||||
system does not define certain global uniquely, which can result in unpredictable runtime behavior.
|
|
||||||
This behavior may include crashes and failure to properly catch exceptions.</p>
|
|
||||||
|
|
||||||
<p>The reason the shared version of the libraries is not simply called {@code libstdc++.so} is that
|
|
||||||
this name would conflict at runtime with the system's own minimal C++ runtime. For this reason,
|
|
||||||
the build system enforces a new name for the GNU ELF library. The static library does not have
|
|
||||||
this problem.</p>
|
|
||||||
@@ -1,52 +0,0 @@
|
|||||||
page.title=Support for 64-bit x86
|
|
||||||
@jd:body
|
|
||||||
|
|
||||||
<div id="qv-wrapper">
|
|
||||||
<div id="qv">
|
|
||||||
<h2>On this page</h2>
|
|
||||||
|
|
||||||
<ol>
|
|
||||||
<li><a href="#over">Overview</a></li>
|
|
||||||
<li><a href="#st">Standalone Toolchain</a></li>
|
|
||||||
<li><a href="#comp">Compatibilty</a></li>
|
|
||||||
</ol>
|
|
||||||
</li>
|
|
||||||
</ol>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<p>The Android NDK supports the {@code x86_64} ABI. This ABI allows native code to run on
|
|
||||||
Android-based devices using CPUs that support the 64-bit x86 instruction set.</p>
|
|
||||||
|
|
||||||
<h2 id="over">Overview</h2>
|
|
||||||
<p>To generate 64-bit machine code for x86, add {@code x86_64} to the {@code APP_ABI} definition in
|
|
||||||
your {@code Application.mk} file. For example:
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
APP_ABI := x86_64
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
For more information on how to specify values for {@code APP_ABI}, see
|
|
||||||
<a href="{@docRoot}ndk/guides/application_mk.html">Application.mk</a>.</p>
|
|
||||||
|
|
||||||
<p>The build system places libraries generated for the {@code x86_64} ABI into
|
|
||||||
{@code $PROJECT/libs/x86_64/} on your host machine, where {@code $PROJECT} is the root directory
|
|
||||||
of your project. It also embeds them in your APK, under {@code /lib/x86_64/}.</p>
|
|
||||||
|
|
||||||
<p>The Android package manager extracts these libraries when installing your APK on a compatible
|
|
||||||
64-bit, x86-powered device, placing them under your app's private data directory.</p>
|
|
||||||
|
|
||||||
<p>In the Google Play store, the server filters applications so that a consumer sees only the native
|
|
||||||
libraries that run on the CPU powering his or her device.</p>
|
|
||||||
|
|
||||||
<h2 id="st">Standalone Toolchain</h2>
|
|
||||||
|
|
||||||
<p>You can use the 64-bit x86 toolchain in standalone mode with the NDK. For more
|
|
||||||
information about doing so, see <a href="{@docRoot}ndk/guides/standalone_toolchain.html">
|
|
||||||
Standalone Toolchain</a>, under the "Advanced method" section.
|
|
||||||
|
|
||||||
<h2 id="comp">Compatibility</h2>
|
|
||||||
<p>The NDK provides native versions of Android APIs for 64-bit x86 machine code starting from
|
|
||||||
Android 5.0 (Android API level 21). If your project files target an older API level, but include
|
|
||||||
{@code x86_64} as a targeted platform, the NDK build script automatically selects the right set of
|
|
||||||
native platform headers and libraries for you.</p>
|
|
||||||
@@ -1,215 +0,0 @@
|
|||||||
page.title=x86 Support
|
|
||||||
@jd:body
|
|
||||||
|
|
||||||
<div id="qv-wrapper">
|
|
||||||
<div id="qv">
|
|
||||||
<h2>On this page</h2>
|
|
||||||
|
|
||||||
<ol>
|
|
||||||
<li><a href="#over">Overview</a></li>
|
|
||||||
<li><a href="#an">ARM NEON Intrinsics Support</a></li>
|
|
||||||
<li><a href="#st">Standalone Toolchain</a></li>
|
|
||||||
<li><a href="#comp">Compatibility</a></li>
|
|
||||||
</ol>
|
|
||||||
</li>
|
|
||||||
</ol>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<p>The NDK includes support for the {@code x86} ABI, which allows native code to run on
|
|
||||||
Android-based devices running on CPUs supporting the IA-32 instruction set.</p>
|
|
||||||
|
|
||||||
<h2 id="over">Overview</h2>
|
|
||||||
<p>To generate x86 machine code, add {@code x86} to the {@code APP_ABI} definition in your
|
|
||||||
<a href="{@docRoot}ndk/guides/application_mk.html">{@code Application.mk}</a> file. For example:</p>
|
|
||||||
|
|
||||||
<pre class="no-pretty-print">
|
|
||||||
APP_ABI := armeabi armeabi-v7a x86
|
|
||||||
</pre
|
|
||||||
|
|
||||||
<p>For more information about defining the {@code APP_ABI} variable, see
|
|
||||||
<a href="{@docRoot}ndk/guides/application_mk.html">{@code Application.mk}</a>.</p>
|
|
||||||
|
|
||||||
<p>The build system places generated libraries into {@code $PROJECT/libs/x86/}, where
|
|
||||||
{@code $PROJECT} represents your project's root directory, and embeds them in your APK under
|
|
||||||
{@code /lib/mips/}.</p>
|
|
||||||
|
|
||||||
<p>The Android package extracts these libraries when installing your APK on a compatible x86-based
|
|
||||||
device, placing them under your app's private data directory.</p>
|
|
||||||
|
|
||||||
<p>In the Google Play store, the server filters applications so that a consumer sees only the native
|
|
||||||
libraries that run on the CPU powering his or her device.</p>
|
|
||||||
|
|
||||||
<h2 id="an">x86 Support for ARM NEON Intrinsics</h2>
|
|
||||||
<p>Support for ARM NEON intrinsics is provided in the form of C/C++ language headers with the same
|
|
||||||
name as the standard ARM NEON intrinsics header, {@code arm_neon.h}. These headers are available for
|
|
||||||
all NDK x86 toolchains. They translate NEON intrinsics to native x86 SSE ones.</p>
|
|
||||||
|
|
||||||
<p>Characteristics of this solution include the following:</p>
|
|
||||||
<ul>
|
|
||||||
<li>Default use of SSE through SSSE3 for porting ARM NEON to Intel SSE, covering ~93%
|
|
||||||
(1869 of total 2009) of all NEON functions.</li>
|
|
||||||
<li>Redefinition of ARM NEON 128 bit vectors into the equivalent x86 SIMD data.</li>
|
|
||||||
<li>Redefinition of some functions from ARM NEON to Intel SSE if a 1:1 correspondence exists.</li>
|
|
||||||
<li>Implementation of some ARM NEON functions using Intel SIMD if it will yield a performant result.
|
|
||||||
</li>
|
|
||||||
<li>Implementation of some of the remaining NEON functions using the serial solution, and issuing
|
|
||||||
the corresponding "low performance" compiler warning.</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Performance</h3>
|
|
||||||
<p>In most cases, you should be able to attain performance similar to what you would get from ARM
|
|
||||||
NEON code. Recommendations for best results include:</p>
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li>Use 16-byte data alignment for faster load and store.</li>
|
|
||||||
<li>Avoid using constants with NEON functions. Using constants results in a performance penalty due
|
|
||||||
to having to load constants. If you must use constants, try to initialize them outside of hotspot
|
|
||||||
loops. If possible, replace them with logical and compare operations.</li>
|
|
||||||
<li>Try to avoid functions marked as "serially implemented" because they need to store data from
|
|
||||||
registers to memory. Instead, process them serially and reload them. You may be able to change the
|
|
||||||
data type or algorithm used to vectorize the whole port instead of leaving it as a serial one.</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<p>For more information on this topic, see
|
|
||||||
<a href="http://software.intel.com/en-us/blogs/2012/12/12/from-arm-neon-to-intel-mmxsse-automatic-porting-solution-tips-and-tricks">
|
|
||||||
From ARM NEON to Intel SSE– the automatic porting solution, tips and tricks</a>.</p>
|
|
||||||
|
|
||||||
<h3>Known differences from ARM version</h3>
|
|
||||||
<p>In the great majority of cases, x86 implementations produce the same results as ARM
|
|
||||||
implementations for NEON. x86 implementations pass
|
|
||||||
<a href="https://gitorious.org/arm-neon-tests/arm-neon-tests">NEON tests</a> nearly 100% of the
|
|
||||||
time. Still, there are several corner cases in which an x86 implementation produces results
|
|
||||||
different from its ARM counterpart. Known incompatibilities are as follows:</p>
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li>{@code VRECPS/VRECPSQ}<br/>
|
|
||||||
If one of the operands is +/- infinity and the second is +/- 0.0:
|
|
||||||
<ul>
|
|
||||||
<li>On ARM CPUs, these instructions
|
|
||||||
<a href="http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0489h/CIHDIACI.html">
|
|
||||||
return a result element equal to 2.0</a>.</li>
|
|
||||||
|
|
||||||
<li>x86 CPUs return {@code QNaN Indefinite}. For more information about the QNaN floating-point
|
|
||||||
indefinite, see "4.2.2 Floating-Point Data Types" and "4.8.3.7 QNaN Floating-Point Indefinite,"
|
|
||||||
in the
|
|
||||||
<a href="http://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-software-developer-manual-325462.pdf">Intel® 64 and IA-32 Architectures Software Developer’s Manual</a>.
|
|
||||||
</li>
|
|
||||||
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
<li>{@code VRSQRTS/VRSQRTSQ}<br/>
|
|
||||||
If one of the operands is +/- infinity and the second is +/- 0.0:
|
|
||||||
<ul>
|
|
||||||
<li>On ARM CPUs, these instructions
|
|
||||||
<a href="http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0489h/CIHDIACI.html">
|
|
||||||
return a result element equal to 1.5</a>.</li>
|
|
||||||
|
|
||||||
<li>x86 CPUs return {@code QNaN Indefinite}. For more information about the QNaN floating-point
|
|
||||||
indefinite, see "4.2.2 Floating-Point Data Types" and "4.8.3.7 QNaN Floating-Point Indefinite,"
|
|
||||||
in the
|
|
||||||
<a href="http://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-software-developer-manual-325462.pdf">Intel® 64 and IA-32 Architectures Software Developer’s Manual</a>.
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li>{@code VMAX/VMAXQ}<br/>
|
|
||||||
If one of the operands is NaN, or both operands are +/- 0.0:
|
|
||||||
<ul>
|
|
||||||
<li>On ARM CPUs, floating-point maximum works as follows:
|
|
||||||
<ul>
|
|
||||||
<li>max(+0.0, -0.0) = +0.0.</li>
|
|
||||||
<li>If any input is a NaN, the corresponding result element is the default NaN.</li>
|
|
||||||
</ul>
|
|
||||||
To learn more about this condition and result, see the
|
|
||||||
<a href="http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0489h/CIHDEEBE.html">
|
|
||||||
ARM Compiler toolchain Assembler Reference</a>, ignoring the "Superseded" watermark.
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li>On x86 CPUs, floating-point maximum works as follows:
|
|
||||||
<ul>
|
|
||||||
<li>If one of the source operands is NaN, then return the second source operand.</li>
|
|
||||||
<li>If both source operands are equal to 0, then return the second source operand.</li>
|
|
||||||
</ul>
|
|
||||||
For more information about these conditions and results, see Volume 1 Appendix E chapter
|
|
||||||
E.4.2.3 and Volume 2, p 3-488, of the
|
|
||||||
<a href="http://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-software-developer-manual-325462.pdf">Intel® 64 and IA-32 Architectures Software Developer’s
|
|
||||||
Manual</a>.
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li>{@code VMIN/VMINQ}<br/>
|
|
||||||
If one of the operands is NaN or both are +/- 0.0:
|
|
||||||
<ul>
|
|
||||||
<li>On ARM CPUs floating-point minimum works as follows:
|
|
||||||
<ul>
|
|
||||||
<li>min(+0.0, -0.0) = -0.0.</li>
|
|
||||||
<li>If any input is a NaN, the corresponding result element is the default NaN.</li>
|
|
||||||
</ul>
|
|
||||||
To learn more about this condition and result, see the
|
|
||||||
<a href="http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0489h/CIHDEEBE.html">
|
|
||||||
ARM Compiler toolchain Assembler Reference</a>, ignoring the "Superseded" watermark.
|
|
||||||
</li>
|
|
||||||
<li>On x86 CPUs floating-point minimum works as follows:
|
|
||||||
<ul>
|
|
||||||
<li>If one of the source operands is NaN, than return the second source operand.</li>
|
|
||||||
<li>If both source operands are equal to 0, than return the second source operand.</li>
|
|
||||||
</ul>
|
|
||||||
For more information about these conditions and results, see Volume 1 Appendix E chapter
|
|
||||||
E.4.2.3 and Volume 2, p 3-497, of the
|
|
||||||
<a href="http://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-software-developer-manual-325462.pdf">Intel® 64 and IA-32 Architectures Software Developer’s
|
|
||||||
Manual</a>.
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li>{@code VRECPE/VRECPEQ}<br/>
|
|
||||||
These instructions provide different levels of accuracy on ARM and x86 CPUs. For more information
|
|
||||||
about these differences, see
|
|
||||||
<a href="http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.faqs/ka14282.html">
|
|
||||||
How do I use VRECPE/VRECPEQ for reciprocal estimate?</a> on the ARM website, and Volume 2, p.
|
|
||||||
4-281 of the
|
|
||||||
<a href="http://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-software-developer-manual-325462.pdf">Intel® 64 and IA-32 Architectures Software Developer’s Manual</a>.
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li>{@code VRSQRTE/VRSQRTEQ}<br/>
|
|
||||||
<ul>
|
|
||||||
<li>These instructions provide different levels of accuracy on ARM and x86 CPUs. For more
|
|
||||||
information about these differences, see the
|
|
||||||
<a href="http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0204h/CIHCHECJ.html">
|
|
||||||
RealView Compilation Tools Assembler Guide</a>, and Volume 2, p. 4-325 of the
|
|
||||||
<a href="http://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-software-developer-manual-325462.pdf">Intel® 64 and IA-32 Architectures Software Developer’s Manual</a>.
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li>If one of the operands is negative or -infinity then
|
|
||||||
<ul>
|
|
||||||
<li>On ARM CPUs, these instructions by default return a (positive) NaN. For more information
|
|
||||||
about this result, see the
|
|
||||||
<a href="http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0489i/CIHIICBB.html">
|
|
||||||
ARM Compiler toolchain Assembler Reference</a>.</li>
|
|
||||||
<li>On x86 CPUs, these instructions return a (negative) QNaN floating-point Indefinite. For
|
|
||||||
more information about this result, see Volume 1, Appendix E, E.4.2.3, of the
|
|
||||||
<a href="http://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-software-developer-manual-325462.pdf">Intel® 64 and IA-32 Architectures Software Developer’s
|
|
||||||
Manual</a>.</li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3>Sample code</h3>
|
|
||||||
<p>In your project make sure to include the {@code arm_neon.h} header, and define include
|
|
||||||
{@code x86} in your definition of {@code APP_ABI}. The build system then ports your code to x86.</p>
|
|
||||||
|
|
||||||
<p>For an example of how porting ARM NEON to x86 SSE works, see the hello-neon sample.</p>
|
|
||||||
|
|
||||||
<h2 id="st">Standalone Toolchain</h2>
|
|
||||||
<p>You can incorporate the {@code x86} ABI into your own toolchain. For more information, see
|
|
||||||
<a href="{@docRoot}ndk/guides/standalone_toolchain.html">Standalone Toolchain</a>.</p>
|
|
||||||
|
|
||||||
<h2 id="comp">Compatibility</h2>
|
|
||||||
<p>x86 support requires, at minimum, Android 2.3 (Android API level 9). If your project files
|
|
||||||
target an older API level, but include x86 as a targeted platform, the NDK build script
|
|
||||||
automatically selects the right set of native platform headers/libraries for you.</p>
|
|
||||||
@@ -1,51 +0,0 @@
|
|||||||
page.title=Android NDK
|
|
||||||
page.tags="ndk, native, c, c++",
|
|
||||||
meta.tags="ndk, native, c++"
|
|
||||||
fullpage=true
|
|
||||||
section.landing=true
|
|
||||||
header.hide=1
|
|
||||||
footer.hide=1
|
|
||||||
@jd:body
|
|
||||||
|
|
||||||
<section class="dac-expand dac-hero dac-dark dac-invert" style="background-repeat:no-repeat;">
|
|
||||||
<div class="wrap">
|
|
||||||
<div class="cols dac-hero-content" style="margin-top:32px">
|
|
||||||
<div class="col-7of16 cdol-push-1of16">
|
|
||||||
<h1 class="dac-hero-title">Android NDK</h1>
|
|
||||||
<p class="dac-hero-description">
|
|
||||||
The Android NDK is a toolset that lets you implement parts of your app using native-code languages such as C and C++. For certain types of apps, this can help you reuse existing code libraries written in those languages.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<a class="dac-hero-cta" href="/ndk/guides/index.html">
|
|
||||||
<span class="dac-sprite dac-auto-chevron"></span>
|
|
||||||
Get Started
|
|
||||||
</a><br>
|
|
||||||
</div>
|
|
||||||
<div class="col-8of16 col-push-1of16" style="margin-top:48px">
|
|
||||||
|
|
||||||
<span style="color:#00e5ff;font-family:'Roboto Mono', monospace;font-weight:400">public class <span
|
|
||||||
style="color:#eee">MyActivity</span> extends Activity {<br>
|
|
||||||
<span style="color:#ccc"> /**<br>
|
|
||||||
* Native method implemented in C/C++<br>
|
|
||||||
*/</span><br>
|
|
||||||
public <span style="color:#1DE9B6;font-weight:700">native</span> void <span style="color:#eee">computeFoo()</span>;<br>
|
|
||||||
}</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<div class="wrap dac-offset-parent">
|
|
||||||
<a class="dac-fab dac-scroll-button" data-scroll-button href="#latest">
|
|
||||||
<i class="dac-sprite dac-arrow-down-gray"></i>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
<section class="dac-section dac-gray dac-small" id="latest"><div class="wrap">
|
|
||||||
<h2 class="norule">Latest</h2>
|
|
||||||
<div class="resource-widget resource-flow-layout col-16"
|
|
||||||
data-query="type:blog+tag:ndk"
|
|
||||||
data-cardSizes="6x6"
|
|
||||||
data-maxResults="9"
|
|
||||||
data-items-per-page="6"
|
|
||||||
data-initial-results="3"></div>
|
|
||||||
</div></section>
|
|
||||||
@@ -1,60 +0,0 @@
|
|||||||
toc:
|
|
||||||
- title: Asset Manager
|
|
||||||
path: /ndk/reference/group___asset.html
|
|
||||||
section:
|
|
||||||
- title: asset_manager.h
|
|
||||||
path: /ndk/reference/asset__manager_8h.html
|
|
||||||
- title: asset_manager_jni.h
|
|
||||||
path: /ndk/reference/asset__manager__jni_8h.html
|
|
||||||
|
|
||||||
- title: Bitmap
|
|
||||||
path: /ndk/reference/group___bitmap.html
|
|
||||||
section:
|
|
||||||
- title: bitmap.h
|
|
||||||
path: /ndk/reference/bitmap_8h.html
|
|
||||||
|
|
||||||
- title: Configuration
|
|
||||||
path: /ndk/reference/group___configuration.html
|
|
||||||
section:
|
|
||||||
- title: configuration.h
|
|
||||||
path: /ndk/reference/configuration_8h.html
|
|
||||||
|
|
||||||
- title: Input
|
|
||||||
path: /ndk/reference/group___input.html
|
|
||||||
section:
|
|
||||||
- title: input.h
|
|
||||||
path: /ndk/reference/input_8h.html
|
|
||||||
- title: keycodes.h
|
|
||||||
path: /ndk/reference/keycodes_8h.html
|
|
||||||
|
|
||||||
- title: Looper
|
|
||||||
path: /ndk/reference/group___looper.html
|
|
||||||
section:
|
|
||||||
- title: looper.h
|
|
||||||
path: /ndk/reference/looper_8h.html
|
|
||||||
|
|
||||||
- title: Native Activity and Window
|
|
||||||
path: /ndk/reference/group___native_activity.html
|
|
||||||
section:
|
|
||||||
- title: native_activity.h
|
|
||||||
path: /ndk/reference/native__activity_8h.html
|
|
||||||
- title: native_window.h
|
|
||||||
path: /ndk/reference/native__window_8h.html
|
|
||||||
- title: native_window.h
|
|
||||||
path: /ndk/reference/native__window__jni_8h.html
|
|
||||||
- title: rect.h
|
|
||||||
path: /ndk/reference/rect_8h.html
|
|
||||||
|
|
||||||
- title: Sensor
|
|
||||||
path: /ndk/reference/group___sensor.html
|
|
||||||
section:
|
|
||||||
- title: sensor.h
|
|
||||||
path: /ndk/reference/sensor_8h.html
|
|
||||||
|
|
||||||
- title: Storage Manager
|
|
||||||
path: /ndk/reference/group___storage.html
|
|
||||||
section:
|
|
||||||
- title: storage_manager.h
|
|
||||||
path: /ndk/reference/storage__manager_8h.html
|
|
||||||
- title: obb.h
|
|
||||||
path: /ndk/reference/obb_8h.html
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
page.title=Data Structures
|
|
||||||
page.customHeadTag=<link rel="stylesheet" type="text/css" href="doxygen-dac.css">
|
|
||||||
@jd:body
|
|
||||||
<!-- Generated by Doxygen 1.8.6 -->
|
|
||||||
</div><!-- top -->
|
|
||||||
<div class="header">
|
|
||||||
<div class="headertitle">
|
|
||||||
<div class="title">Data Structures</div> </div>
|
|
||||||
</div><!--header-->
|
|
||||||
<div class="contents">
|
|
||||||
<div class="textblock">Here are the data structures with brief descriptions:</div><div class="directory">
|
|
||||||
<table class="directory">
|
|
||||||
<tr id="row_0_" class="even"><td class="entry"><img src="ftv2node.png" alt="o" width="16" height="22" /><img src="ftv2cl.png" alt="C" width="24" height="22" /><a class="el" href="struct_a_heart_rate_event.html" target="_self">AHeartRateEvent</a></td><td class="desc"></td></tr>
|
|
||||||
<tr id="row_1_"><td class="entry"><img src="ftv2node.png" alt="o" width="16" height="22" /><img src="ftv2cl.png" alt="C" width="24" height="22" /><a class="el" href="struct_a_meta_data_event.html" target="_self">AMetaDataEvent</a></td><td class="desc"></td></tr>
|
|
||||||
<tr id="row_2_" class="even"><td class="entry"><img src="ftv2node.png" alt="o" width="16" height="22" /><img src="ftv2cl.png" alt="C" width="24" height="22" /><a class="el" href="struct_a_native_activity.html" target="_self">ANativeActivity</a></td><td class="desc"></td></tr>
|
|
||||||
<tr id="row_3_"><td class="entry"><img src="ftv2node.png" alt="o" width="16" height="22" /><img src="ftv2cl.png" alt="C" width="24" height="22" /><a class="el" href="struct_a_native_activity_callbacks.html" target="_self">ANativeActivityCallbacks</a></td><td class="desc"></td></tr>
|
|
||||||
<tr id="row_4_" class="even"><td class="entry"><img src="ftv2node.png" alt="o" width="16" height="22" /><img src="ftv2cl.png" alt="C" width="24" height="22" /><a class="el" href="struct_a_native_window___buffer.html" target="_self">ANativeWindow_Buffer</a></td><td class="desc"></td></tr>
|
|
||||||
<tr id="row_5_"><td class="entry"><img src="ftv2node.png" alt="o" width="16" height="22" /><img src="ftv2cl.png" alt="C" width="24" height="22" /><a class="el" href="struct_android_bitmap_info.html" target="_self">AndroidBitmapInfo</a></td><td class="desc"></td></tr>
|
|
||||||
<tr id="row_6_" class="even"><td class="entry"><img src="ftv2node.png" alt="o" width="16" height="22" /><img src="ftv2cl.png" alt="C" width="24" height="22" /><a class="el" href="struct_a_rect.html" target="_self">ARect</a></td><td class="desc"></td></tr>
|
|
||||||
<tr id="row_7_"><td class="entry"><img src="ftv2node.png" alt="o" width="16" height="22" /><img src="ftv2cl.png" alt="C" width="24" height="22" /><a class="el" href="struct_a_sensor_event.html" target="_self">ASensorEvent</a></td><td class="desc"></td></tr>
|
|
||||||
<tr id="row_8_" class="even"><td class="entry"><img src="ftv2node.png" alt="o" width="16" height="22" /><img src="ftv2cl.png" alt="C" width="24" height="22" /><a class="el" href="struct_a_sensor_vector.html" target="_self">ASensorVector</a></td><td class="desc"></td></tr>
|
|
||||||
<tr id="row_9_"><td class="entry"><img src="ftv2lastnode.png" alt="\" width="16" height="22" /><img src="ftv2cl.png" alt="C" width="24" height="22" /><a class="el" href="struct_a_uncalibrated_event.html" target="_self">AUncalibratedEvent</a></td><td class="desc"></td></tr>
|
|
||||||
</table>
|
|
||||||
</div><!-- directory -->
|
|
||||||
</div><!-- contents -->
|
|
||||||
@@ -1,75 +0,0 @@
|
|||||||
page.title=asset_manager.h File Reference
|
|
||||||
page.customHeadTag=<link rel="stylesheet" type="text/css" href="doxygen-dac.css">
|
|
||||||
@jd:body
|
|
||||||
<!-- Generated by Doxygen 1.8.6 -->
|
|
||||||
<div id="nav-path" class="navpath">
|
|
||||||
<ul>
|
|
||||||
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_035c76f7235f5f563d38e3ab90cb9716.html">android</a></li> </ul>
|
|
||||||
</div>
|
|
||||||
</div><!-- top -->
|
|
||||||
<div class="header">
|
|
||||||
<div class="summary">
|
|
||||||
<a href="#typedef-members">Typedefs</a> |
|
|
||||||
<a href="#enum-members">Enumerations</a> |
|
|
||||||
<a href="#func-members">Functions</a> </div>
|
|
||||||
<div class="headertitle">
|
|
||||||
<div class="title">asset_manager.h File Reference<div class="ingroups"><a class="el" href="group___asset.html">Asset</a></div></div> </div>
|
|
||||||
</div><!--header-->
|
|
||||||
<div class="contents">
|
|
||||||
<table class="memberdecls">
|
|
||||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
|
|
||||||
Typedefs</h2></td></tr>
|
|
||||||
<tr class="memitem:ga90c459935e76acf809b9ec90d1872771"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="group___asset.html#ga90c459935e76acf809b9ec90d1872771">AAssetManager</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#ga90c459935e76acf809b9ec90d1872771">AAssetManager</a></td></tr>
|
|
||||||
<tr class="separator:ga90c459935e76acf809b9ec90d1872771"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:ga001a6b9c36a06ee977b9f51ed7103cdb"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="group___asset.html#ga001a6b9c36a06ee977b9f51ed7103cdb">AAssetDir</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#ga001a6b9c36a06ee977b9f51ed7103cdb">AAssetDir</a></td></tr>
|
|
||||||
<tr class="separator:ga001a6b9c36a06ee977b9f51ed7103cdb"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:ga5630b1f1aa5cd363303018cb2f12f95c"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a></td></tr>
|
|
||||||
<tr class="separator:ga5630b1f1aa5cd363303018cb2f12f95c"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
</table><table class="memberdecls">
|
|
||||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
|
|
||||||
Enumerations</h2></td></tr>
|
|
||||||
<tr class="memitem:ga06fc87d81c62e9abb8790b6e5713c55b"><td class="memItemLeft" align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom">{ <a class="el" href="group___asset.html#gga06fc87d81c62e9abb8790b6e5713c55ba5bf76576f07042f965f230086f7c09f4">AASSET_MODE_UNKNOWN</a> = 0,
|
|
||||||
<a class="el" href="group___asset.html#gga06fc87d81c62e9abb8790b6e5713c55ba88e1b2a920963d7596735fe28bf30e2f">AASSET_MODE_RANDOM</a> = 1,
|
|
||||||
<a class="el" href="group___asset.html#gga06fc87d81c62e9abb8790b6e5713c55bac76f5fdb953097efc04e534474a7ea74">AASSET_MODE_STREAMING</a> = 2,
|
|
||||||
<a class="el" href="group___asset.html#gga06fc87d81c62e9abb8790b6e5713c55ba40ec098f4afb7c2869fa449d3059f6bb">AASSET_MODE_BUFFER</a> = 3
|
|
||||||
}</td></tr>
|
|
||||||
<tr class="separator:ga06fc87d81c62e9abb8790b6e5713c55b"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
</table><table class="memberdecls">
|
|
||||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
|
|
||||||
Functions</h2></td></tr>
|
|
||||||
<tr class="memitem:gab5b57ff012d6d1024d8bf5d30aedced4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___asset.html#ga001a6b9c36a06ee977b9f51ed7103cdb">AAssetDir</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#gab5b57ff012d6d1024d8bf5d30aedced4">AAssetManager_openDir</a> (<a class="el" href="group___asset.html#ga90c459935e76acf809b9ec90d1872771">AAssetManager</a> *mgr, const char *dirName)</td></tr>
|
|
||||||
<tr class="separator:gab5b57ff012d6d1024d8bf5d30aedced4"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:ga0037ce3c10a591fe632f34c1aa62955c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#ga0037ce3c10a591fe632f34c1aa62955c">AAssetManager_open</a> (<a class="el" href="group___asset.html#ga90c459935e76acf809b9ec90d1872771">AAssetManager</a> *mgr, const char *filename, int mode)</td></tr>
|
|
||||||
<tr class="separator:ga0037ce3c10a591fe632f34c1aa62955c"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:ga4703b9f7baa3daeba248b6547de6b9b0"><td class="memItemLeft" align="right" valign="top">const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#ga4703b9f7baa3daeba248b6547de6b9b0">AAssetDir_getNextFileName</a> (<a class="el" href="group___asset.html#ga001a6b9c36a06ee977b9f51ed7103cdb">AAssetDir</a> *assetDir)</td></tr>
|
|
||||||
<tr class="separator:ga4703b9f7baa3daeba248b6547de6b9b0"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:ga45db6d19ad5e1c0f9b2e6b4059da14b3"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#ga45db6d19ad5e1c0f9b2e6b4059da14b3">AAssetDir_rewind</a> (<a class="el" href="group___asset.html#ga001a6b9c36a06ee977b9f51ed7103cdb">AAssetDir</a> *assetDir)</td></tr>
|
|
||||||
<tr class="separator:ga45db6d19ad5e1c0f9b2e6b4059da14b3"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:gace1c4d0da274d643c5b10ca218cc6088"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#gace1c4d0da274d643c5b10ca218cc6088">AAssetDir_close</a> (<a class="el" href="group___asset.html#ga001a6b9c36a06ee977b9f51ed7103cdb">AAssetDir</a> *assetDir)</td></tr>
|
|
||||||
<tr class="separator:gace1c4d0da274d643c5b10ca218cc6088"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:gaadd86322c1fda5121b6d33745c317fb9"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#gaadd86322c1fda5121b6d33745c317fb9">AAsset_read</a> (<a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> *asset, void *buf, size_t count)</td></tr>
|
|
||||||
<tr class="separator:gaadd86322c1fda5121b6d33745c317fb9"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:gacc026a8bedeb1ef80bf12df3b72611a2"><td class="memItemLeft" align="right" valign="top">off_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#gacc026a8bedeb1ef80bf12df3b72611a2">AAsset_seek</a> (<a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> *asset, off_t offset, int whence)</td></tr>
|
|
||||||
<tr class="separator:gacc026a8bedeb1ef80bf12df3b72611a2"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:ga81fbe4368de24a3296ef7a6eba0053c7"><td class="memItemLeft" align="right" valign="top">off64_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#ga81fbe4368de24a3296ef7a6eba0053c7">AAsset_seek64</a> (<a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> *asset, off64_t offset, int whence)</td></tr>
|
|
||||||
<tr class="separator:ga81fbe4368de24a3296ef7a6eba0053c7"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:ga1f241e49f691dafcada23bcb76155122"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#ga1f241e49f691dafcada23bcb76155122">AAsset_close</a> (<a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> *asset)</td></tr>
|
|
||||||
<tr class="separator:ga1f241e49f691dafcada23bcb76155122"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:ga553a14512a98542306238c3ce70d344f"><td class="memItemLeft" align="right" valign="top">const void * </td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#ga553a14512a98542306238c3ce70d344f">AAsset_getBuffer</a> (<a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> *asset)</td></tr>
|
|
||||||
<tr class="separator:ga553a14512a98542306238c3ce70d344f"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:gaad8ec42e28522ebc72d3a5c357f9a600"><td class="memItemLeft" align="right" valign="top">off_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#gaad8ec42e28522ebc72d3a5c357f9a600">AAsset_getLength</a> (<a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> *asset)</td></tr>
|
|
||||||
<tr class="separator:gaad8ec42e28522ebc72d3a5c357f9a600"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:ga55c8bc459327d5d23089e6a4b453f3f1"><td class="memItemLeft" align="right" valign="top">off64_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#ga55c8bc459327d5d23089e6a4b453f3f1">AAsset_getLength64</a> (<a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> *asset)</td></tr>
|
|
||||||
<tr class="separator:ga55c8bc459327d5d23089e6a4b453f3f1"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:gae806f55cbc4a93ca245f2adfd63d3eee"><td class="memItemLeft" align="right" valign="top">off_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#gae806f55cbc4a93ca245f2adfd63d3eee">AAsset_getRemainingLength</a> (<a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> *asset)</td></tr>
|
|
||||||
<tr class="separator:gae806f55cbc4a93ca245f2adfd63d3eee"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:ga21e7221d88dcc44106843192b66755b5"><td class="memItemLeft" align="right" valign="top">off64_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#ga21e7221d88dcc44106843192b66755b5">AAsset_getRemainingLength64</a> (<a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> *asset)</td></tr>
|
|
||||||
<tr class="separator:ga21e7221d88dcc44106843192b66755b5"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:ga1af4ffd050016e99961e24f550981677"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#ga1af4ffd050016e99961e24f550981677">AAsset_openFileDescriptor</a> (<a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> *asset, off_t *outStart, off_t *outLength)</td></tr>
|
|
||||||
<tr class="separator:ga1af4ffd050016e99961e24f550981677"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:ga123a44a575f85d91a00a8456dab7bd0a"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#ga123a44a575f85d91a00a8456dab7bd0a">AAsset_openFileDescriptor64</a> (<a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> *asset, off64_t *outStart, off64_t *outLength)</td></tr>
|
|
||||||
<tr class="separator:ga123a44a575f85d91a00a8456dab7bd0a"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:ga20344cb952a77fa1004f592fb1b55124"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#ga20344cb952a77fa1004f592fb1b55124">AAsset_isAllocated</a> (<a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> *asset)</td></tr>
|
|
||||||
<tr class="separator:ga20344cb952a77fa1004f592fb1b55124"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
</table>
|
|
||||||
</div><!-- contents -->
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
page.title=asset_manager_jni.h File Reference
|
|
||||||
page.customHeadTag=<link rel="stylesheet" type="text/css" href="doxygen-dac.css">
|
|
||||||
@jd:body
|
|
||||||
<!-- Generated by Doxygen 1.8.6 -->
|
|
||||||
<div id="nav-path" class="navpath">
|
|
||||||
<ul>
|
|
||||||
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_035c76f7235f5f563d38e3ab90cb9716.html">android</a></li> </ul>
|
|
||||||
</div>
|
|
||||||
</div><!-- top -->
|
|
||||||
<div class="header">
|
|
||||||
<div class="summary">
|
|
||||||
<a href="#func-members">Functions</a> </div>
|
|
||||||
<div class="headertitle">
|
|
||||||
<div class="title">asset_manager_jni.h File Reference<div class="ingroups"><a class="el" href="group___asset.html">Asset</a></div></div> </div>
|
|
||||||
</div><!--header-->
|
|
||||||
<div class="contents">
|
|
||||||
<div class="textblock"><code>#include <<a class="el" href="asset__manager_8h.html">android/asset_manager.h</a>></code><br/>
|
|
||||||
<code>#include <jni.h></code><br/>
|
|
||||||
</div><table class="memberdecls">
|
|
||||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
|
|
||||||
Functions</h2></td></tr>
|
|
||||||
<tr class="memitem:gadfd6537af41577735bcaee52120127f4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___asset.html#ga90c459935e76acf809b9ec90d1872771">AAssetManager</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#gadfd6537af41577735bcaee52120127f4">AAssetManager_fromJava</a> (JNIEnv *env, jobject assetManager)</td></tr>
|
|
||||||
<tr class="separator:gadfd6537af41577735bcaee52120127f4"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
</table>
|
|
||||||
</div><!-- contents -->
|
|
||||||
|
Before Width: | Height: | Size: 624 B |
|
Before Width: | Height: | Size: 139 B |
@@ -1,61 +0,0 @@
|
|||||||
page.title=bitmap.h File Reference
|
|
||||||
page.customHeadTag=<link rel="stylesheet" type="text/css" href="doxygen-dac.css">
|
|
||||||
@jd:body
|
|
||||||
<!-- Generated by Doxygen 1.8.6 -->
|
|
||||||
<div id="nav-path" class="navpath">
|
|
||||||
<ul>
|
|
||||||
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_035c76f7235f5f563d38e3ab90cb9716.html">android</a></li> </ul>
|
|
||||||
</div>
|
|
||||||
</div><!-- top -->
|
|
||||||
<div class="header">
|
|
||||||
<div class="summary">
|
|
||||||
<a href="#nested-classes">Data Structures</a> |
|
|
||||||
<a href="#define-members">Macros</a> |
|
|
||||||
<a href="#enum-members">Enumerations</a> |
|
|
||||||
<a href="#func-members">Functions</a> </div>
|
|
||||||
<div class="headertitle">
|
|
||||||
<div class="title">bitmap.h File Reference<div class="ingroups"><a class="el" href="group___bitmap.html">Bitmap</a></div></div> </div>
|
|
||||||
</div><!--header-->
|
|
||||||
<div class="contents">
|
|
||||||
<div class="textblock"><code>#include <stdint.h></code><br/>
|
|
||||||
<code>#include <jni.h></code><br/>
|
|
||||||
</div><table class="memberdecls">
|
|
||||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
|
|
||||||
Data Structures</h2></td></tr>
|
|
||||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_android_bitmap_info.html">AndroidBitmapInfo</a></td></tr>
|
|
||||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
</table><table class="memberdecls">
|
|
||||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
|
|
||||||
Macros</h2></td></tr>
|
|
||||||
<tr class="memitem:gafb665ac9fefad34ac5c035f5d1314080"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group___bitmap.html#gafb665ac9fefad34ac5c035f5d1314080">ANDROID_BITMAP_RESUT_SUCCESS</a>   <a class="el" href="group___bitmap.html#ggadf764cbdea00d65edcd07bb9953ad2b7a07f71cf5c5d4950ac9813ae4bbf6d076">ANDROID_BITMAP_RESULT_SUCCESS</a></td></tr>
|
|
||||||
<tr class="separator:gafb665ac9fefad34ac5c035f5d1314080"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
</table><table class="memberdecls">
|
|
||||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
|
|
||||||
Enumerations</h2></td></tr>
|
|
||||||
<tr class="memitem:gadf764cbdea00d65edcd07bb9953ad2b7"><td class="memItemLeft" align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom">{ <a class="el" href="group___bitmap.html#ggadf764cbdea00d65edcd07bb9953ad2b7a07f71cf5c5d4950ac9813ae4bbf6d076">ANDROID_BITMAP_RESULT_SUCCESS</a> = 0,
|
|
||||||
<a class="el" href="group___bitmap.html#ggadf764cbdea00d65edcd07bb9953ad2b7acf7205d1a348d867c63ac2885ce01374">ANDROID_BITMAP_RESULT_BAD_PARAMETER</a> = -1,
|
|
||||||
<a class="el" href="group___bitmap.html#ggadf764cbdea00d65edcd07bb9953ad2b7a6b099b9533c38729a6c305f2fe93f98d">ANDROID_BITMAP_RESULT_JNI_EXCEPTION</a> = -2,
|
|
||||||
<a class="el" href="group___bitmap.html#ggadf764cbdea00d65edcd07bb9953ad2b7a512f5b95b6b57e78d65502c06391f990">ANDROID_BITMAP_RESULT_ALLOCATION_FAILED</a> = -3
|
|
||||||
}</td></tr>
|
|
||||||
<tr class="separator:gadf764cbdea00d65edcd07bb9953ad2b7"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:gaea286a2d4c61ae2abb02b51500499f13"><td class="memItemLeft" align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom"><a class="el" href="group___bitmap.html#gaea286a2d4c61ae2abb02b51500499f13">AndroidBitmapFormat</a> { <br/>
|
|
||||||
  <a class="el" href="group___bitmap.html#ggaea286a2d4c61ae2abb02b51500499f13ac6f0378ea5cfefd9abee2596af5a9021">ANDROID_BITMAP_FORMAT_NONE</a> = 0,
|
|
||||||
<a class="el" href="group___bitmap.html#ggaea286a2d4c61ae2abb02b51500499f13ab92ae96ceea06aa534583beadba84057">ANDROID_BITMAP_FORMAT_RGBA_8888</a> = 1,
|
|
||||||
<a class="el" href="group___bitmap.html#ggaea286a2d4c61ae2abb02b51500499f13a11b32e10d6db28fae70ec3590cb9ee91">ANDROID_BITMAP_FORMAT_RGB_565</a> = 4,
|
|
||||||
<a class="el" href="group___bitmap.html#ggaea286a2d4c61ae2abb02b51500499f13adc2ede06eafe20439271cb8137dc7528">ANDROID_BITMAP_FORMAT_RGBA_4444</a> = 7,
|
|
||||||
<br/>
|
|
||||||
  <a class="el" href="group___bitmap.html#ggaea286a2d4c61ae2abb02b51500499f13ad29996be25f8f88c96e016a1da5c4bca">ANDROID_BITMAP_FORMAT_A_8</a> = 8
|
|
||||||
<br/>
|
|
||||||
}</td></tr>
|
|
||||||
<tr class="separator:gaea286a2d4c61ae2abb02b51500499f13"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
</table><table class="memberdecls">
|
|
||||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
|
|
||||||
Functions</h2></td></tr>
|
|
||||||
<tr class="memitem:ga80292ee39d8a675928e38849742b54bf"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group___bitmap.html#ga80292ee39d8a675928e38849742b54bf">AndroidBitmap_getInfo</a> (JNIEnv *env, jobject jbitmap, <a class="el" href="struct_android_bitmap_info.html">AndroidBitmapInfo</a> *info)</td></tr>
|
|
||||||
<tr class="separator:ga80292ee39d8a675928e38849742b54bf"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:ga2908d42fa4db286c34b7f8c11f29206f"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group___bitmap.html#ga2908d42fa4db286c34b7f8c11f29206f">AndroidBitmap_lockPixels</a> (JNIEnv *env, jobject jbitmap, void **addrPtr)</td></tr>
|
|
||||||
<tr class="separator:ga2908d42fa4db286c34b7f8c11f29206f"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:ga4aca91f37baddd42d0051dca8179d4ed"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group___bitmap.html#ga4aca91f37baddd42d0051dca8179d4ed">AndroidBitmap_unlockPixels</a> (JNIEnv *env, jobject jbitmap)</td></tr>
|
|
||||||
<tr class="separator:ga4aca91f37baddd42d0051dca8179d4ed"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
</table>
|
|
||||||
</div><!-- contents -->
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
page.title=Data Structure Index
|
|
||||||
page.customHeadTag=<link rel="stylesheet" type="text/css" href="doxygen-dac.css">
|
|
||||||
@jd:body
|
|
||||||
<!-- Generated by Doxygen 1.8.6 -->
|
|
||||||
</div><!-- top -->
|
|
||||||
<div class="header">
|
|
||||||
<div class="headertitle">
|
|
||||||
<div class="title">Data Structure Index</div> </div>
|
|
||||||
</div><!--header-->
|
|
||||||
<div class="contents">
|
|
||||||
<div class="qindex"><a class="qindex" href="#letter_A">A</a></div>
|
|
||||||
<table style="margin: 10px; white-space: nowrap;" align="center" width="95%" border="0" cellspacing="0" cellpadding="0">
|
|
||||||
<tr><td rowspan="2" valign="bottom"><a name="letter_A"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">  A  </div></td></tr></table>
|
|
||||||
</td><td valign="top"><a class="el" href="struct_a_meta_data_event.html">AMetaDataEvent</a>   </td><td valign="top"><a class="el" href="struct_a_native_window___buffer.html">ANativeWindow_Buffer</a>   </td><td valign="top"><a class="el" href="struct_a_sensor_event.html">ASensorEvent</a>   </td><td></td></tr>
|
|
||||||
<tr><td valign="top"><a class="el" href="struct_a_native_activity.html">ANativeActivity</a>   </td><td valign="top"><a class="el" href="struct_android_bitmap_info.html">AndroidBitmapInfo</a>   </td><td valign="top"><a class="el" href="struct_a_sensor_vector.html">ASensorVector</a>   </td><td></td></tr>
|
|
||||||
<tr><td valign="top"><a class="el" href="struct_a_heart_rate_event.html">AHeartRateEvent</a>   </td><td valign="top"><a class="el" href="struct_a_native_activity_callbacks.html">ANativeActivityCallbacks</a>   </td><td valign="top"><a class="el" href="struct_a_rect.html">ARect</a>   </td><td valign="top"><a class="el" href="struct_a_uncalibrated_event.html">AUncalibratedEvent</a>   </td><td></td></tr>
|
|
||||||
<tr><td></td><td></td><td></td><td></td><td></td></tr>
|
|
||||||
</table>
|
|
||||||
<div class="qindex"><a class="qindex" href="#letter_A">A</a></div>
|
|
||||||
</div><!-- contents -->
|
|
||||||
|
Before Width: | Height: | Size: 125 B |
@@ -1,222 +0,0 @@
|
|||||||
page.title=configuration.h File Reference
|
|
||||||
page.customHeadTag=<link rel="stylesheet" type="text/css" href="doxygen-dac.css">
|
|
||||||
@jd:body
|
|
||||||
<!-- Generated by Doxygen 1.8.6 -->
|
|
||||||
<div id="nav-path" class="navpath">
|
|
||||||
<ul>
|
|
||||||
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_035c76f7235f5f563d38e3ab90cb9716.html">android</a></li> </ul>
|
|
||||||
</div>
|
|
||||||
</div><!-- top -->
|
|
||||||
<div class="header">
|
|
||||||
<div class="summary">
|
|
||||||
<a href="#typedef-members">Typedefs</a> |
|
|
||||||
<a href="#enum-members">Enumerations</a> |
|
|
||||||
<a href="#func-members">Functions</a> </div>
|
|
||||||
<div class="headertitle">
|
|
||||||
<div class="title">configuration.h File Reference<div class="ingroups"><a class="el" href="group___configuration.html">Configuration</a></div></div> </div>
|
|
||||||
</div><!--header-->
|
|
||||||
<div class="contents">
|
|
||||||
<div class="textblock"><code>#include <<a class="el" href="asset__manager_8h.html">android/asset_manager.h</a>></code><br/>
|
|
||||||
</div><table class="memberdecls">
|
|
||||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
|
|
||||||
Typedefs</h2></td></tr>
|
|
||||||
<tr class="memitem:ga6709434d0f99b8367d0df2dfdfbef45a"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a></td></tr>
|
|
||||||
<tr class="separator:ga6709434d0f99b8367d0df2dfdfbef45a"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
</table><table class="memberdecls">
|
|
||||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
|
|
||||||
Enumerations</h2></td></tr>
|
|
||||||
<tr class="memitem:ga99fb83031ce9923c84392b4e92f956b5"><td class="memItemLeft" align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom">{ <br/>
|
|
||||||
  <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5af44cee3290a23999b0358c5638747a5f">ACONFIGURATION_ORIENTATION_ANY</a> = 0x0000,
|
|
||||||
<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5ad9bf5c1fb90f9fdb20f984d0574592fe">ACONFIGURATION_ORIENTATION_PORT</a> = 0x0001,
|
|
||||||
<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5ad5746872ff6871379fca93c60bfac8a3">ACONFIGURATION_ORIENTATION_LAND</a> = 0x0002,
|
|
||||||
<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5ab0ca4fce673baf58447bfeb154d9a03f">ACONFIGURATION_ORIENTATION_SQUARE</a> = 0x0003,
|
|
||||||
<br/>
|
|
||||||
  <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5aa73bcf45261366840fea743372682fa6">ACONFIGURATION_TOUCHSCREEN_ANY</a> = 0x0000,
|
|
||||||
<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5adfbeb370edd3b4372c9b0f86f152dde0">ACONFIGURATION_TOUCHSCREEN_NOTOUCH</a> = 0x0001,
|
|
||||||
<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a8316a15b06353f883f2aef8bd194f79f">ACONFIGURATION_TOUCHSCREEN_STYLUS</a> = 0x0002,
|
|
||||||
<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a4bf2a8323ec6d072aa48d5fc2cff645e">ACONFIGURATION_TOUCHSCREEN_FINGER</a> = 0x0003,
|
|
||||||
<br/>
|
|
||||||
  <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5ae628b2bf594733b7c19ae394616cec6c">ACONFIGURATION_DENSITY_DEFAULT</a> = 0,
|
|
||||||
<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a01ddb34b2376422d2323720049eb57f3">ACONFIGURATION_DENSITY_LOW</a> = 120,
|
|
||||||
<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a2511479d7cd574c4b293d535e4dc337e">ACONFIGURATION_DENSITY_MEDIUM</a> = 160,
|
|
||||||
<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a10e6c3d636f3f6de75de9208913b0d8f">ACONFIGURATION_DENSITY_TV</a> = 213,
|
|
||||||
<br/>
|
|
||||||
  <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a5ef4a97dc058235cdfa9fcfe3300c7eb">ACONFIGURATION_DENSITY_HIGH</a> = 240,
|
|
||||||
<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a38a03b3b1c64725679605d8d479c85a0">ACONFIGURATION_DENSITY_XHIGH</a> = 320,
|
|
||||||
<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5ad6353daf63778a6ec6f2bd3815d7e6e4">ACONFIGURATION_DENSITY_XXHIGH</a> = 480,
|
|
||||||
<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a2bd04af33e868a77bd4d83e7d70368ec">ACONFIGURATION_DENSITY_XXXHIGH</a> = 640,
|
|
||||||
<br/>
|
|
||||||
  <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a966a3855351a97ae865264afd74c1534">ACONFIGURATION_DENSITY_ANY</a> = 0xfffe,
|
|
||||||
<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a7c1af92914155c418b99844c6aab33d7">ACONFIGURATION_DENSITY_NONE</a> = 0xffff,
|
|
||||||
<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a593f722738682ae4500dab6427670f4a">ACONFIGURATION_KEYBOARD_ANY</a> = 0x0000,
|
|
||||||
<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a40195a1a2d8e21c74d99606d8a1a9918">ACONFIGURATION_KEYBOARD_NOKEYS</a> = 0x0001,
|
|
||||||
<br/>
|
|
||||||
  <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a263ff8efb4d2c757e557adc0d0cdeedf">ACONFIGURATION_KEYBOARD_QWERTY</a> = 0x0002,
|
|
||||||
<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a1aaf1a887f146737030cce95c53066ea">ACONFIGURATION_KEYBOARD_12KEY</a> = 0x0003,
|
|
||||||
<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a90e914b60d28c081b313f4b7b6600f47">ACONFIGURATION_NAVIGATION_ANY</a> = 0x0000,
|
|
||||||
<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a3d95e899305aeae366fb7f8d8b6c290a">ACONFIGURATION_NAVIGATION_NONAV</a> = 0x0001,
|
|
||||||
<br/>
|
|
||||||
  <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5ace2e3ed21322100712992ca09f4b75b5">ACONFIGURATION_NAVIGATION_DPAD</a> = 0x0002,
|
|
||||||
<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5ad2807d00cb2f5dcb9f456045dd8443a4">ACONFIGURATION_NAVIGATION_TRACKBALL</a> = 0x0003,
|
|
||||||
<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a80b53370f65ad283a4fd025f36422bea">ACONFIGURATION_NAVIGATION_WHEEL</a> = 0x0004,
|
|
||||||
<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a34d3a830bc2964000052f8486fd76b0c">ACONFIGURATION_KEYSHIDDEN_ANY</a> = 0x0000,
|
|
||||||
<br/>
|
|
||||||
  <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5abfbfc3a10affed059263555b00429ab2">ACONFIGURATION_KEYSHIDDEN_NO</a> = 0x0001,
|
|
||||||
<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a5e6a5a3f4175644886bde7d0ed4b1ebf">ACONFIGURATION_KEYSHIDDEN_YES</a> = 0x0002,
|
|
||||||
<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a1a56b72c730e40f22f3b8727e54c376c">ACONFIGURATION_KEYSHIDDEN_SOFT</a> = 0x0003,
|
|
||||||
<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a6db7dd6a67196df88117dcdc904e0cb3">ACONFIGURATION_NAVHIDDEN_ANY</a> = 0x0000,
|
|
||||||
<br/>
|
|
||||||
  <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5ae6ff9883e3e89f8d9ea5c0ebe077c9c5">ACONFIGURATION_NAVHIDDEN_NO</a> = 0x0001,
|
|
||||||
<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a79b3a5fe10e948bb79db47b516d46cf5">ACONFIGURATION_NAVHIDDEN_YES</a> = 0x0002,
|
|
||||||
<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a9abcd34a6c549e048fc75a545081584e">ACONFIGURATION_SCREENSIZE_ANY</a> = 0x00,
|
|
||||||
<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a1163af972206a65a5d18bda12fdc511c">ACONFIGURATION_SCREENSIZE_SMALL</a> = 0x01,
|
|
||||||
<br/>
|
|
||||||
  <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a019727e684f25ba921f3479abd62b9f2">ACONFIGURATION_SCREENSIZE_NORMAL</a> = 0x02,
|
|
||||||
<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5af871d177fdceedb75612cfc1281d2c12">ACONFIGURATION_SCREENSIZE_LARGE</a> = 0x03,
|
|
||||||
<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a0ca385ed504fc92f6ff3f0857e916c9c">ACONFIGURATION_SCREENSIZE_XLARGE</a> = 0x04,
|
|
||||||
<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a41e55e57da42fd09c378f59c1a63710f">ACONFIGURATION_SCREENLONG_ANY</a> = 0x00,
|
|
||||||
<br/>
|
|
||||||
  <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a428bb8fcd8bc731b67b0773dc62781c5">ACONFIGURATION_SCREENLONG_NO</a> = 0x1,
|
|
||||||
<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a91fc014d328507568d225d691b3babfd">ACONFIGURATION_SCREENLONG_YES</a> = 0x2,
|
|
||||||
<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a10d0916da7fa88c945a9cda259407d4c">ACONFIGURATION_UI_MODE_TYPE_ANY</a> = 0x00,
|
|
||||||
<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5ae7efe2713b6718311da76c828b5b444e">ACONFIGURATION_UI_MODE_TYPE_NORMAL</a> = 0x01,
|
|
||||||
<br/>
|
|
||||||
  <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5ae10bb854f461f60cf399852f8f327077">ACONFIGURATION_UI_MODE_TYPE_DESK</a> = 0x02,
|
|
||||||
<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a5d6575185e41d909469a1dcf5f81bf4f">ACONFIGURATION_UI_MODE_TYPE_CAR</a> = 0x03,
|
|
||||||
<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a4738dded616f028fbbedcbad764e7969">ACONFIGURATION_UI_MODE_TYPE_TELEVISION</a> = 0x04,
|
|
||||||
<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5ad99004a7a1b2a97d29b639664947f8e3">ACONFIGURATION_UI_MODE_TYPE_APPLIANCE</a> = 0x05,
|
|
||||||
<br/>
|
|
||||||
  <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5ac8c3e2207f2356bc6a1dffc6a615d131">ACONFIGURATION_UI_MODE_TYPE_WATCH</a> = 0x06,
|
|
||||||
<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a975087bbd4087b57a68ef3cdbfeb77a1">ACONFIGURATION_UI_MODE_NIGHT_ANY</a> = 0x00,
|
|
||||||
<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a90ebe564e3a3e384d5b013100f81e4b7">ACONFIGURATION_UI_MODE_NIGHT_NO</a> = 0x1,
|
|
||||||
<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a437af4527fac5407de256ec1ef055046">ACONFIGURATION_UI_MODE_NIGHT_YES</a> = 0x2,
|
|
||||||
<br/>
|
|
||||||
  <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5aad653f0c960112177fdc387a4a0577fa">ACONFIGURATION_SCREEN_WIDTH_DP_ANY</a> = 0x0000,
|
|
||||||
<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5ab66ad42d0cf72fd7e8cd99b92b625432">ACONFIGURATION_SCREEN_HEIGHT_DP_ANY</a> = 0x0000,
|
|
||||||
<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a227120217d8b6a9d5add3ccc4b283702">ACONFIGURATION_SMALLEST_SCREEN_WIDTH_DP_ANY</a> = 0x0000,
|
|
||||||
<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a4687ede31c438dd9f2701cab88de1dbe">ACONFIGURATION_LAYOUTDIR_ANY</a> = 0x00,
|
|
||||||
<br/>
|
|
||||||
  <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a05242d8f2d254b43ff9414ff1aa38a83">ACONFIGURATION_LAYOUTDIR_LTR</a> = 0x01,
|
|
||||||
<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5af98332983b787ab9355b527079636870">ACONFIGURATION_LAYOUTDIR_RTL</a> = 0x02,
|
|
||||||
<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a4d40f2aef365c78a52f699b89439db28">ACONFIGURATION_MCC</a> = 0x0001,
|
|
||||||
<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5ade91a319638eede201579d15f86578a5">ACONFIGURATION_MNC</a> = 0x0002,
|
|
||||||
<br/>
|
|
||||||
  <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a01ecff796bd0690a9a8498c7de03e9b4">ACONFIGURATION_LOCALE</a> = 0x0004,
|
|
||||||
<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a255cfb57ac18d460c5614565a84f5561">ACONFIGURATION_TOUCHSCREEN</a> = 0x0008,
|
|
||||||
<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a0195de2a57f028a8171c42beff0b0e88">ACONFIGURATION_KEYBOARD</a> = 0x0010,
|
|
||||||
<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a54e71234e32ed037e2d47472f80eb416">ACONFIGURATION_KEYBOARD_HIDDEN</a> = 0x0020,
|
|
||||||
<br/>
|
|
||||||
  <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a65e9d31615d2b4adf3738d9a12a1556b">ACONFIGURATION_NAVIGATION</a> = 0x0040,
|
|
||||||
<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a591461d864136d482fe06e01fd945786">ACONFIGURATION_ORIENTATION</a> = 0x0080,
|
|
||||||
<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5ace87b4f25e5fd6fe0f3316d21ecc66a1">ACONFIGURATION_DENSITY</a> = 0x0100,
|
|
||||||
<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a76ca1eb0e9346d93da592afbbf9a3b72">ACONFIGURATION_SCREEN_SIZE</a> = 0x0200,
|
|
||||||
<br/>
|
|
||||||
  <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a1be62e4fc31cf3d3102c99f7c6b4c71b">ACONFIGURATION_VERSION</a> = 0x0400,
|
|
||||||
<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a12d69ffef9135c1c55e1b8b5c2589e7c">ACONFIGURATION_SCREEN_LAYOUT</a> = 0x0800,
|
|
||||||
<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a43a324af59372efd08b34431825cf67e">ACONFIGURATION_UI_MODE</a> = 0x1000,
|
|
||||||
<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5acce415252e0ad95117a05bbe910f06de">ACONFIGURATION_SMALLEST_SCREEN_SIZE</a> = 0x2000,
|
|
||||||
<br/>
|
|
||||||
  <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a65834be1230d1694e5ce8a6f407acab2">ACONFIGURATION_LAYOUTDIR</a> = 0x4000,
|
|
||||||
<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5aa6cda2f222580dbef27f1277d967d58c">ACONFIGURATION_MNC_ZERO</a> = 0xffff
|
|
||||||
<br/>
|
|
||||||
}</td></tr>
|
|
||||||
<tr class="separator:ga99fb83031ce9923c84392b4e92f956b5"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
</table><table class="memberdecls">
|
|
||||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
|
|
||||||
Functions</h2></td></tr>
|
|
||||||
<tr class="memitem:ga9543655922980466eb05c7be94a0a567"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#ga9543655922980466eb05c7be94a0a567">AConfiguration_new</a> ()</td></tr>
|
|
||||||
<tr class="separator:ga9543655922980466eb05c7be94a0a567"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:ga60fe264b97da84d3370eb9e220159e6d"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#ga60fe264b97da84d3370eb9e220159e6d">AConfiguration_delete</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config)</td></tr>
|
|
||||||
<tr class="separator:ga60fe264b97da84d3370eb9e220159e6d"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:ga75e061fd0b4f761e08e43af36508c4f3"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#ga75e061fd0b4f761e08e43af36508c4f3">AConfiguration_fromAssetManager</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *out, <a class="el" href="group___asset.html#ga90c459935e76acf809b9ec90d1872771">AAssetManager</a> *am)</td></tr>
|
|
||||||
<tr class="separator:ga75e061fd0b4f761e08e43af36508c4f3"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:gaabff04218a0a76afb8d3ea551b001565"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#gaabff04218a0a76afb8d3ea551b001565">AConfiguration_copy</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *dest, <a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *src)</td></tr>
|
|
||||||
<tr class="separator:gaabff04218a0a76afb8d3ea551b001565"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:ga1e78004237a931086d2ae4bd8324bd30"><td class="memItemLeft" align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#ga1e78004237a931086d2ae4bd8324bd30">AConfiguration_getMcc</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config)</td></tr>
|
|
||||||
<tr class="separator:ga1e78004237a931086d2ae4bd8324bd30"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:gae6198b4eaf3e34168f4b13b8b5975d93"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#gae6198b4eaf3e34168f4b13b8b5975d93">AConfiguration_setMcc</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config, int32_t mcc)</td></tr>
|
|
||||||
<tr class="separator:gae6198b4eaf3e34168f4b13b8b5975d93"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:ga4783776a4fad4501898472375d781fb9"><td class="memItemLeft" align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#ga4783776a4fad4501898472375d781fb9">AConfiguration_getMnc</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config)</td></tr>
|
|
||||||
<tr class="separator:ga4783776a4fad4501898472375d781fb9"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:gaaf060ef69c3636f62e90ae0b520eecb8"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#gaaf060ef69c3636f62e90ae0b520eecb8">AConfiguration_setMnc</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config, int32_t mnc)</td></tr>
|
|
||||||
<tr class="separator:gaaf060ef69c3636f62e90ae0b520eecb8"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:ga7b004c13448704afb0ea2040d69468c1"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#ga7b004c13448704afb0ea2040d69468c1">AConfiguration_getLanguage</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config, char *outLanguage)</td></tr>
|
|
||||||
<tr class="separator:ga7b004c13448704afb0ea2040d69468c1"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:ga1f3c6cf6667655f83777acda7387ddff"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#ga1f3c6cf6667655f83777acda7387ddff">AConfiguration_setLanguage</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config, const char *language)</td></tr>
|
|
||||||
<tr class="separator:ga1f3c6cf6667655f83777acda7387ddff"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:gad2b47f787012a82a67a20e5de5211d46"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#gad2b47f787012a82a67a20e5de5211d46">AConfiguration_getCountry</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config, char *outCountry)</td></tr>
|
|
||||||
<tr class="separator:gad2b47f787012a82a67a20e5de5211d46"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:gac2f5d414a6466634b1639b5c6f8879ac"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#gac2f5d414a6466634b1639b5c6f8879ac">AConfiguration_setCountry</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config, const char *country)</td></tr>
|
|
||||||
<tr class="separator:gac2f5d414a6466634b1639b5c6f8879ac"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:gaa7d8e3e9871dc925fef3e342a92e4e22"><td class="memItemLeft" align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#gaa7d8e3e9871dc925fef3e342a92e4e22">AConfiguration_getOrientation</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config)</td></tr>
|
|
||||||
<tr class="separator:gaa7d8e3e9871dc925fef3e342a92e4e22"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:gadcaa8540bad4172a74032143bcaade04"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#gadcaa8540bad4172a74032143bcaade04">AConfiguration_setOrientation</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config, int32_t orientation)</td></tr>
|
|
||||||
<tr class="separator:gadcaa8540bad4172a74032143bcaade04"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:gad305e6cf86fa915c24212e71bb2bf027"><td class="memItemLeft" align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#gad305e6cf86fa915c24212e71bb2bf027">AConfiguration_getTouchscreen</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config)</td></tr>
|
|
||||||
<tr class="separator:gad305e6cf86fa915c24212e71bb2bf027"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:ga0d51dbe710c1afe31ece4dd6a8c188ff"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#ga0d51dbe710c1afe31ece4dd6a8c188ff">AConfiguration_setTouchscreen</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config, int32_t touchscreen)</td></tr>
|
|
||||||
<tr class="separator:ga0d51dbe710c1afe31ece4dd6a8c188ff"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:ga4c994e0555947340582094c3da32a663"><td class="memItemLeft" align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#ga4c994e0555947340582094c3da32a663">AConfiguration_getDensity</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config)</td></tr>
|
|
||||||
<tr class="separator:ga4c994e0555947340582094c3da32a663"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:ga9217af9858a7166dcb9a877192779eac"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#ga9217af9858a7166dcb9a877192779eac">AConfiguration_setDensity</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config, int32_t density)</td></tr>
|
|
||||||
<tr class="separator:ga9217af9858a7166dcb9a877192779eac"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:gafd0f76ccd4fe4bda5172b8e0bc6675e4"><td class="memItemLeft" align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#gafd0f76ccd4fe4bda5172b8e0bc6675e4">AConfiguration_getKeyboard</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config)</td></tr>
|
|
||||||
<tr class="separator:gafd0f76ccd4fe4bda5172b8e0bc6675e4"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:ga4ab3429c5505c108c09349f1ddef572f"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#ga4ab3429c5505c108c09349f1ddef572f">AConfiguration_setKeyboard</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config, int32_t keyboard)</td></tr>
|
|
||||||
<tr class="separator:ga4ab3429c5505c108c09349f1ddef572f"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:gae3ff1541b63f5b9256f7c0ebae372977"><td class="memItemLeft" align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#gae3ff1541b63f5b9256f7c0ebae372977">AConfiguration_getNavigation</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config)</td></tr>
|
|
||||||
<tr class="separator:gae3ff1541b63f5b9256f7c0ebae372977"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:gad21dd14fb823a6a80b66132a05ce8913"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#gad21dd14fb823a6a80b66132a05ce8913">AConfiguration_setNavigation</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config, int32_t navigation)</td></tr>
|
|
||||||
<tr class="separator:gad21dd14fb823a6a80b66132a05ce8913"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:ga7a8317ab975f621f3fe62ed1b44f2605"><td class="memItemLeft" align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#ga7a8317ab975f621f3fe62ed1b44f2605">AConfiguration_getKeysHidden</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config)</td></tr>
|
|
||||||
<tr class="separator:ga7a8317ab975f621f3fe62ed1b44f2605"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:ga5a80a02aa10cfa17de0795054e927183"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#ga5a80a02aa10cfa17de0795054e927183">AConfiguration_setKeysHidden</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config, int32_t keysHidden)</td></tr>
|
|
||||||
<tr class="separator:ga5a80a02aa10cfa17de0795054e927183"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:gafe8d3a9c2f715ea76c8e4a99c2db9eaa"><td class="memItemLeft" align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#gafe8d3a9c2f715ea76c8e4a99c2db9eaa">AConfiguration_getNavHidden</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config)</td></tr>
|
|
||||||
<tr class="separator:gafe8d3a9c2f715ea76c8e4a99c2db9eaa"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:ga67e86e0347596421771af841710308d5"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#ga67e86e0347596421771af841710308d5">AConfiguration_setNavHidden</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config, int32_t navHidden)</td></tr>
|
|
||||||
<tr class="separator:ga67e86e0347596421771af841710308d5"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:ga4aa7062198e5aacd9fabb04d0453dd91"><td class="memItemLeft" align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#ga4aa7062198e5aacd9fabb04d0453dd91">AConfiguration_getSdkVersion</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config)</td></tr>
|
|
||||||
<tr class="separator:ga4aa7062198e5aacd9fabb04d0453dd91"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:ga06c66072902ee455011120188ca4810b"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#ga06c66072902ee455011120188ca4810b">AConfiguration_setSdkVersion</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config, int32_t sdkVersion)</td></tr>
|
|
||||||
<tr class="separator:ga06c66072902ee455011120188ca4810b"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:ga9d2c1b8731795d8e74be7e23cbc77552"><td class="memItemLeft" align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#ga9d2c1b8731795d8e74be7e23cbc77552">AConfiguration_getScreenSize</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config)</td></tr>
|
|
||||||
<tr class="separator:ga9d2c1b8731795d8e74be7e23cbc77552"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:ga7bcf05150933ead34a01061d05ad3245"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#ga7bcf05150933ead34a01061d05ad3245">AConfiguration_setScreenSize</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config, int32_t screenSize)</td></tr>
|
|
||||||
<tr class="separator:ga7bcf05150933ead34a01061d05ad3245"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:gab7d1f5aa59e8fa4db0a1b91bb322034c"><td class="memItemLeft" align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#gab7d1f5aa59e8fa4db0a1b91bb322034c">AConfiguration_getScreenLong</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config)</td></tr>
|
|
||||||
<tr class="separator:gab7d1f5aa59e8fa4db0a1b91bb322034c"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:gaed853ab7e2bc915591d05997130bc448"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#gaed853ab7e2bc915591d05997130bc448">AConfiguration_setScreenLong</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config, int32_t screenLong)</td></tr>
|
|
||||||
<tr class="separator:gaed853ab7e2bc915591d05997130bc448"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:ga1d75777892f38208feb3d2a94a977fcf"><td class="memItemLeft" align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#ga1d75777892f38208feb3d2a94a977fcf">AConfiguration_getUiModeType</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config)</td></tr>
|
|
||||||
<tr class="separator:ga1d75777892f38208feb3d2a94a977fcf"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:gaec61e3cf91cd79e8b76a35bbcb15789d"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#gaec61e3cf91cd79e8b76a35bbcb15789d">AConfiguration_setUiModeType</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config, int32_t uiModeType)</td></tr>
|
|
||||||
<tr class="separator:gaec61e3cf91cd79e8b76a35bbcb15789d"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:ga447f16a9e4f8400e5e0328900749ff16"><td class="memItemLeft" align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#ga447f16a9e4f8400e5e0328900749ff16">AConfiguration_getUiModeNight</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config)</td></tr>
|
|
||||||
<tr class="separator:ga447f16a9e4f8400e5e0328900749ff16"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:ga08df1e801afbe4a12411e393b8141e42"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#ga08df1e801afbe4a12411e393b8141e42">AConfiguration_setUiModeNight</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config, int32_t uiModeNight)</td></tr>
|
|
||||||
<tr class="separator:ga08df1e801afbe4a12411e393b8141e42"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:ga61e5fe9612c170c33e1c7e9fb92f2219"><td class="memItemLeft" align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#ga61e5fe9612c170c33e1c7e9fb92f2219">AConfiguration_getScreenWidthDp</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config)</td></tr>
|
|
||||||
<tr class="separator:ga61e5fe9612c170c33e1c7e9fb92f2219"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:gafc51d45679095965fe3ba1abd402f120"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#gafc51d45679095965fe3ba1abd402f120">AConfiguration_setScreenWidthDp</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config, int32_t value)</td></tr>
|
|
||||||
<tr class="separator:gafc51d45679095965fe3ba1abd402f120"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:ga9905a4765f8d0d921c476ebce01c7648"><td class="memItemLeft" align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#ga9905a4765f8d0d921c476ebce01c7648">AConfiguration_getScreenHeightDp</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config)</td></tr>
|
|
||||||
<tr class="separator:ga9905a4765f8d0d921c476ebce01c7648"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:ga6ffac3b41415ec8a3031737ccdcd63b8"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#ga6ffac3b41415ec8a3031737ccdcd63b8">AConfiguration_setScreenHeightDp</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config, int32_t value)</td></tr>
|
|
||||||
<tr class="separator:ga6ffac3b41415ec8a3031737ccdcd63b8"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:ga7fc015e41fad342edba66a003d9848aa"><td class="memItemLeft" align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#ga7fc015e41fad342edba66a003d9848aa">AConfiguration_getSmallestScreenWidthDp</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config)</td></tr>
|
|
||||||
<tr class="separator:ga7fc015e41fad342edba66a003d9848aa"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:ga6b004c9585671efc5cebd96c1d43c4f0"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#ga6b004c9585671efc5cebd96c1d43c4f0">AConfiguration_setSmallestScreenWidthDp</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config, int32_t value)</td></tr>
|
|
||||||
<tr class="separator:ga6b004c9585671efc5cebd96c1d43c4f0"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:ga13dbf2fc9a382c62b391e7de9cf9b468"><td class="memItemLeft" align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#ga13dbf2fc9a382c62b391e7de9cf9b468">AConfiguration_getLayoutDirection</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config)</td></tr>
|
|
||||||
<tr class="separator:ga13dbf2fc9a382c62b391e7de9cf9b468"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:gaaf47215cf551594f8c2a0594419b47e1"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#gaaf47215cf551594f8c2a0594419b47e1">AConfiguration_setLayoutDirection</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config, int32_t value)</td></tr>
|
|
||||||
<tr class="separator:gaaf47215cf551594f8c2a0594419b47e1"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:gabfe69b0dccae425a16fe94d084f20402"><td class="memItemLeft" align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#gabfe69b0dccae425a16fe94d084f20402">AConfiguration_diff</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config1, <a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config2)</td></tr>
|
|
||||||
<tr class="separator:gabfe69b0dccae425a16fe94d084f20402"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:gafb27b901a1d7d44ed866608fb8399a18"><td class="memItemLeft" align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#gafb27b901a1d7d44ed866608fb8399a18">AConfiguration_match</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *base, <a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *requested)</td></tr>
|
|
||||||
<tr class="separator:gafb27b901a1d7d44ed866608fb8399a18"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:gafd2bb31057c8d57efcea7603458d2a8d"><td class="memItemLeft" align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#gafd2bb31057c8d57efcea7603458d2a8d">AConfiguration_isBetterThan</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *base, <a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *test, <a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *requested)</td></tr>
|
|
||||||
<tr class="separator:gafd2bb31057c8d57efcea7603458d2a8d"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
</table>
|
|
||||||
</div><!-- contents -->
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
page.title=Deprecated List
|
|
||||||
page.customHeadTag=<link rel="stylesheet" type="text/css" href="doxygen-dac.css">
|
|
||||||
@jd:body
|
|
||||||
<!-- Generated by Doxygen 1.8.6 -->
|
|
||||||
</div><!-- top -->
|
|
||||||
<div class="header">
|
|
||||||
<div class="headertitle">
|
|
||||||
<div class="title">Deprecated List </div> </div>
|
|
||||||
</div><!--header-->
|
|
||||||
<div class="contents">
|
|
||||||
<div class="textblock"><dl class="reflist">
|
|
||||||
<dt><a class="anchor" id="_deprecated000001"></a>Global <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5ab0ca4fce673baf58447bfeb154d9a03f">ACONFIGURATION_ORIENTATION_SQUARE</a> </dt>
|
|
||||||
<dd>Not currently supported or used. </dd>
|
|
||||||
<dt><a class="anchor" id="_deprecated000002"></a>Global <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a8316a15b06353f883f2aef8bd194f79f">ACONFIGURATION_TOUCHSCREEN_STYLUS</a> </dt>
|
|
||||||
<dd>Not currently supported or used. </dd>
|
|
||||||
<dt><a class="anchor" id="_deprecated000004"></a>Global <a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffa0377f46a626d411ace179c1c27d0a3f7">AWINDOW_FLAG_BLUR_BEHIND</a> </dt>
|
|
||||||
<dd>Blurring is no longer supported. </dd>
|
|
||||||
<dt><a class="anchor" id="_deprecated000006"></a>Global <a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffae73488b436aaea163ba2f7051bf93d9d">AWINDOW_FLAG_DITHER</a> </dt>
|
|
||||||
<dd>This flag is no longer used. </dd>
|
|
||||||
<dt><a class="anchor" id="_deprecated000005"></a>Global <a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffa5574a513645e6e7cb4d6a9f4a043d773">AWINDOW_FLAG_TOUCHABLE_WHEN_WAKING</a> </dt>
|
|
||||||
<dd>This flag has no effect. </dd>
|
|
||||||
</dl>
|
|
||||||
</div></div><!-- contents -->
|
|
||||||
@@ -1,49 +0,0 @@
|
|||||||
page.title=android Directory Reference
|
|
||||||
page.customHeadTag=<link rel="stylesheet" type="text/css" href="doxygen-dac.css">
|
|
||||||
@jd:body
|
|
||||||
<!-- Generated by Doxygen 1.8.6 -->
|
|
||||||
<div id="nav-path" class="navpath">
|
|
||||||
<ul>
|
|
||||||
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_035c76f7235f5f563d38e3ab90cb9716.html">android</a></li> </ul>
|
|
||||||
</div>
|
|
||||||
</div><!-- top -->
|
|
||||||
<div class="header">
|
|
||||||
<div class="headertitle">
|
|
||||||
<div class="title">android Directory Reference</div> </div>
|
|
||||||
</div><!--header-->
|
|
||||||
<div class="contents">
|
|
||||||
<table class="memberdecls">
|
|
||||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="files"></a>
|
|
||||||
Files</h2></td></tr>
|
|
||||||
<tr class="memitem:asset__manager_8h"><td class="memItemLeft" align="right" valign="top">file  </td><td class="memItemRight" valign="bottom"><a class="el" href="asset__manager_8h.html">asset_manager.h</a></td></tr>
|
|
||||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:asset__manager__jni_8h"><td class="memItemLeft" align="right" valign="top">file  </td><td class="memItemRight" valign="bottom"><a class="el" href="asset__manager__jni_8h.html">asset_manager_jni.h</a></td></tr>
|
|
||||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:bitmap_8h"><td class="memItemLeft" align="right" valign="top">file  </td><td class="memItemRight" valign="bottom"><a class="el" href="bitmap_8h.html">bitmap.h</a></td></tr>
|
|
||||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:configuration_8h"><td class="memItemLeft" align="right" valign="top">file  </td><td class="memItemRight" valign="bottom"><a class="el" href="configuration_8h.html">configuration.h</a></td></tr>
|
|
||||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:input_8h"><td class="memItemLeft" align="right" valign="top">file  </td><td class="memItemRight" valign="bottom"><a class="el" href="input_8h.html">input.h</a></td></tr>
|
|
||||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:keycodes_8h"><td class="memItemLeft" align="right" valign="top">file  </td><td class="memItemRight" valign="bottom"><a class="el" href="keycodes_8h.html">keycodes.h</a></td></tr>
|
|
||||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:looper_8h"><td class="memItemLeft" align="right" valign="top">file  </td><td class="memItemRight" valign="bottom"><a class="el" href="looper_8h.html">looper.h</a></td></tr>
|
|
||||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:native__activity_8h"><td class="memItemLeft" align="right" valign="top">file  </td><td class="memItemRight" valign="bottom"><a class="el" href="native__activity_8h.html">native_activity.h</a></td></tr>
|
|
||||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:native__window_8h"><td class="memItemLeft" align="right" valign="top">file  </td><td class="memItemRight" valign="bottom"><a class="el" href="native__window_8h.html">native_window.h</a></td></tr>
|
|
||||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:native__window__jni_8h"><td class="memItemLeft" align="right" valign="top">file  </td><td class="memItemRight" valign="bottom"><a class="el" href="native__window__jni_8h.html">native_window_jni.h</a></td></tr>
|
|
||||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:obb_8h"><td class="memItemLeft" align="right" valign="top">file  </td><td class="memItemRight" valign="bottom"><a class="el" href="obb_8h.html">obb.h</a></td></tr>
|
|
||||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:rect_8h"><td class="memItemLeft" align="right" valign="top">file  </td><td class="memItemRight" valign="bottom"><a class="el" href="rect_8h.html">rect.h</a></td></tr>
|
|
||||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:sensor_8h"><td class="memItemLeft" align="right" valign="top">file  </td><td class="memItemRight" valign="bottom"><a class="el" href="sensor_8h.html">sensor.h</a></td></tr>
|
|
||||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:storage__manager_8h"><td class="memItemLeft" align="right" valign="top">file  </td><td class="memItemRight" valign="bottom"><a class="el" href="storage__manager_8h.html">storage_manager.h</a></td></tr>
|
|
||||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:window_8h"><td class="memItemLeft" align="right" valign="top">file  </td><td class="memItemRight" valign="bottom"><a class="el" href="window_8h.html">window.h</a></td></tr>
|
|
||||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
</table>
|
|
||||||
</div><!-- contents -->
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
page.title=include Directory Reference
|
|
||||||
page.customHeadTag=<link rel="stylesheet" type="text/css" href="doxygen-dac.css">
|
|
||||||
@jd:body
|
|
||||||
<!-- Generated by Doxygen 1.8.6 -->
|
|
||||||
<div id="nav-path" class="navpath">
|
|
||||||
<ul>
|
|
||||||
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li> </ul>
|
|
||||||
</div>
|
|
||||||
</div><!-- top -->
|
|
||||||
<div class="header">
|
|
||||||
<div class="headertitle">
|
|
||||||
<div class="title">include Directory Reference</div> </div>
|
|
||||||
</div><!--header-->
|
|
||||||
<div class="contents">
|
|
||||||
<table class="memberdecls">
|
|
||||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="subdirs"></a>
|
|
||||||
Directories</h2></td></tr>
|
|
||||||
<tr class="memitem:dir_035c76f7235f5f563d38e3ab90cb9716"><td class="memItemLeft" align="right" valign="top">directory  </td><td class="memItemRight" valign="bottom"><a class="el" href="dir_035c76f7235f5f563d38e3ab90cb9716.html">android</a></td></tr>
|
|
||||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
</table>
|
|
||||||
</div><!-- contents -->
|
|
||||||
@@ -1,53 +0,0 @@
|
|||||||
#jd-content td {
|
|
||||||
}
|
|
||||||
|
|
||||||
#jd-content table {
|
|
||||||
background-color: transparent;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
#jd-content tr.heading td {
|
|
||||||
background-color: #999;
|
|
||||||
padding: 0px 12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#jd-content tr.heading h2 {
|
|
||||||
font-size: 14px;
|
|
||||||
font-weight: bold;
|
|
||||||
font-family: Roboto, sans-serif;
|
|
||||||
margin: 0px;
|
|
||||||
color: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
#jd-content tr.heading hr, #jd-content td.memSeparator, #jd-content div.headertitle {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#jd-content table td.memItemLeft {
|
|
||||||
text-align: right;
|
|
||||||
width: 20%;
|
|
||||||
}
|
|
||||||
|
|
||||||
#jd-content table td.memItemRight {
|
|
||||||
}
|
|
||||||
|
|
||||||
#jd-content div.memproto {
|
|
||||||
font-size: 1.15em;
|
|
||||||
background-color: #e2e2e2;
|
|
||||||
padding: 3px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#jd-content div.memproto table {
|
|
||||||
margin: 0px;
|
|
||||||
width: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
#jd-content table.memname td {
|
|
||||||
border: none;
|
|
||||||
padding: 2px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#jd-content div.memdoc {
|
|
||||||
margin: 7px 18px;
|
|
||||||
}
|
|
||||||
|
Before Width: | Height: | Size: 3.4 KiB |
@@ -1,97 +0,0 @@
|
|||||||
function toggleVisibility(linkObj)
|
|
||||||
{
|
|
||||||
var base = $(linkObj).attr('id');
|
|
||||||
var summary = $('#'+base+'-summary');
|
|
||||||
var content = $('#'+base+'-content');
|
|
||||||
var trigger = $('#'+base+'-trigger');
|
|
||||||
var src=$(trigger).attr('src');
|
|
||||||
if (content.is(':visible')===true) {
|
|
||||||
content.hide();
|
|
||||||
summary.show();
|
|
||||||
$(linkObj).addClass('closed').removeClass('opened');
|
|
||||||
$(trigger).attr('src',src.substring(0,src.length-8)+'closed.png');
|
|
||||||
} else {
|
|
||||||
content.show();
|
|
||||||
summary.hide();
|
|
||||||
$(linkObj).removeClass('closed').addClass('opened');
|
|
||||||
$(trigger).attr('src',src.substring(0,src.length-10)+'open.png');
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
function updateStripes()
|
|
||||||
{
|
|
||||||
$('table.directory tr').
|
|
||||||
removeClass('even').filter(':visible:even').addClass('even');
|
|
||||||
}
|
|
||||||
function toggleLevel(level)
|
|
||||||
{
|
|
||||||
$('table.directory tr').each(function(){
|
|
||||||
var l = this.id.split('_').length-1;
|
|
||||||
var i = $('#img'+this.id.substring(3));
|
|
||||||
var a = $('#arr'+this.id.substring(3));
|
|
||||||
if (l<level+1) {
|
|
||||||
i.attr('src','ftv2folderopen.png');
|
|
||||||
a.attr('src','ftv2mnode.png');
|
|
||||||
$(this).show();
|
|
||||||
} else if (l==level+1) {
|
|
||||||
i.attr('src','ftv2folderclosed.png');
|
|
||||||
a.attr('src','ftv2pnode.png');
|
|
||||||
$(this).show();
|
|
||||||
} else {
|
|
||||||
$(this).hide();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
updateStripes();
|
|
||||||
}
|
|
||||||
|
|
||||||
function toggleFolder(id)
|
|
||||||
{
|
|
||||||
//The clicked row
|
|
||||||
var currentRow = $('#row_'+id);
|
|
||||||
var currentRowImages = currentRow.find("img");
|
|
||||||
|
|
||||||
//All rows after the clicked row
|
|
||||||
var rows = currentRow.nextAll("tr");
|
|
||||||
|
|
||||||
//Only match elements AFTER this one (can't hide elements before)
|
|
||||||
var childRows = rows.filter(function() {
|
|
||||||
var re = new RegExp('^row_'+id+'\\d+_$', "i"); //only one sub
|
|
||||||
return this.id.match(re);
|
|
||||||
});
|
|
||||||
|
|
||||||
//First row is visible we are HIDING
|
|
||||||
if (childRows.filter(':first').is(':visible')===true) {
|
|
||||||
currentRowImages.filter("[id^=arr]").attr('src', 'ftv2pnode.png');
|
|
||||||
currentRowImages.filter("[id^=img]").attr('src', 'ftv2folderclosed.png');
|
|
||||||
rows.filter("[id^=row_"+id+"]").hide();
|
|
||||||
} else { //We are SHOWING
|
|
||||||
//All sub images
|
|
||||||
var childImages = childRows.find("img");
|
|
||||||
var childImg = childImages.filter("[id^=img]");
|
|
||||||
var childArr = childImages.filter("[id^=arr]");
|
|
||||||
|
|
||||||
currentRow.find("[id^=arr]").attr('src', 'ftv2mnode.png'); //open row
|
|
||||||
currentRow.find("[id^=img]").attr('src', 'ftv2folderopen.png'); //open row
|
|
||||||
childImg.attr('src','ftv2folderclosed.png'); //children closed
|
|
||||||
childArr.attr('src','ftv2pnode.png'); //children closed
|
|
||||||
childRows.show(); //show all children
|
|
||||||
}
|
|
||||||
updateStripes();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function toggleInherit(id)
|
|
||||||
{
|
|
||||||
var rows = $('tr.inherit.'+id);
|
|
||||||
var img = $('tr.inherit_header.'+id+' img');
|
|
||||||
var src = $(img).attr('src');
|
|
||||||
if (rows.filter(':first').is(':visible')===true) {
|
|
||||||
rows.css('display','none');
|
|
||||||
$(img).attr('src',src.substring(0,src.length-8)+'closed.png');
|
|
||||||
} else {
|
|
||||||
rows.css('display','table-row'); // using show() causes jump in firefox
|
|
||||||
$(img).attr('src',src.substring(0,src.length-10)+'open.png');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
page.title=File List
|
|
||||||
page.customHeadTag=<link rel="stylesheet" type="text/css" href="doxygen-dac.css">
|
|
||||||
@jd:body
|
|
||||||
<!-- Generated by Doxygen 1.8.6 -->
|
|
||||||
</div><!-- top -->
|
|
||||||
<div class="header">
|
|
||||||
<div class="headertitle">
|
|
||||||
<div class="title">File List</div> </div>
|
|
||||||
</div><!--header-->
|
|
||||||
<div class="contents">
|
|
||||||
<div class="textblock">Here is a list of all files with brief descriptions:</div><div class="directory">
|
|
||||||
<table class="directory">
|
|
||||||
<tr id="row_0_" class="even"><td class="entry"><img src="ftv2node.png" alt="o" width="16" height="22" /><img src="ftv2doc.png" alt="*" width="24" height="22" /><a class="el" href="asset__manager_8h.html" target="_self">asset_manager.h</a></td><td class="desc"></td></tr>
|
|
||||||
<tr id="row_1_"><td class="entry"><img src="ftv2node.png" alt="o" width="16" height="22" /><img src="ftv2doc.png" alt="*" width="24" height="22" /><a class="el" href="asset__manager__jni_8h.html" target="_self">asset_manager_jni.h</a></td><td class="desc"></td></tr>
|
|
||||||
<tr id="row_2_" class="even"><td class="entry"><img src="ftv2node.png" alt="o" width="16" height="22" /><img src="ftv2doc.png" alt="*" width="24" height="22" /><a class="el" href="bitmap_8h.html" target="_self">bitmap.h</a></td><td class="desc"></td></tr>
|
|
||||||
<tr id="row_3_"><td class="entry"><img src="ftv2node.png" alt="o" width="16" height="22" /><img src="ftv2doc.png" alt="*" width="24" height="22" /><a class="el" href="configuration_8h.html" target="_self">configuration.h</a></td><td class="desc"></td></tr>
|
|
||||||
<tr id="row_4_" class="even"><td class="entry"><img src="ftv2node.png" alt="o" width="16" height="22" /><img src="ftv2doc.png" alt="*" width="24" height="22" /><a class="el" href="input_8h.html" target="_self">input.h</a></td><td class="desc"></td></tr>
|
|
||||||
<tr id="row_5_"><td class="entry"><img src="ftv2node.png" alt="o" width="16" height="22" /><img src="ftv2doc.png" alt="*" width="24" height="22" /><a class="el" href="keycodes_8h.html" target="_self">keycodes.h</a></td><td class="desc"></td></tr>
|
|
||||||
<tr id="row_6_" class="even"><td class="entry"><img src="ftv2node.png" alt="o" width="16" height="22" /><img src="ftv2doc.png" alt="*" width="24" height="22" /><a class="el" href="looper_8h.html" target="_self">looper.h</a></td><td class="desc"></td></tr>
|
|
||||||
<tr id="row_7_"><td class="entry"><img src="ftv2node.png" alt="o" width="16" height="22" /><img src="ftv2doc.png" alt="*" width="24" height="22" /><a class="el" href="native__activity_8h.html" target="_self">native_activity.h</a></td><td class="desc"></td></tr>
|
|
||||||
<tr id="row_8_" class="even"><td class="entry"><img src="ftv2node.png" alt="o" width="16" height="22" /><img src="ftv2doc.png" alt="*" width="24" height="22" /><a class="el" href="native__window_8h.html" target="_self">native_window.h</a></td><td class="desc"></td></tr>
|
|
||||||
<tr id="row_9_"><td class="entry"><img src="ftv2node.png" alt="o" width="16" height="22" /><img src="ftv2doc.png" alt="*" width="24" height="22" /><a class="el" href="native__window__jni_8h.html" target="_self">native_window_jni.h</a></td><td class="desc"></td></tr>
|
|
||||||
<tr id="row_10_" class="even"><td class="entry"><img src="ftv2node.png" alt="o" width="16" height="22" /><img src="ftv2doc.png" alt="*" width="24" height="22" /><a class="el" href="obb_8h.html" target="_self">obb.h</a></td><td class="desc"></td></tr>
|
|
||||||
<tr id="row_11_"><td class="entry"><img src="ftv2node.png" alt="o" width="16" height="22" /><img src="ftv2doc.png" alt="*" width="24" height="22" /><a class="el" href="rect_8h.html" target="_self">rect.h</a></td><td class="desc"></td></tr>
|
|
||||||
<tr id="row_12_" class="even"><td class="entry"><img src="ftv2node.png" alt="o" width="16" height="22" /><img src="ftv2doc.png" alt="*" width="24" height="22" /><a class="el" href="sensor_8h.html" target="_self">sensor.h</a></td><td class="desc"></td></tr>
|
|
||||||
<tr id="row_13_"><td class="entry"><img src="ftv2node.png" alt="o" width="16" height="22" /><img src="ftv2doc.png" alt="*" width="24" height="22" /><a class="el" href="storage__manager_8h.html" target="_self">storage_manager.h</a></td><td class="desc"></td></tr>
|
|
||||||
<tr id="row_14_" class="even"><td class="entry"><img src="ftv2lastnode.png" alt="\" width="16" height="22" /><img src="ftv2doc.png" alt="*" width="24" height="22" /><a class="el" href="window_8h.html" target="_self">window.h</a></td><td class="desc"></td></tr>
|
|
||||||
</table>
|
|
||||||
</div><!-- directory -->
|
|
||||||
</div><!-- contents -->
|
|
||||||
|
Before Width: | Height: | Size: 86 B |
|
Before Width: | Height: | Size: 416 B |
|
Before Width: | Height: | Size: 652 B |
|
Before Width: | Height: | Size: 493 B |
|
Before Width: | Height: | Size: 505 B |
|
Before Width: | Height: | Size: 86 B |
|
Before Width: | Height: | Size: 652 B |
|
Before Width: | Height: | Size: 241 B |
|
Before Width: | Height: | Size: 241 B |
|
Before Width: | Height: | Size: 373 B |
|
Before Width: | Height: | Size: 86 B |
|
Before Width: | Height: | Size: 370 B |
|
Before Width: | Height: | Size: 227 B |
|
Before Width: | Height: | Size: 227 B |
|
Before Width: | Height: | Size: 282 B |
|
Before Width: | Height: | Size: 86 B |
@@ -1,327 +0,0 @@
|
|||||||
page.title=Data Fields
|
|
||||||
page.customHeadTag=<link rel="stylesheet" type="text/css" href="doxygen-dac.css">
|
|
||||||
@jd:body
|
|
||||||
<!-- Generated by Doxygen 1.8.6 -->
|
|
||||||
</div><!-- top -->
|
|
||||||
<div class="contents">
|
|
||||||
<div class="textblock">Here is a list of all struct and union fields with links to the structures/unions they belong to:</div>
|
|
||||||
|
|
||||||
<h3><a class="anchor" id="index_a"></a>- a -</h3><ul>
|
|
||||||
<li>acceleration
|
|
||||||
: <a class="el" href="struct_a_sensor_event.html#aab1f50881089166ff5f3d46f7bfcf09c">ASensorEvent</a>
|
|
||||||
</li>
|
|
||||||
<li>assetManager
|
|
||||||
: <a class="el" href="struct_a_native_activity.html#a0f76f065768b8f896ce47a3089fb438d">ANativeActivity</a>
|
|
||||||
</li>
|
|
||||||
<li>azimuth
|
|
||||||
: <a class="el" href="struct_a_sensor_vector.html#a01b03ebfa7d0a95760e743f611fecbc5">ASensorVector</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
<h3><a class="anchor" id="index_b"></a>- b -</h3><ul>
|
|
||||||
<li>bias
|
|
||||||
: <a class="el" href="struct_a_uncalibrated_event.html#a52bd7f09c4decadcfbc0347fda4163d6">AUncalibratedEvent</a>
|
|
||||||
</li>
|
|
||||||
<li>bits
|
|
||||||
: <a class="el" href="struct_a_native_window___buffer.html#a089d8e968fac54a9e45f059b8b78cf9b">ANativeWindow_Buffer</a>
|
|
||||||
</li>
|
|
||||||
<li>bottom
|
|
||||||
: <a class="el" href="struct_a_rect.html#a4479860c72ca8e96ac4fb1cc149dd71b">ARect</a>
|
|
||||||
</li>
|
|
||||||
<li>bpm
|
|
||||||
: <a class="el" href="struct_a_heart_rate_event.html#ab0560092cbaa233e74bb0d543a85965d">AHeartRateEvent</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
<h3><a class="anchor" id="index_c"></a>- c -</h3><ul>
|
|
||||||
<li>callbacks
|
|
||||||
: <a class="el" href="struct_a_native_activity.html#af96995a13e77baf0d71c37d20c79ad51">ANativeActivity</a>
|
|
||||||
</li>
|
|
||||||
<li>clazz
|
|
||||||
: <a class="el" href="struct_a_native_activity.html#ab10b01c3c23c4ddb9d2ddadd71b03c94">ANativeActivity</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
<h3><a class="anchor" id="index_d"></a>- d -</h3><ul>
|
|
||||||
<li>data
|
|
||||||
: <a class="el" href="struct_a_sensor_event.html#a31244897a6c7f657a9aec807dd1e09ae">ASensorEvent</a>
|
|
||||||
</li>
|
|
||||||
<li>distance
|
|
||||||
: <a class="el" href="struct_a_sensor_event.html#a06f14a9abd47b91465f895d5259cdc1b">ASensorEvent</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
<h3><a class="anchor" id="index_e"></a>- e -</h3><ul>
|
|
||||||
<li>env
|
|
||||||
: <a class="el" href="struct_a_native_activity.html#ae6f0d0cd46e56b7e299b489cb60dd27e">ANativeActivity</a>
|
|
||||||
</li>
|
|
||||||
<li>externalDataPath
|
|
||||||
: <a class="el" href="struct_a_native_activity.html#a2a61553b2f660ea8b57fcc2b495e109f">ANativeActivity</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
<h3><a class="anchor" id="index_f"></a>- f -</h3><ul>
|
|
||||||
<li>flags
|
|
||||||
: <a class="el" href="struct_android_bitmap_info.html#a773b39d480759f67926cb18ae2219281">AndroidBitmapInfo</a>
|
|
||||||
, <a class="el" href="struct_a_sensor_event.html#a773b39d480759f67926cb18ae2219281">ASensorEvent</a>
|
|
||||||
</li>
|
|
||||||
<li>format
|
|
||||||
: <a class="el" href="struct_a_native_window___buffer.html#a49d503b84d084937e3ceeda9f0b4659e">ANativeWindow_Buffer</a>
|
|
||||||
, <a class="el" href="struct_android_bitmap_info.html#a49d503b84d084937e3ceeda9f0b4659e">AndroidBitmapInfo</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
<h3><a class="anchor" id="index_h"></a>- h -</h3><ul>
|
|
||||||
<li>heart_rate
|
|
||||||
: <a class="el" href="struct_a_sensor_event.html#a2325abb12f65d7cbceec766e6db506d8">ASensorEvent</a>
|
|
||||||
</li>
|
|
||||||
<li>height
|
|
||||||
: <a class="el" href="struct_a_native_window___buffer.html#a5d8006e753a3e76ff637a4e092bbed71">ANativeWindow_Buffer</a>
|
|
||||||
, <a class="el" href="struct_android_bitmap_info.html#a6ad4f820ce4e75cda0686fcaad5168be">AndroidBitmapInfo</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
<h3><a class="anchor" id="index_i"></a>- i -</h3><ul>
|
|
||||||
<li>instance
|
|
||||||
: <a class="el" href="struct_a_native_activity.html#ae1b90392cd257d16fd66a85bac1b08cd">ANativeActivity</a>
|
|
||||||
</li>
|
|
||||||
<li>internalDataPath
|
|
||||||
: <a class="el" href="struct_a_native_activity.html#aa52947cdd1476b95e858d83c0f5b0220">ANativeActivity</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
<h3><a class="anchor" id="index_l"></a>- l -</h3><ul>
|
|
||||||
<li>left
|
|
||||||
: <a class="el" href="struct_a_rect.html#a9ee4ce87784b0ebeaadce132ce7d421f">ARect</a>
|
|
||||||
</li>
|
|
||||||
<li>light
|
|
||||||
: <a class="el" href="struct_a_sensor_event.html#aaf8b2537020ae0b7450785724d77a3e0">ASensorEvent</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
<h3><a class="anchor" id="index_m"></a>- m -</h3><ul>
|
|
||||||
<li>magnetic
|
|
||||||
: <a class="el" href="struct_a_sensor_event.html#a776bc8e3beff52764ef2d6d423563d64">ASensorEvent</a>
|
|
||||||
</li>
|
|
||||||
<li>meta_data
|
|
||||||
: <a class="el" href="struct_a_sensor_event.html#a40a6e69697a42e0f0ad04a09d7f113d3">ASensorEvent</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
<h3><a class="anchor" id="index_o"></a>- o -</h3><ul>
|
|
||||||
<li>obbPath
|
|
||||||
: <a class="el" href="struct_a_native_activity.html#a0aff284eb9ab311d81f20955258798cf">ANativeActivity</a>
|
|
||||||
</li>
|
|
||||||
<li>onConfigurationChanged
|
|
||||||
: <a class="el" href="struct_a_native_activity_callbacks.html#a2926b45334319089e4e25fbc86d74c3f">ANativeActivityCallbacks</a>
|
|
||||||
</li>
|
|
||||||
<li>onContentRectChanged
|
|
||||||
: <a class="el" href="struct_a_native_activity_callbacks.html#a61d30a43b3c77b6047afe951706f6a1e">ANativeActivityCallbacks</a>
|
|
||||||
</li>
|
|
||||||
<li>onDestroy
|
|
||||||
: <a class="el" href="struct_a_native_activity_callbacks.html#a45598ebed3d15847b4f97acb9e15076e">ANativeActivityCallbacks</a>
|
|
||||||
</li>
|
|
||||||
<li>onInputQueueCreated
|
|
||||||
: <a class="el" href="struct_a_native_activity_callbacks.html#a17b41ec9bb8b0b9e42d1e269a62a4d59">ANativeActivityCallbacks</a>
|
|
||||||
</li>
|
|
||||||
<li>onInputQueueDestroyed
|
|
||||||
: <a class="el" href="struct_a_native_activity_callbacks.html#a82675193f867bc64180016923b0bb129">ANativeActivityCallbacks</a>
|
|
||||||
</li>
|
|
||||||
<li>onLowMemory
|
|
||||||
: <a class="el" href="struct_a_native_activity_callbacks.html#aac61f647cbd971321c692a74a1136f67">ANativeActivityCallbacks</a>
|
|
||||||
</li>
|
|
||||||
<li>onNativeWindowCreated
|
|
||||||
: <a class="el" href="struct_a_native_activity_callbacks.html#ac997f07e53ba58179a2133e86e5cbd31">ANativeActivityCallbacks</a>
|
|
||||||
</li>
|
|
||||||
<li>onNativeWindowDestroyed
|
|
||||||
: <a class="el" href="struct_a_native_activity_callbacks.html#a150442c0611e8ce24a32a7c805e7c9db">ANativeActivityCallbacks</a>
|
|
||||||
</li>
|
|
||||||
<li>onNativeWindowRedrawNeeded
|
|
||||||
: <a class="el" href="struct_a_native_activity_callbacks.html#a3cad4792af363b9a40599d09afeab56c">ANativeActivityCallbacks</a>
|
|
||||||
</li>
|
|
||||||
<li>onNativeWindowResized
|
|
||||||
: <a class="el" href="struct_a_native_activity_callbacks.html#ab7bd120b8816508561126308f699f116">ANativeActivityCallbacks</a>
|
|
||||||
</li>
|
|
||||||
<li>onPause
|
|
||||||
: <a class="el" href="struct_a_native_activity_callbacks.html#aee8a4dcff234b94d0bf0bc85efea42c2">ANativeActivityCallbacks</a>
|
|
||||||
</li>
|
|
||||||
<li>onResume
|
|
||||||
: <a class="el" href="struct_a_native_activity_callbacks.html#ac2c85491a68e6dece3d82782c1254e73">ANativeActivityCallbacks</a>
|
|
||||||
</li>
|
|
||||||
<li>onSaveInstanceState
|
|
||||||
: <a class="el" href="struct_a_native_activity_callbacks.html#a16a270d24a484a376e28bc6c48fc22a1">ANativeActivityCallbacks</a>
|
|
||||||
</li>
|
|
||||||
<li>onStart
|
|
||||||
: <a class="el" href="struct_a_native_activity_callbacks.html#acda344fd29c2018640a85a585317d92c">ANativeActivityCallbacks</a>
|
|
||||||
</li>
|
|
||||||
<li>onStop
|
|
||||||
: <a class="el" href="struct_a_native_activity_callbacks.html#adefa99d16d11d21bb8a83ba426047605">ANativeActivityCallbacks</a>
|
|
||||||
</li>
|
|
||||||
<li>onWindowFocusChanged
|
|
||||||
: <a class="el" href="struct_a_native_activity_callbacks.html#a620ef54556eac0b2b28d7e6d0644ee4a">ANativeActivityCallbacks</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
<h3><a class="anchor" id="index_p"></a>- p -</h3><ul>
|
|
||||||
<li>pitch
|
|
||||||
: <a class="el" href="struct_a_sensor_vector.html#a282e7d4378d4a18a805b8980295ac86c">ASensorVector</a>
|
|
||||||
</li>
|
|
||||||
<li>pressure
|
|
||||||
: <a class="el" href="struct_a_sensor_event.html#ac870e1249bab4a2a68cc4126761d24ef">ASensorEvent</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
<h3><a class="anchor" id="index_r"></a>- r -</h3><ul>
|
|
||||||
<li>relative_humidity
|
|
||||||
: <a class="el" href="struct_a_sensor_event.html#ad60830bc80efb7e8a11d6fb25518f55b">ASensorEvent</a>
|
|
||||||
</li>
|
|
||||||
<li>reserved
|
|
||||||
: <a class="el" href="struct_a_native_window___buffer.html#a60cc5aad4013157e2e7434d6de450656">ANativeWindow_Buffer</a>
|
|
||||||
, <a class="el" href="struct_a_sensor_vector.html#a72aca6ea6d8153b28ea8f139b932ec3e">ASensorVector</a>
|
|
||||||
</li>
|
|
||||||
<li>reserved0
|
|
||||||
: <a class="el" href="struct_a_sensor_event.html#a3b1869501b35bf41f2ff54de072b6c2c">ASensorEvent</a>
|
|
||||||
</li>
|
|
||||||
<li>reserved1
|
|
||||||
: <a class="el" href="struct_a_sensor_event.html#a3c2ed5a26d302c47f7b3f2dd0bbf7f94">ASensorEvent</a>
|
|
||||||
</li>
|
|
||||||
<li>right
|
|
||||||
: <a class="el" href="struct_a_rect.html#a3d3a4d6bf8bc6c866fa737e11590cc4e">ARect</a>
|
|
||||||
</li>
|
|
||||||
<li>roll
|
|
||||||
: <a class="el" href="struct_a_sensor_vector.html#a26fd84d522945b6038221d9e38c7cc39">ASensorVector</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
<h3><a class="anchor" id="index_s"></a>- s -</h3><ul>
|
|
||||||
<li>sdkVersion
|
|
||||||
: <a class="el" href="struct_a_native_activity.html#a40b4b64be7ecfac23751618313eb610d">ANativeActivity</a>
|
|
||||||
</li>
|
|
||||||
<li>sensor
|
|
||||||
: <a class="el" href="struct_a_meta_data_event.html#a470f19badf179fe205462c060e5175b4">AMetaDataEvent</a>
|
|
||||||
, <a class="el" href="struct_a_sensor_event.html#a470f19badf179fe205462c060e5175b4">ASensorEvent</a>
|
|
||||||
</li>
|
|
||||||
<li>status
|
|
||||||
: <a class="el" href="struct_a_heart_rate_event.html#a555c2084e8436de01dc76a23590e8824">AHeartRateEvent</a>
|
|
||||||
, <a class="el" href="struct_a_sensor_vector.html#a555c2084e8436de01dc76a23590e8824">ASensorVector</a>
|
|
||||||
</li>
|
|
||||||
<li>step_counter
|
|
||||||
: <a class="el" href="struct_a_sensor_event.html#a2e54280490afc977b11157e387841145">ASensorEvent</a>
|
|
||||||
</li>
|
|
||||||
<li>stride
|
|
||||||
: <a class="el" href="struct_a_native_window___buffer.html#a4438e3445d33be6d33b2c0dbe9c2e0d7">ANativeWindow_Buffer</a>
|
|
||||||
, <a class="el" href="struct_android_bitmap_info.html#a981556a4e63b7b6d9f94975c7a8930ab">AndroidBitmapInfo</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
<h3><a class="anchor" id="index_t"></a>- t -</h3><ul>
|
|
||||||
<li>temperature
|
|
||||||
: <a class="el" href="struct_a_sensor_event.html#afc1d28cfbce795d6ea954ebe725241f5">ASensorEvent</a>
|
|
||||||
</li>
|
|
||||||
<li>timestamp
|
|
||||||
: <a class="el" href="struct_a_sensor_event.html#a8a591d341723df9496cda98e225b25b4">ASensorEvent</a>
|
|
||||||
</li>
|
|
||||||
<li>top
|
|
||||||
: <a class="el" href="struct_a_rect.html#ad07137116129d873220209ea65f9d3d4">ARect</a>
|
|
||||||
</li>
|
|
||||||
<li>type
|
|
||||||
: <a class="el" href="struct_a_sensor_event.html#a449e574ed6911881dc55507cb5635c2c">ASensorEvent</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
<h3><a class="anchor" id="index_u"></a>- u -</h3><ul>
|
|
||||||
<li>u64
|
|
||||||
: <a class="el" href="struct_a_sensor_event.html#a89806d4445310e62ed4b68c9e2698b27">ASensorEvent</a>
|
|
||||||
</li>
|
|
||||||
<li>uncalib
|
|
||||||
: <a class="el" href="struct_a_uncalibrated_event.html#a9c22454e765672782b7198d57a92f5fd">AUncalibratedEvent</a>
|
|
||||||
</li>
|
|
||||||
<li>uncalibrated_gyro
|
|
||||||
: <a class="el" href="struct_a_sensor_event.html#a4e35158edcd83e4651d7083ebdb41bae">ASensorEvent</a>
|
|
||||||
</li>
|
|
||||||
<li>uncalibrated_magnetic
|
|
||||||
: <a class="el" href="struct_a_sensor_event.html#a3c746f01a48fbdefaad12c35be0dd715">ASensorEvent</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
<h3><a class="anchor" id="index_v"></a>- v -</h3><ul>
|
|
||||||
<li>v
|
|
||||||
: <a class="el" href="struct_a_sensor_vector.html#a9a1a1a00f1e45435cc3001b553000a21">ASensorVector</a>
|
|
||||||
</li>
|
|
||||||
<li>vector
|
|
||||||
: <a class="el" href="struct_a_sensor_event.html#aebf12879fa9b61c671584994ddad9610">ASensorEvent</a>
|
|
||||||
</li>
|
|
||||||
<li>version
|
|
||||||
: <a class="el" href="struct_a_sensor_event.html#a67fae7dd1de9edce3656ed214d20377f">ASensorEvent</a>
|
|
||||||
</li>
|
|
||||||
<li>vm
|
|
||||||
: <a class="el" href="struct_a_native_activity.html#a5e163c28566d4563eafeabd7dcab7eeb">ANativeActivity</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
<h3><a class="anchor" id="index_w"></a>- w -</h3><ul>
|
|
||||||
<li>what
|
|
||||||
: <a class="el" href="struct_a_meta_data_event.html#a397e31e246d23c1be3fa82ca4af8b930">AMetaDataEvent</a>
|
|
||||||
</li>
|
|
||||||
<li>width
|
|
||||||
: <a class="el" href="struct_a_native_window___buffer.html#a395d15e7c2b09961c1bfd1da6179b64c">ANativeWindow_Buffer</a>
|
|
||||||
, <a class="el" href="struct_android_bitmap_info.html#a325272ddd9a962f05deb905101d25cbd">AndroidBitmapInfo</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
<h3><a class="anchor" id="index_x"></a>- x -</h3><ul>
|
|
||||||
<li>x
|
|
||||||
: <a class="el" href="struct_a_sensor_vector.html#ad0da36b2558901e21e7a30f6c227a45e">ASensorVector</a>
|
|
||||||
</li>
|
|
||||||
<li>x_bias
|
|
||||||
: <a class="el" href="struct_a_uncalibrated_event.html#a56c4ea73587a9ea20595cca9bcfe9593">AUncalibratedEvent</a>
|
|
||||||
</li>
|
|
||||||
<li>x_uncalib
|
|
||||||
: <a class="el" href="struct_a_uncalibrated_event.html#ac8b7f8daea042eaa2b86f0bf2160c44a">AUncalibratedEvent</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
<h3><a class="anchor" id="index_y"></a>- y -</h3><ul>
|
|
||||||
<li>y
|
|
||||||
: <a class="el" href="struct_a_sensor_vector.html#aa4f0d3eebc3c443f9be81bf48561a217">ASensorVector</a>
|
|
||||||
</li>
|
|
||||||
<li>y_bias
|
|
||||||
: <a class="el" href="struct_a_uncalibrated_event.html#a130457eaa905b467bc43fedb02cbb16a">AUncalibratedEvent</a>
|
|
||||||
</li>
|
|
||||||
<li>y_uncalib
|
|
||||||
: <a class="el" href="struct_a_uncalibrated_event.html#a43437dd77e26c6b89ab1c91aeb63fd64">AUncalibratedEvent</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
<h3><a class="anchor" id="index_z"></a>- z -</h3><ul>
|
|
||||||
<li>z
|
|
||||||
: <a class="el" href="struct_a_sensor_vector.html#af73583b1e980b0aa03f9884812e9fd4d">ASensorVector</a>
|
|
||||||
</li>
|
|
||||||
<li>z_bias
|
|
||||||
: <a class="el" href="struct_a_uncalibrated_event.html#a6e265324293107afbfa9e587941a4036">AUncalibratedEvent</a>
|
|
||||||
</li>
|
|
||||||
<li>z_uncalib
|
|
||||||
: <a class="el" href="struct_a_uncalibrated_event.html#ae677be5f98570cc5a1fd7fddcd8a6841">AUncalibratedEvent</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div><!-- contents -->
|
|
||||||
@@ -1,327 +0,0 @@
|
|||||||
page.title=Data Fields - Variables
|
|
||||||
page.customHeadTag=<link rel="stylesheet" type="text/css" href="doxygen-dac.css">
|
|
||||||
@jd:body
|
|
||||||
<!-- Generated by Doxygen 1.8.6 -->
|
|
||||||
</div><!-- top -->
|
|
||||||
<div class="contents">
|
|
||||||
 
|
|
||||||
|
|
||||||
<h3><a class="anchor" id="index_a"></a>- a -</h3><ul>
|
|
||||||
<li>acceleration
|
|
||||||
: <a class="el" href="struct_a_sensor_event.html#aab1f50881089166ff5f3d46f7bfcf09c">ASensorEvent</a>
|
|
||||||
</li>
|
|
||||||
<li>assetManager
|
|
||||||
: <a class="el" href="struct_a_native_activity.html#a0f76f065768b8f896ce47a3089fb438d">ANativeActivity</a>
|
|
||||||
</li>
|
|
||||||
<li>azimuth
|
|
||||||
: <a class="el" href="struct_a_sensor_vector.html#a01b03ebfa7d0a95760e743f611fecbc5">ASensorVector</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
<h3><a class="anchor" id="index_b"></a>- b -</h3><ul>
|
|
||||||
<li>bias
|
|
||||||
: <a class="el" href="struct_a_uncalibrated_event.html#a52bd7f09c4decadcfbc0347fda4163d6">AUncalibratedEvent</a>
|
|
||||||
</li>
|
|
||||||
<li>bits
|
|
||||||
: <a class="el" href="struct_a_native_window___buffer.html#a089d8e968fac54a9e45f059b8b78cf9b">ANativeWindow_Buffer</a>
|
|
||||||
</li>
|
|
||||||
<li>bottom
|
|
||||||
: <a class="el" href="struct_a_rect.html#a4479860c72ca8e96ac4fb1cc149dd71b">ARect</a>
|
|
||||||
</li>
|
|
||||||
<li>bpm
|
|
||||||
: <a class="el" href="struct_a_heart_rate_event.html#ab0560092cbaa233e74bb0d543a85965d">AHeartRateEvent</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
<h3><a class="anchor" id="index_c"></a>- c -</h3><ul>
|
|
||||||
<li>callbacks
|
|
||||||
: <a class="el" href="struct_a_native_activity.html#af96995a13e77baf0d71c37d20c79ad51">ANativeActivity</a>
|
|
||||||
</li>
|
|
||||||
<li>clazz
|
|
||||||
: <a class="el" href="struct_a_native_activity.html#ab10b01c3c23c4ddb9d2ddadd71b03c94">ANativeActivity</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
<h3><a class="anchor" id="index_d"></a>- d -</h3><ul>
|
|
||||||
<li>data
|
|
||||||
: <a class="el" href="struct_a_sensor_event.html#a31244897a6c7f657a9aec807dd1e09ae">ASensorEvent</a>
|
|
||||||
</li>
|
|
||||||
<li>distance
|
|
||||||
: <a class="el" href="struct_a_sensor_event.html#a06f14a9abd47b91465f895d5259cdc1b">ASensorEvent</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
<h3><a class="anchor" id="index_e"></a>- e -</h3><ul>
|
|
||||||
<li>env
|
|
||||||
: <a class="el" href="struct_a_native_activity.html#ae6f0d0cd46e56b7e299b489cb60dd27e">ANativeActivity</a>
|
|
||||||
</li>
|
|
||||||
<li>externalDataPath
|
|
||||||
: <a class="el" href="struct_a_native_activity.html#a2a61553b2f660ea8b57fcc2b495e109f">ANativeActivity</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
<h3><a class="anchor" id="index_f"></a>- f -</h3><ul>
|
|
||||||
<li>flags
|
|
||||||
: <a class="el" href="struct_android_bitmap_info.html#a773b39d480759f67926cb18ae2219281">AndroidBitmapInfo</a>
|
|
||||||
, <a class="el" href="struct_a_sensor_event.html#a773b39d480759f67926cb18ae2219281">ASensorEvent</a>
|
|
||||||
</li>
|
|
||||||
<li>format
|
|
||||||
: <a class="el" href="struct_a_native_window___buffer.html#a49d503b84d084937e3ceeda9f0b4659e">ANativeWindow_Buffer</a>
|
|
||||||
, <a class="el" href="struct_android_bitmap_info.html#a49d503b84d084937e3ceeda9f0b4659e">AndroidBitmapInfo</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
<h3><a class="anchor" id="index_h"></a>- h -</h3><ul>
|
|
||||||
<li>heart_rate
|
|
||||||
: <a class="el" href="struct_a_sensor_event.html#a2325abb12f65d7cbceec766e6db506d8">ASensorEvent</a>
|
|
||||||
</li>
|
|
||||||
<li>height
|
|
||||||
: <a class="el" href="struct_a_native_window___buffer.html#a5d8006e753a3e76ff637a4e092bbed71">ANativeWindow_Buffer</a>
|
|
||||||
, <a class="el" href="struct_android_bitmap_info.html#a6ad4f820ce4e75cda0686fcaad5168be">AndroidBitmapInfo</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
<h3><a class="anchor" id="index_i"></a>- i -</h3><ul>
|
|
||||||
<li>instance
|
|
||||||
: <a class="el" href="struct_a_native_activity.html#ae1b90392cd257d16fd66a85bac1b08cd">ANativeActivity</a>
|
|
||||||
</li>
|
|
||||||
<li>internalDataPath
|
|
||||||
: <a class="el" href="struct_a_native_activity.html#aa52947cdd1476b95e858d83c0f5b0220">ANativeActivity</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
<h3><a class="anchor" id="index_l"></a>- l -</h3><ul>
|
|
||||||
<li>left
|
|
||||||
: <a class="el" href="struct_a_rect.html#a9ee4ce87784b0ebeaadce132ce7d421f">ARect</a>
|
|
||||||
</li>
|
|
||||||
<li>light
|
|
||||||
: <a class="el" href="struct_a_sensor_event.html#aaf8b2537020ae0b7450785724d77a3e0">ASensorEvent</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
<h3><a class="anchor" id="index_m"></a>- m -</h3><ul>
|
|
||||||
<li>magnetic
|
|
||||||
: <a class="el" href="struct_a_sensor_event.html#a776bc8e3beff52764ef2d6d423563d64">ASensorEvent</a>
|
|
||||||
</li>
|
|
||||||
<li>meta_data
|
|
||||||
: <a class="el" href="struct_a_sensor_event.html#a40a6e69697a42e0f0ad04a09d7f113d3">ASensorEvent</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
<h3><a class="anchor" id="index_o"></a>- o -</h3><ul>
|
|
||||||
<li>obbPath
|
|
||||||
: <a class="el" href="struct_a_native_activity.html#a0aff284eb9ab311d81f20955258798cf">ANativeActivity</a>
|
|
||||||
</li>
|
|
||||||
<li>onConfigurationChanged
|
|
||||||
: <a class="el" href="struct_a_native_activity_callbacks.html#a2926b45334319089e4e25fbc86d74c3f">ANativeActivityCallbacks</a>
|
|
||||||
</li>
|
|
||||||
<li>onContentRectChanged
|
|
||||||
: <a class="el" href="struct_a_native_activity_callbacks.html#a61d30a43b3c77b6047afe951706f6a1e">ANativeActivityCallbacks</a>
|
|
||||||
</li>
|
|
||||||
<li>onDestroy
|
|
||||||
: <a class="el" href="struct_a_native_activity_callbacks.html#a45598ebed3d15847b4f97acb9e15076e">ANativeActivityCallbacks</a>
|
|
||||||
</li>
|
|
||||||
<li>onInputQueueCreated
|
|
||||||
: <a class="el" href="struct_a_native_activity_callbacks.html#a17b41ec9bb8b0b9e42d1e269a62a4d59">ANativeActivityCallbacks</a>
|
|
||||||
</li>
|
|
||||||
<li>onInputQueueDestroyed
|
|
||||||
: <a class="el" href="struct_a_native_activity_callbacks.html#a82675193f867bc64180016923b0bb129">ANativeActivityCallbacks</a>
|
|
||||||
</li>
|
|
||||||
<li>onLowMemory
|
|
||||||
: <a class="el" href="struct_a_native_activity_callbacks.html#aac61f647cbd971321c692a74a1136f67">ANativeActivityCallbacks</a>
|
|
||||||
</li>
|
|
||||||
<li>onNativeWindowCreated
|
|
||||||
: <a class="el" href="struct_a_native_activity_callbacks.html#ac997f07e53ba58179a2133e86e5cbd31">ANativeActivityCallbacks</a>
|
|
||||||
</li>
|
|
||||||
<li>onNativeWindowDestroyed
|
|
||||||
: <a class="el" href="struct_a_native_activity_callbacks.html#a150442c0611e8ce24a32a7c805e7c9db">ANativeActivityCallbacks</a>
|
|
||||||
</li>
|
|
||||||
<li>onNativeWindowRedrawNeeded
|
|
||||||
: <a class="el" href="struct_a_native_activity_callbacks.html#a3cad4792af363b9a40599d09afeab56c">ANativeActivityCallbacks</a>
|
|
||||||
</li>
|
|
||||||
<li>onNativeWindowResized
|
|
||||||
: <a class="el" href="struct_a_native_activity_callbacks.html#ab7bd120b8816508561126308f699f116">ANativeActivityCallbacks</a>
|
|
||||||
</li>
|
|
||||||
<li>onPause
|
|
||||||
: <a class="el" href="struct_a_native_activity_callbacks.html#aee8a4dcff234b94d0bf0bc85efea42c2">ANativeActivityCallbacks</a>
|
|
||||||
</li>
|
|
||||||
<li>onResume
|
|
||||||
: <a class="el" href="struct_a_native_activity_callbacks.html#ac2c85491a68e6dece3d82782c1254e73">ANativeActivityCallbacks</a>
|
|
||||||
</li>
|
|
||||||
<li>onSaveInstanceState
|
|
||||||
: <a class="el" href="struct_a_native_activity_callbacks.html#a16a270d24a484a376e28bc6c48fc22a1">ANativeActivityCallbacks</a>
|
|
||||||
</li>
|
|
||||||
<li>onStart
|
|
||||||
: <a class="el" href="struct_a_native_activity_callbacks.html#acda344fd29c2018640a85a585317d92c">ANativeActivityCallbacks</a>
|
|
||||||
</li>
|
|
||||||
<li>onStop
|
|
||||||
: <a class="el" href="struct_a_native_activity_callbacks.html#adefa99d16d11d21bb8a83ba426047605">ANativeActivityCallbacks</a>
|
|
||||||
</li>
|
|
||||||
<li>onWindowFocusChanged
|
|
||||||
: <a class="el" href="struct_a_native_activity_callbacks.html#a620ef54556eac0b2b28d7e6d0644ee4a">ANativeActivityCallbacks</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
<h3><a class="anchor" id="index_p"></a>- p -</h3><ul>
|
|
||||||
<li>pitch
|
|
||||||
: <a class="el" href="struct_a_sensor_vector.html#a282e7d4378d4a18a805b8980295ac86c">ASensorVector</a>
|
|
||||||
</li>
|
|
||||||
<li>pressure
|
|
||||||
: <a class="el" href="struct_a_sensor_event.html#ac870e1249bab4a2a68cc4126761d24ef">ASensorEvent</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
<h3><a class="anchor" id="index_r"></a>- r -</h3><ul>
|
|
||||||
<li>relative_humidity
|
|
||||||
: <a class="el" href="struct_a_sensor_event.html#ad60830bc80efb7e8a11d6fb25518f55b">ASensorEvent</a>
|
|
||||||
</li>
|
|
||||||
<li>reserved
|
|
||||||
: <a class="el" href="struct_a_native_window___buffer.html#a60cc5aad4013157e2e7434d6de450656">ANativeWindow_Buffer</a>
|
|
||||||
, <a class="el" href="struct_a_sensor_vector.html#a72aca6ea6d8153b28ea8f139b932ec3e">ASensorVector</a>
|
|
||||||
</li>
|
|
||||||
<li>reserved0
|
|
||||||
: <a class="el" href="struct_a_sensor_event.html#a3b1869501b35bf41f2ff54de072b6c2c">ASensorEvent</a>
|
|
||||||
</li>
|
|
||||||
<li>reserved1
|
|
||||||
: <a class="el" href="struct_a_sensor_event.html#a3c2ed5a26d302c47f7b3f2dd0bbf7f94">ASensorEvent</a>
|
|
||||||
</li>
|
|
||||||
<li>right
|
|
||||||
: <a class="el" href="struct_a_rect.html#a3d3a4d6bf8bc6c866fa737e11590cc4e">ARect</a>
|
|
||||||
</li>
|
|
||||||
<li>roll
|
|
||||||
: <a class="el" href="struct_a_sensor_vector.html#a26fd84d522945b6038221d9e38c7cc39">ASensorVector</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
<h3><a class="anchor" id="index_s"></a>- s -</h3><ul>
|
|
||||||
<li>sdkVersion
|
|
||||||
: <a class="el" href="struct_a_native_activity.html#a40b4b64be7ecfac23751618313eb610d">ANativeActivity</a>
|
|
||||||
</li>
|
|
||||||
<li>sensor
|
|
||||||
: <a class="el" href="struct_a_meta_data_event.html#a470f19badf179fe205462c060e5175b4">AMetaDataEvent</a>
|
|
||||||
, <a class="el" href="struct_a_sensor_event.html#a470f19badf179fe205462c060e5175b4">ASensorEvent</a>
|
|
||||||
</li>
|
|
||||||
<li>status
|
|
||||||
: <a class="el" href="struct_a_heart_rate_event.html#a555c2084e8436de01dc76a23590e8824">AHeartRateEvent</a>
|
|
||||||
, <a class="el" href="struct_a_sensor_vector.html#a555c2084e8436de01dc76a23590e8824">ASensorVector</a>
|
|
||||||
</li>
|
|
||||||
<li>step_counter
|
|
||||||
: <a class="el" href="struct_a_sensor_event.html#a2e54280490afc977b11157e387841145">ASensorEvent</a>
|
|
||||||
</li>
|
|
||||||
<li>stride
|
|
||||||
: <a class="el" href="struct_a_native_window___buffer.html#a4438e3445d33be6d33b2c0dbe9c2e0d7">ANativeWindow_Buffer</a>
|
|
||||||
, <a class="el" href="struct_android_bitmap_info.html#a981556a4e63b7b6d9f94975c7a8930ab">AndroidBitmapInfo</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
<h3><a class="anchor" id="index_t"></a>- t -</h3><ul>
|
|
||||||
<li>temperature
|
|
||||||
: <a class="el" href="struct_a_sensor_event.html#afc1d28cfbce795d6ea954ebe725241f5">ASensorEvent</a>
|
|
||||||
</li>
|
|
||||||
<li>timestamp
|
|
||||||
: <a class="el" href="struct_a_sensor_event.html#a8a591d341723df9496cda98e225b25b4">ASensorEvent</a>
|
|
||||||
</li>
|
|
||||||
<li>top
|
|
||||||
: <a class="el" href="struct_a_rect.html#ad07137116129d873220209ea65f9d3d4">ARect</a>
|
|
||||||
</li>
|
|
||||||
<li>type
|
|
||||||
: <a class="el" href="struct_a_sensor_event.html#a449e574ed6911881dc55507cb5635c2c">ASensorEvent</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
<h3><a class="anchor" id="index_u"></a>- u -</h3><ul>
|
|
||||||
<li>u64
|
|
||||||
: <a class="el" href="struct_a_sensor_event.html#a89806d4445310e62ed4b68c9e2698b27">ASensorEvent</a>
|
|
||||||
</li>
|
|
||||||
<li>uncalib
|
|
||||||
: <a class="el" href="struct_a_uncalibrated_event.html#a9c22454e765672782b7198d57a92f5fd">AUncalibratedEvent</a>
|
|
||||||
</li>
|
|
||||||
<li>uncalibrated_gyro
|
|
||||||
: <a class="el" href="struct_a_sensor_event.html#a4e35158edcd83e4651d7083ebdb41bae">ASensorEvent</a>
|
|
||||||
</li>
|
|
||||||
<li>uncalibrated_magnetic
|
|
||||||
: <a class="el" href="struct_a_sensor_event.html#a3c746f01a48fbdefaad12c35be0dd715">ASensorEvent</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
<h3><a class="anchor" id="index_v"></a>- v -</h3><ul>
|
|
||||||
<li>v
|
|
||||||
: <a class="el" href="struct_a_sensor_vector.html#a9a1a1a00f1e45435cc3001b553000a21">ASensorVector</a>
|
|
||||||
</li>
|
|
||||||
<li>vector
|
|
||||||
: <a class="el" href="struct_a_sensor_event.html#aebf12879fa9b61c671584994ddad9610">ASensorEvent</a>
|
|
||||||
</li>
|
|
||||||
<li>version
|
|
||||||
: <a class="el" href="struct_a_sensor_event.html#a67fae7dd1de9edce3656ed214d20377f">ASensorEvent</a>
|
|
||||||
</li>
|
|
||||||
<li>vm
|
|
||||||
: <a class="el" href="struct_a_native_activity.html#a5e163c28566d4563eafeabd7dcab7eeb">ANativeActivity</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
<h3><a class="anchor" id="index_w"></a>- w -</h3><ul>
|
|
||||||
<li>what
|
|
||||||
: <a class="el" href="struct_a_meta_data_event.html#a397e31e246d23c1be3fa82ca4af8b930">AMetaDataEvent</a>
|
|
||||||
</li>
|
|
||||||
<li>width
|
|
||||||
: <a class="el" href="struct_a_native_window___buffer.html#a395d15e7c2b09961c1bfd1da6179b64c">ANativeWindow_Buffer</a>
|
|
||||||
, <a class="el" href="struct_android_bitmap_info.html#a325272ddd9a962f05deb905101d25cbd">AndroidBitmapInfo</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
<h3><a class="anchor" id="index_x"></a>- x -</h3><ul>
|
|
||||||
<li>x
|
|
||||||
: <a class="el" href="struct_a_sensor_vector.html#ad0da36b2558901e21e7a30f6c227a45e">ASensorVector</a>
|
|
||||||
</li>
|
|
||||||
<li>x_bias
|
|
||||||
: <a class="el" href="struct_a_uncalibrated_event.html#a56c4ea73587a9ea20595cca9bcfe9593">AUncalibratedEvent</a>
|
|
||||||
</li>
|
|
||||||
<li>x_uncalib
|
|
||||||
: <a class="el" href="struct_a_uncalibrated_event.html#ac8b7f8daea042eaa2b86f0bf2160c44a">AUncalibratedEvent</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
<h3><a class="anchor" id="index_y"></a>- y -</h3><ul>
|
|
||||||
<li>y
|
|
||||||
: <a class="el" href="struct_a_sensor_vector.html#aa4f0d3eebc3c443f9be81bf48561a217">ASensorVector</a>
|
|
||||||
</li>
|
|
||||||
<li>y_bias
|
|
||||||
: <a class="el" href="struct_a_uncalibrated_event.html#a130457eaa905b467bc43fedb02cbb16a">AUncalibratedEvent</a>
|
|
||||||
</li>
|
|
||||||
<li>y_uncalib
|
|
||||||
: <a class="el" href="struct_a_uncalibrated_event.html#a43437dd77e26c6b89ab1c91aeb63fd64">AUncalibratedEvent</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
<h3><a class="anchor" id="index_z"></a>- z -</h3><ul>
|
|
||||||
<li>z
|
|
||||||
: <a class="el" href="struct_a_sensor_vector.html#af73583b1e980b0aa03f9884812e9fd4d">ASensorVector</a>
|
|
||||||
</li>
|
|
||||||
<li>z_bias
|
|
||||||
: <a class="el" href="struct_a_uncalibrated_event.html#a6e265324293107afbfa9e587941a4036">AUncalibratedEvent</a>
|
|
||||||
</li>
|
|
||||||
<li>z_uncalib
|
|
||||||
: <a class="el" href="struct_a_uncalibrated_event.html#ae677be5f98570cc5a1fd7fddcd8a6841">AUncalibratedEvent</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div><!-- contents -->
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
page.title=Globals
|
|
||||||
page.customHeadTag=<link rel="stylesheet" type="text/css" href="doxygen-dac.css">
|
|
||||||
@jd:body
|
|
||||||
<!-- Generated by Doxygen 1.8.6 -->
|
|
||||||
</div><!-- top -->
|
|
||||||
<div class="contents">
|
|
||||||
 <ul>
|
|
||||||
<li>AMOTION_EVENT_ACTION_POINTER_INDEX_SHIFT
|
|
||||||
: <a class="el" href="group___input.html#gaeb170c0fbeeed1d999160566f09f169e">input.h</a>
|
|
||||||
</li>
|
|
||||||
<li>ANDROID_BITMAP_RESUT_SUCCESS
|
|
||||||
: <a class="el" href="group___bitmap.html#gafb665ac9fefad34ac5c035f5d1314080">bitmap.h</a>
|
|
||||||
</li>
|
|
||||||
<li>ASENSOR_MAGNETIC_FIELD_EARTH_MAX
|
|
||||||
: <a class="el" href="group___sensor.html#gaf8b57b13c6432bc6136aac0ad3813d63">sensor.h</a>
|
|
||||||
</li>
|
|
||||||
<li>ASENSOR_MAGNETIC_FIELD_EARTH_MIN
|
|
||||||
: <a class="el" href="group___sensor.html#ga4423a712e27b6d5a57d138796892886d">sensor.h</a>
|
|
||||||
</li>
|
|
||||||
<li>ASENSOR_STANDARD_GRAVITY
|
|
||||||
: <a class="el" href="group___sensor.html#ga5129cb9e4091fc3474e246d5f950e52b">sensor.h</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div><!-- contents -->
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
page.title=Globals
|
|
||||||
page.customHeadTag=<link rel="stylesheet" type="text/css" href="doxygen-dac.css">
|
|
||||||
@jd:body
|
|
||||||
<!-- Generated by Doxygen 1.8.6 -->
|
|
||||||
</div><!-- top -->
|
|
||||||
<div class="contents">
|
|
||||||
 <ul>
|
|
||||||
<li>AndroidBitmapFormat
|
|
||||||
: <a class="el" href="group___bitmap.html#gaea286a2d4c61ae2abb02b51500499f13">bitmap.h</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div><!-- contents -->
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
page.title=Globals
|
|
||||||
page.customHeadTag=<link rel="stylesheet" type="text/css" href="doxygen-dac.css">
|
|
||||||
@jd:body
|
|
||||||
<!-- Generated by Doxygen 1.8.6 -->
|
|
||||||
</div><!-- top -->
|
|
||||||
<div class="contents">
|
|
||||||
 
|
|
||||||
|
|
||||||
<h3><a class="anchor" id="index_w"></a>- w -</h3><ul>
|
|
||||||
<li>WINDOW_FORMAT_RGB_565
|
|
||||||
: <a class="el" href="group___native_activity.html#gga94798fdadfbf49a7c658ace669a1d310ab26fa9c38f169263b611a8b757bb0259">native_window.h</a>
|
|
||||||
</li>
|
|
||||||
<li>WINDOW_FORMAT_RGBA_8888
|
|
||||||
: <a class="el" href="group___native_activity.html#gga94798fdadfbf49a7c658ace669a1d310a6a165383340acce0b32c555dd2ac2c01">native_window.h</a>
|
|
||||||
</li>
|
|
||||||
<li>WINDOW_FORMAT_RGBX_8888
|
|
||||||
: <a class="el" href="group___native_activity.html#gga94798fdadfbf49a7c658ace669a1d310a5f83a97ccf64fc1554c220476e8aaf30">native_window.h</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div><!-- contents -->
|
|
||||||
@@ -1,551 +0,0 @@
|
|||||||
page.title=Globals
|
|
||||||
page.customHeadTag=<link rel="stylesheet" type="text/css" href="doxygen-dac.css">
|
|
||||||
@jd:body
|
|
||||||
<!-- Generated by Doxygen 1.8.6 -->
|
|
||||||
</div><!-- top -->
|
|
||||||
<div class="contents">
|
|
||||||
 
|
|
||||||
|
|
||||||
<h3><a class="anchor" id="index_a"></a>- a -</h3><ul>
|
|
||||||
<li>AAsset_close()
|
|
||||||
: <a class="el" href="group___asset.html#ga1f241e49f691dafcada23bcb76155122">asset_manager.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AAsset_getBuffer()
|
|
||||||
: <a class="el" href="group___asset.html#ga553a14512a98542306238c3ce70d344f">asset_manager.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AAsset_getLength()
|
|
||||||
: <a class="el" href="group___asset.html#gaad8ec42e28522ebc72d3a5c357f9a600">asset_manager.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AAsset_getLength64()
|
|
||||||
: <a class="el" href="group___asset.html#ga55c8bc459327d5d23089e6a4b453f3f1">asset_manager.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AAsset_getRemainingLength()
|
|
||||||
: <a class="el" href="group___asset.html#gae806f55cbc4a93ca245f2adfd63d3eee">asset_manager.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AAsset_getRemainingLength64()
|
|
||||||
: <a class="el" href="group___asset.html#ga21e7221d88dcc44106843192b66755b5">asset_manager.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AAsset_isAllocated()
|
|
||||||
: <a class="el" href="group___asset.html#ga20344cb952a77fa1004f592fb1b55124">asset_manager.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AAsset_openFileDescriptor()
|
|
||||||
: <a class="el" href="group___asset.html#ga1af4ffd050016e99961e24f550981677">asset_manager.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AAsset_openFileDescriptor64()
|
|
||||||
: <a class="el" href="group___asset.html#ga123a44a575f85d91a00a8456dab7bd0a">asset_manager.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AAsset_read()
|
|
||||||
: <a class="el" href="group___asset.html#gaadd86322c1fda5121b6d33745c317fb9">asset_manager.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AAsset_seek()
|
|
||||||
: <a class="el" href="group___asset.html#gacc026a8bedeb1ef80bf12df3b72611a2">asset_manager.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AAsset_seek64()
|
|
||||||
: <a class="el" href="group___asset.html#ga81fbe4368de24a3296ef7a6eba0053c7">asset_manager.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AAssetDir_close()
|
|
||||||
: <a class="el" href="group___asset.html#gace1c4d0da274d643c5b10ca218cc6088">asset_manager.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AAssetDir_getNextFileName()
|
|
||||||
: <a class="el" href="group___asset.html#ga4703b9f7baa3daeba248b6547de6b9b0">asset_manager.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AAssetDir_rewind()
|
|
||||||
: <a class="el" href="group___asset.html#ga45db6d19ad5e1c0f9b2e6b4059da14b3">asset_manager.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AAssetManager_fromJava()
|
|
||||||
: <a class="el" href="group___asset.html#gadfd6537af41577735bcaee52120127f4">asset_manager_jni.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AAssetManager_open()
|
|
||||||
: <a class="el" href="group___asset.html#ga0037ce3c10a591fe632f34c1aa62955c">asset_manager.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AAssetManager_openDir()
|
|
||||||
: <a class="el" href="group___asset.html#gab5b57ff012d6d1024d8bf5d30aedced4">asset_manager.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AConfiguration_copy()
|
|
||||||
: <a class="el" href="group___configuration.html#gaabff04218a0a76afb8d3ea551b001565">configuration.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AConfiguration_delete()
|
|
||||||
: <a class="el" href="group___configuration.html#ga60fe264b97da84d3370eb9e220159e6d">configuration.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AConfiguration_diff()
|
|
||||||
: <a class="el" href="group___configuration.html#gabfe69b0dccae425a16fe94d084f20402">configuration.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AConfiguration_fromAssetManager()
|
|
||||||
: <a class="el" href="group___configuration.html#ga75e061fd0b4f761e08e43af36508c4f3">configuration.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AConfiguration_getCountry()
|
|
||||||
: <a class="el" href="group___configuration.html#gad2b47f787012a82a67a20e5de5211d46">configuration.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AConfiguration_getDensity()
|
|
||||||
: <a class="el" href="group___configuration.html#ga4c994e0555947340582094c3da32a663">configuration.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AConfiguration_getKeyboard()
|
|
||||||
: <a class="el" href="group___configuration.html#gafd0f76ccd4fe4bda5172b8e0bc6675e4">configuration.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AConfiguration_getKeysHidden()
|
|
||||||
: <a class="el" href="group___configuration.html#ga7a8317ab975f621f3fe62ed1b44f2605">configuration.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AConfiguration_getLanguage()
|
|
||||||
: <a class="el" href="group___configuration.html#ga7b004c13448704afb0ea2040d69468c1">configuration.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AConfiguration_getLayoutDirection()
|
|
||||||
: <a class="el" href="group___configuration.html#ga13dbf2fc9a382c62b391e7de9cf9b468">configuration.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AConfiguration_getMcc()
|
|
||||||
: <a class="el" href="group___configuration.html#ga1e78004237a931086d2ae4bd8324bd30">configuration.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AConfiguration_getMnc()
|
|
||||||
: <a class="el" href="group___configuration.html#ga4783776a4fad4501898472375d781fb9">configuration.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AConfiguration_getNavHidden()
|
|
||||||
: <a class="el" href="group___configuration.html#gafe8d3a9c2f715ea76c8e4a99c2db9eaa">configuration.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AConfiguration_getNavigation()
|
|
||||||
: <a class="el" href="group___configuration.html#gae3ff1541b63f5b9256f7c0ebae372977">configuration.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AConfiguration_getOrientation()
|
|
||||||
: <a class="el" href="group___configuration.html#gaa7d8e3e9871dc925fef3e342a92e4e22">configuration.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AConfiguration_getScreenHeightDp()
|
|
||||||
: <a class="el" href="group___configuration.html#ga9905a4765f8d0d921c476ebce01c7648">configuration.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AConfiguration_getScreenLong()
|
|
||||||
: <a class="el" href="group___configuration.html#gab7d1f5aa59e8fa4db0a1b91bb322034c">configuration.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AConfiguration_getScreenSize()
|
|
||||||
: <a class="el" href="group___configuration.html#ga9d2c1b8731795d8e74be7e23cbc77552">configuration.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AConfiguration_getScreenWidthDp()
|
|
||||||
: <a class="el" href="group___configuration.html#ga61e5fe9612c170c33e1c7e9fb92f2219">configuration.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AConfiguration_getSdkVersion()
|
|
||||||
: <a class="el" href="group___configuration.html#ga4aa7062198e5aacd9fabb04d0453dd91">configuration.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AConfiguration_getSmallestScreenWidthDp()
|
|
||||||
: <a class="el" href="group___configuration.html#ga7fc015e41fad342edba66a003d9848aa">configuration.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AConfiguration_getTouchscreen()
|
|
||||||
: <a class="el" href="group___configuration.html#gad305e6cf86fa915c24212e71bb2bf027">configuration.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AConfiguration_getUiModeNight()
|
|
||||||
: <a class="el" href="group___configuration.html#ga447f16a9e4f8400e5e0328900749ff16">configuration.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AConfiguration_getUiModeType()
|
|
||||||
: <a class="el" href="group___configuration.html#ga1d75777892f38208feb3d2a94a977fcf">configuration.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AConfiguration_isBetterThan()
|
|
||||||
: <a class="el" href="group___configuration.html#gafd2bb31057c8d57efcea7603458d2a8d">configuration.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AConfiguration_match()
|
|
||||||
: <a class="el" href="group___configuration.html#gafb27b901a1d7d44ed866608fb8399a18">configuration.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AConfiguration_new()
|
|
||||||
: <a class="el" href="group___configuration.html#ga9543655922980466eb05c7be94a0a567">configuration.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AConfiguration_setCountry()
|
|
||||||
: <a class="el" href="group___configuration.html#gac2f5d414a6466634b1639b5c6f8879ac">configuration.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AConfiguration_setDensity()
|
|
||||||
: <a class="el" href="group___configuration.html#ga9217af9858a7166dcb9a877192779eac">configuration.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AConfiguration_setKeyboard()
|
|
||||||
: <a class="el" href="group___configuration.html#ga4ab3429c5505c108c09349f1ddef572f">configuration.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AConfiguration_setKeysHidden()
|
|
||||||
: <a class="el" href="group___configuration.html#ga5a80a02aa10cfa17de0795054e927183">configuration.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AConfiguration_setLanguage()
|
|
||||||
: <a class="el" href="group___configuration.html#ga1f3c6cf6667655f83777acda7387ddff">configuration.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AConfiguration_setLayoutDirection()
|
|
||||||
: <a class="el" href="group___configuration.html#gaaf47215cf551594f8c2a0594419b47e1">configuration.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AConfiguration_setMcc()
|
|
||||||
: <a class="el" href="group___configuration.html#gae6198b4eaf3e34168f4b13b8b5975d93">configuration.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AConfiguration_setMnc()
|
|
||||||
: <a class="el" href="group___configuration.html#gaaf060ef69c3636f62e90ae0b520eecb8">configuration.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AConfiguration_setNavHidden()
|
|
||||||
: <a class="el" href="group___configuration.html#ga67e86e0347596421771af841710308d5">configuration.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AConfiguration_setNavigation()
|
|
||||||
: <a class="el" href="group___configuration.html#gad21dd14fb823a6a80b66132a05ce8913">configuration.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AConfiguration_setOrientation()
|
|
||||||
: <a class="el" href="group___configuration.html#gadcaa8540bad4172a74032143bcaade04">configuration.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AConfiguration_setScreenHeightDp()
|
|
||||||
: <a class="el" href="group___configuration.html#ga6ffac3b41415ec8a3031737ccdcd63b8">configuration.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AConfiguration_setScreenLong()
|
|
||||||
: <a class="el" href="group___configuration.html#gaed853ab7e2bc915591d05997130bc448">configuration.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AConfiguration_setScreenSize()
|
|
||||||
: <a class="el" href="group___configuration.html#ga7bcf05150933ead34a01061d05ad3245">configuration.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AConfiguration_setScreenWidthDp()
|
|
||||||
: <a class="el" href="group___configuration.html#gafc51d45679095965fe3ba1abd402f120">configuration.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AConfiguration_setSdkVersion()
|
|
||||||
: <a class="el" href="group___configuration.html#ga06c66072902ee455011120188ca4810b">configuration.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AConfiguration_setSmallestScreenWidthDp()
|
|
||||||
: <a class="el" href="group___configuration.html#ga6b004c9585671efc5cebd96c1d43c4f0">configuration.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AConfiguration_setTouchscreen()
|
|
||||||
: <a class="el" href="group___configuration.html#ga0d51dbe710c1afe31ece4dd6a8c188ff">configuration.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AConfiguration_setUiModeNight()
|
|
||||||
: <a class="el" href="group___configuration.html#ga08df1e801afbe4a12411e393b8141e42">configuration.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AConfiguration_setUiModeType()
|
|
||||||
: <a class="el" href="group___configuration.html#gaec61e3cf91cd79e8b76a35bbcb15789d">configuration.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AInputEvent_getDeviceId()
|
|
||||||
: <a class="el" href="group___input.html#ga9dd3fd81e51dbfde19ab861541242aa1">input.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AInputEvent_getSource()
|
|
||||||
: <a class="el" href="group___input.html#gac90d4b497669dbc709ec9650db4e49be">input.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AInputEvent_getType()
|
|
||||||
: <a class="el" href="group___input.html#ga8292ae06aa8120c52d7380d228600b9c">input.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AInputQueue_attachLooper()
|
|
||||||
: <a class="el" href="group___input.html#ga900711156bfb58d1a4b158da7874930f">input.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AInputQueue_detachLooper()
|
|
||||||
: <a class="el" href="group___input.html#gaeebe9f83392ac79b31ca40a6fd4dbeff">input.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AInputQueue_finishEvent()
|
|
||||||
: <a class="el" href="group___input.html#ga17e87e0f35d47d729eac31a0dfb1ac33">input.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AInputQueue_getEvent()
|
|
||||||
: <a class="el" href="group___input.html#ga88de12e2b39787ba7d3e4ce2ea46a48c">input.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AInputQueue_hasEvents()
|
|
||||||
: <a class="el" href="group___input.html#ga2b72ad6ab5ef656e8c41163aa7871c96">input.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AInputQueue_preDispatchEvent()
|
|
||||||
: <a class="el" href="group___input.html#gadecd32e6c7aefa4a508b355550d3eaa9">input.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AKeyEvent_getAction()
|
|
||||||
: <a class="el" href="group___input.html#ga36ec0b59f98f86a7ca263ba91279896d">input.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AKeyEvent_getDownTime()
|
|
||||||
: <a class="el" href="group___input.html#gaf475b6f0860bdfca4ceea7bc46eab1a9">input.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AKeyEvent_getEventTime()
|
|
||||||
: <a class="el" href="group___input.html#gae3eac7d68195d1767c947ca267842696">input.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AKeyEvent_getFlags()
|
|
||||||
: <a class="el" href="group___input.html#ga2a18e98efe0c4ccb6f39bb13c555010e">input.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AKeyEvent_getKeyCode()
|
|
||||||
: <a class="el" href="group___input.html#ga6b01ecd60018a5445f4917a861ca9466">input.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AKeyEvent_getMetaState()
|
|
||||||
: <a class="el" href="group___input.html#gabdda62b40b22727af2fb41740bf4787b">input.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AKeyEvent_getRepeatCount()
|
|
||||||
: <a class="el" href="group___input.html#ga5358fe3ebbd4b5b2f88a4ad2eba6f885">input.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AKeyEvent_getScanCode()
|
|
||||||
: <a class="el" href="group___input.html#ga4a0a846b7a195aeb290dfcd2250137d9">input.h</a>
|
|
||||||
</li>
|
|
||||||
<li>ALooper_acquire()
|
|
||||||
: <a class="el" href="group___looper.html#gae1ad7ac48ab01a34bfd25840c92ff07b">looper.h</a>
|
|
||||||
</li>
|
|
||||||
<li>ALooper_addFd()
|
|
||||||
: <a class="el" href="group___looper.html#ga2668285bfadcf21ef4d371568a30be33">looper.h</a>
|
|
||||||
</li>
|
|
||||||
<li>ALooper_forThread()
|
|
||||||
: <a class="el" href="group___looper.html#ga741ccd90a0eb9209c6bddf2326d89e4a">looper.h</a>
|
|
||||||
</li>
|
|
||||||
<li>ALooper_pollAll()
|
|
||||||
: <a class="el" href="group___looper.html#gaa7cd0636edc4ed227aadc585360ebefa">looper.h</a>
|
|
||||||
</li>
|
|
||||||
<li>ALooper_pollOnce()
|
|
||||||
: <a class="el" href="group___looper.html#ga2a9044602b76fef7f47c7e11a801561c">looper.h</a>
|
|
||||||
</li>
|
|
||||||
<li>ALooper_prepare()
|
|
||||||
: <a class="el" href="group___looper.html#ga1a070b904dd957cc65af9eb5ef6dfa25">looper.h</a>
|
|
||||||
</li>
|
|
||||||
<li>ALooper_release()
|
|
||||||
: <a class="el" href="group___looper.html#gab723c3c2ac2c66bc695913a194073727">looper.h</a>
|
|
||||||
</li>
|
|
||||||
<li>ALooper_removeFd()
|
|
||||||
: <a class="el" href="group___looper.html#gaf7d68ed05698b251489b4f6c8e54daad">looper.h</a>
|
|
||||||
</li>
|
|
||||||
<li>ALooper_wake()
|
|
||||||
: <a class="el" href="group___looper.html#gab2585652f8ae2e2444979194ebe32aaf">looper.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AMotionEvent_getAction()
|
|
||||||
: <a class="el" href="group___input.html#ga73ea2093cc2343675ac43dd08bef4247">input.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AMotionEvent_getAxisValue()
|
|
||||||
: <a class="el" href="group___input.html#ga9d364cdcebf85237f599b25861f38c21">input.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AMotionEvent_getButtonState()
|
|
||||||
: <a class="el" href="group___input.html#ga1aa7ebb749416491b6f0c55ae87ddf49">input.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AMotionEvent_getDownTime()
|
|
||||||
: <a class="el" href="group___input.html#gad44be7697e68891688cd7bcfaffec209">input.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AMotionEvent_getEdgeFlags()
|
|
||||||
: <a class="el" href="group___input.html#gad7e1f0caa4c27194d4a8756a18432299">input.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AMotionEvent_getEventTime()
|
|
||||||
: <a class="el" href="group___input.html#ga7e13fbf3cff0700b0b620284ebdd3a33">input.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AMotionEvent_getFlags()
|
|
||||||
: <a class="el" href="group___input.html#ga2891d19197c070207098fa48adeb35af">input.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AMotionEvent_getHistoricalAxisValue()
|
|
||||||
: <a class="el" href="group___input.html#ga7ca740e1324f3cdb934252dce0c982d0">input.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AMotionEvent_getHistoricalEventTime()
|
|
||||||
: <a class="el" href="group___input.html#ga523f1a760754206965b42b08d62f9346">input.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AMotionEvent_getHistoricalOrientation()
|
|
||||||
: <a class="el" href="group___input.html#gaab9cb8fa670175ecc73c75eed4e5cd3f">input.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AMotionEvent_getHistoricalPressure()
|
|
||||||
: <a class="el" href="group___input.html#gaa8e9352ee5b043b3e1b6e2062d491010">input.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AMotionEvent_getHistoricalRawX()
|
|
||||||
: <a class="el" href="group___input.html#ga5d36c2e7420001c86ae2aa1168fe6f83">input.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AMotionEvent_getHistoricalRawY()
|
|
||||||
: <a class="el" href="group___input.html#ga6deb0e7690a93aa53e5872c2691b69fe">input.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AMotionEvent_getHistoricalSize()
|
|
||||||
: <a class="el" href="group___input.html#ga0a04bb7ec12928db7e62645e7fad3a9e">input.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AMotionEvent_getHistoricalToolMajor()
|
|
||||||
: <a class="el" href="group___input.html#ga160a5830e791e8c42ae97f51b92233d2">input.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AMotionEvent_getHistoricalToolMinor()
|
|
||||||
: <a class="el" href="group___input.html#gafe01aa7576a6d1bce750fb8482355849">input.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AMotionEvent_getHistoricalTouchMajor()
|
|
||||||
: <a class="el" href="group___input.html#gaf437f223668b97f19ebdbad4b9cf4483">input.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AMotionEvent_getHistoricalTouchMinor()
|
|
||||||
: <a class="el" href="group___input.html#ga126715d966e989652aa1ae5d38e0e898">input.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AMotionEvent_getHistoricalX()
|
|
||||||
: <a class="el" href="group___input.html#ga49a8ca89ff377b5ed2355e8d7220ae07">input.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AMotionEvent_getHistoricalY()
|
|
||||||
: <a class="el" href="group___input.html#ga30fc4e5d3ce144955859f8c97b51b73d">input.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AMotionEvent_getHistorySize()
|
|
||||||
: <a class="el" href="group___input.html#ga0aef34c236db6d7a56a50bf590be7bcc">input.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AMotionEvent_getMetaState()
|
|
||||||
: <a class="el" href="group___input.html#ga5644f0d952e3dea57ba9f7ce51dff2bb">input.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AMotionEvent_getOrientation()
|
|
||||||
: <a class="el" href="group___input.html#gad28422998da15b789edcba6b8bc5d615">input.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AMotionEvent_getPointerCount()
|
|
||||||
: <a class="el" href="group___input.html#ga612e68d104adbc6d14d87510e8066bd8">input.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AMotionEvent_getPointerId()
|
|
||||||
: <a class="el" href="group___input.html#ga599e21a79c706807243a8ee31b116138">input.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AMotionEvent_getPressure()
|
|
||||||
: <a class="el" href="group___input.html#ga97fcaa6cd08c9d54b35711e482e06c8d">input.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AMotionEvent_getRawX()
|
|
||||||
: <a class="el" href="group___input.html#gafe45e29ef138cc30592237ce479837f0">input.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AMotionEvent_getRawY()
|
|
||||||
: <a class="el" href="group___input.html#ga5a09c3d742a93270861aa05f24257c23">input.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AMotionEvent_getSize()
|
|
||||||
: <a class="el" href="group___input.html#ga9b1f3c3df46b5269f9e74d2dd70c88a8">input.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AMotionEvent_getToolMajor()
|
|
||||||
: <a class="el" href="group___input.html#gac04099690f278a6a27191c2027b12a77">input.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AMotionEvent_getToolMinor()
|
|
||||||
: <a class="el" href="group___input.html#ga2222d459759ba4a8269647012d2718fb">input.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AMotionEvent_getToolType()
|
|
||||||
: <a class="el" href="group___input.html#ga2babe4e2e79952e004538f8f1878649c">input.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AMotionEvent_getTouchMajor()
|
|
||||||
: <a class="el" href="group___input.html#ga9ac18fe19534e07d80441582f489d471">input.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AMotionEvent_getTouchMinor()
|
|
||||||
: <a class="el" href="group___input.html#ga65f71e257b5fcb29dcbaaf59b3fcb3a7">input.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AMotionEvent_getX()
|
|
||||||
: <a class="el" href="group___input.html#ga22e255a5fa52761cd92ce78af91e9757">input.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AMotionEvent_getXOffset()
|
|
||||||
: <a class="el" href="group___input.html#ga7a94ce622eb78a17737fd8bddbf86e21">input.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AMotionEvent_getXPrecision()
|
|
||||||
: <a class="el" href="group___input.html#ga81a9be07673a01f43fd0241c7b4c254f">input.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AMotionEvent_getY()
|
|
||||||
: <a class="el" href="group___input.html#ga113f58a37e41f2a6c3007d68418edfa6">input.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AMotionEvent_getYOffset()
|
|
||||||
: <a class="el" href="group___input.html#ga7f6bd2c12d912f502c245b6ced6d3704">input.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AMotionEvent_getYPrecision()
|
|
||||||
: <a class="el" href="group___input.html#gae311e6e28bce4be905526f9ea71278ed">input.h</a>
|
|
||||||
</li>
|
|
||||||
<li>ANativeActivity_finish()
|
|
||||||
: <a class="el" href="group___native_activity.html#ga4d872ae54a239704c06a0517e23cc0ad">native_activity.h</a>
|
|
||||||
</li>
|
|
||||||
<li>ANativeActivity_hideSoftInput()
|
|
||||||
: <a class="el" href="group___native_activity.html#gaf673d6efea7ce517ef46ff2551b25944">native_activity.h</a>
|
|
||||||
</li>
|
|
||||||
<li>ANativeActivity_setWindowFlags()
|
|
||||||
: <a class="el" href="group___native_activity.html#gaa1d091ca4a99b0ce570bab1c8c06f297">native_activity.h</a>
|
|
||||||
</li>
|
|
||||||
<li>ANativeActivity_setWindowFormat()
|
|
||||||
: <a class="el" href="group___native_activity.html#gaec8b12decdf2b9841344e75c4c038c5a">native_activity.h</a>
|
|
||||||
</li>
|
|
||||||
<li>ANativeActivity_showSoftInput()
|
|
||||||
: <a class="el" href="group___native_activity.html#ga14eaeb6190f266369023b04d8ab9dba7">native_activity.h</a>
|
|
||||||
</li>
|
|
||||||
<li>ANativeWindow_acquire()
|
|
||||||
: <a class="el" href="group___native_activity.html#ga533876b57909243b238927344a6592db">native_window.h</a>
|
|
||||||
</li>
|
|
||||||
<li>ANativeWindow_fromSurface()
|
|
||||||
: <a class="el" href="group___native_activity.html#ga774d0a87ec496b3940fcddccbc31fd9d">native_window_jni.h</a>
|
|
||||||
</li>
|
|
||||||
<li>ANativeWindow_getFormat()
|
|
||||||
: <a class="el" href="group___native_activity.html#ga9e3a492a8300146b30d864f0ab22bb2e">native_window.h</a>
|
|
||||||
</li>
|
|
||||||
<li>ANativeWindow_getHeight()
|
|
||||||
: <a class="el" href="group___native_activity.html#ga463ba99f6dee3edc1167a54e1ff7de15">native_window.h</a>
|
|
||||||
</li>
|
|
||||||
<li>ANativeWindow_getWidth()
|
|
||||||
: <a class="el" href="group___native_activity.html#ga186f0040c5cb405a63d93889bb9a4ff1">native_window.h</a>
|
|
||||||
</li>
|
|
||||||
<li>ANativeWindow_lock()
|
|
||||||
: <a class="el" href="group___native_activity.html#ga0b0e3b7d442dee83e1a1b42e5b0caee6">native_window.h</a>
|
|
||||||
</li>
|
|
||||||
<li>ANativeWindow_release()
|
|
||||||
: <a class="el" href="group___native_activity.html#gae944e98865b902bd924663785d7b0258">native_window.h</a>
|
|
||||||
</li>
|
|
||||||
<li>ANativeWindow_setBuffersGeometry()
|
|
||||||
: <a class="el" href="group___native_activity.html#ga7b0652533998d61e1a3b542485889113">native_window.h</a>
|
|
||||||
</li>
|
|
||||||
<li>ANativeWindow_unlockAndPost()
|
|
||||||
: <a class="el" href="group___native_activity.html#ga4dc9b687ead9034fbc11bf2d90f203f9">native_window.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AndroidBitmap_getInfo()
|
|
||||||
: <a class="el" href="group___bitmap.html#ga80292ee39d8a675928e38849742b54bf">bitmap.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AndroidBitmap_lockPixels()
|
|
||||||
: <a class="el" href="group___bitmap.html#ga2908d42fa4db286c34b7f8c11f29206f">bitmap.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AndroidBitmap_unlockPixels()
|
|
||||||
: <a class="el" href="group___bitmap.html#ga4aca91f37baddd42d0051dca8179d4ed">bitmap.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AObbInfo_delete()
|
|
||||||
: <a class="el" href="group___storage.html#gaec5a4428008f545e829486099298031a">obb.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AObbInfo_getFlags()
|
|
||||||
: <a class="el" href="group___storage.html#ga68d916570c756da9fd0d9096358300eb">obb.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AObbInfo_getPackageName()
|
|
||||||
: <a class="el" href="group___storage.html#ga1ec7eee61541fa5a9b578801a35b9cf3">obb.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AObbInfo_getVersion()
|
|
||||||
: <a class="el" href="group___storage.html#gacd8471c6d866cffe4a32f3b5997c782c">obb.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AObbScanner_getObbInfo()
|
|
||||||
: <a class="el" href="group___storage.html#ga7beb4f82e3bf9a4b8197917f92ac4d5e">obb.h</a>
|
|
||||||
</li>
|
|
||||||
<li>ASensor_getFifoMaxEventCount()
|
|
||||||
: <a class="el" href="group___sensor.html#gae9969580eda319926a677a6937c7afb1">sensor.h</a>
|
|
||||||
</li>
|
|
||||||
<li>ASensor_getFifoReservedEventCount()
|
|
||||||
: <a class="el" href="group___sensor.html#gaec7084c6a9d4d85f87c95a70511c5f53">sensor.h</a>
|
|
||||||
</li>
|
|
||||||
<li>ASensor_getMinDelay()
|
|
||||||
: <a class="el" href="group___sensor.html#gacb6e021757c07344b58742611eaf68e7">sensor.h</a>
|
|
||||||
</li>
|
|
||||||
<li>ASensor_getName()
|
|
||||||
: <a class="el" href="group___sensor.html#ga52f4b22990c70df0784b9ccf23314fae">sensor.h</a>
|
|
||||||
</li>
|
|
||||||
<li>ASensor_getReportingMode()
|
|
||||||
: <a class="el" href="group___sensor.html#ga99e56b84cf421788c27998da8eab7e39">sensor.h</a>
|
|
||||||
</li>
|
|
||||||
<li>ASensor_getResolution()
|
|
||||||
: <a class="el" href="group___sensor.html#ga3da2930dd866cf1f76da6bc39e578a46">sensor.h</a>
|
|
||||||
</li>
|
|
||||||
<li>ASensor_getStringType()
|
|
||||||
: <a class="el" href="group___sensor.html#gabee3eb65390fc75a639c59d653af3591">sensor.h</a>
|
|
||||||
</li>
|
|
||||||
<li>ASensor_getType()
|
|
||||||
: <a class="el" href="group___sensor.html#ga93962747ab3c7d2b609f97af26fc0230">sensor.h</a>
|
|
||||||
</li>
|
|
||||||
<li>ASensor_getVendor()
|
|
||||||
: <a class="el" href="group___sensor.html#gafaf467fc71f7adba537a90f166e3320d">sensor.h</a>
|
|
||||||
</li>
|
|
||||||
<li>ASensor_isWakeUpSensor()
|
|
||||||
: <a class="el" href="group___sensor.html#ga0ff4118e400bedac62be6b79e9e0f924">sensor.h</a>
|
|
||||||
</li>
|
|
||||||
<li>ASensorEventQueue_disableSensor()
|
|
||||||
: <a class="el" href="group___sensor.html#ga03852b813887ec236a34c4aef0df4b68">sensor.h</a>
|
|
||||||
</li>
|
|
||||||
<li>ASensorEventQueue_enableSensor()
|
|
||||||
: <a class="el" href="group___sensor.html#ga48a8379cf9de9b09a71a00f8a3699499">sensor.h</a>
|
|
||||||
</li>
|
|
||||||
<li>ASensorEventQueue_getEvents()
|
|
||||||
: <a class="el" href="group___sensor.html#gab3d4354fd0d3ceb5fa97c129b024a18a">sensor.h</a>
|
|
||||||
</li>
|
|
||||||
<li>ASensorEventQueue_hasEvents()
|
|
||||||
: <a class="el" href="group___sensor.html#ga79c9d6264fe81d4e30800f826db72913">sensor.h</a>
|
|
||||||
</li>
|
|
||||||
<li>ASensorEventQueue_setEventRate()
|
|
||||||
: <a class="el" href="group___sensor.html#gaa6e89b6d69dc3e07f2d7e72e81ec7937">sensor.h</a>
|
|
||||||
</li>
|
|
||||||
<li>ASensorManager_createEventQueue()
|
|
||||||
: <a class="el" href="group___sensor.html#gac46f8b28bcc7a846dea9d841cab0a67b">sensor.h</a>
|
|
||||||
</li>
|
|
||||||
<li>ASensorManager_destroyEventQueue()
|
|
||||||
: <a class="el" href="group___sensor.html#gaf35624037785cdea1e7fe9e0a73fc5e1">sensor.h</a>
|
|
||||||
</li>
|
|
||||||
<li>ASensorManager_getDefaultSensor()
|
|
||||||
: <a class="el" href="group___sensor.html#gaf4880d87e01f5e2d4a9b8403e4047445">sensor.h</a>
|
|
||||||
</li>
|
|
||||||
<li>ASensorManager_getDefaultSensorEx()
|
|
||||||
: <a class="el" href="group___sensor.html#ga4313457c0e82f4afa77ef13860629633">sensor.h</a>
|
|
||||||
</li>
|
|
||||||
<li>ASensorManager_getInstance()
|
|
||||||
: <a class="el" href="group___sensor.html#gaa438fdaf34783a89d139f0a56d2692cd">sensor.h</a>
|
|
||||||
</li>
|
|
||||||
<li>ASensorManager_getSensorList()
|
|
||||||
: <a class="el" href="group___sensor.html#ga645be938627498ab2b60d94c562204bd">sensor.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AStorageManager_delete()
|
|
||||||
: <a class="el" href="group___storage.html#ga184c06dd9cec0f21db138167d6b331ed">storage_manager.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AStorageManager_getMountedObbPath()
|
|
||||||
: <a class="el" href="group___storage.html#gad5c90305d627e0c768da37cb3e9f08c4">storage_manager.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AStorageManager_isObbMounted()
|
|
||||||
: <a class="el" href="group___storage.html#ga7572f2c650fc16cce1b0ab94e913a1ba">storage_manager.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AStorageManager_mountObb()
|
|
||||||
: <a class="el" href="group___storage.html#ga61bebaf43e57b4b7f57e7a24a62e9e3d">storage_manager.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AStorageManager_new()
|
|
||||||
: <a class="el" href="group___storage.html#ga1c21ed9e0848fcfc03547c95eeb48877">storage_manager.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AStorageManager_unmountObb()
|
|
||||||
: <a class="el" href="group___storage.html#ga4c32c8d2c780016fa36097d833b57809">storage_manager.h</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div><!-- contents -->
|
|
||||||
@@ -1,90 +0,0 @@
|
|||||||
page.title=Globals
|
|
||||||
page.customHeadTag=<link rel="stylesheet" type="text/css" href="doxygen-dac.css">
|
|
||||||
@jd:body
|
|
||||||
<!-- Generated by Doxygen 1.8.6 -->
|
|
||||||
</div><!-- top -->
|
|
||||||
<div class="contents">
|
|
||||||
 <ul>
|
|
||||||
<li>AAsset
|
|
||||||
: <a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">asset_manager.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AAssetDir
|
|
||||||
: <a class="el" href="group___asset.html#ga001a6b9c36a06ee977b9f51ed7103cdb">asset_manager.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AAssetManager
|
|
||||||
: <a class="el" href="group___asset.html#ga90c459935e76acf809b9ec90d1872771">asset_manager.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AConfiguration
|
|
||||||
: <a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">configuration.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AHeartRateEvent
|
|
||||||
: <a class="el" href="group___sensor.html#gae85b6eac76abe74e6e53d78bb3a4858c">sensor.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AInputEvent
|
|
||||||
: <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">input.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AInputQueue
|
|
||||||
: <a class="el" href="group___input.html#ga21d8182651f4b61ae558560023e8339c">input.h</a>
|
|
||||||
</li>
|
|
||||||
<li>ALooper
|
|
||||||
: <a class="el" href="group___looper.html#gadb10521a80138b777ba1bc2ca74d4af5">looper.h</a>
|
|
||||||
</li>
|
|
||||||
<li>ALooper_callbackFunc
|
|
||||||
: <a class="el" href="group___looper.html#ga410b184b4e48302c439e36c8ce0a7a89">looper.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AMetaDataEvent
|
|
||||||
: <a class="el" href="group___sensor.html#ga0378daec23b2d8a70438ef7c3912475f">sensor.h</a>
|
|
||||||
</li>
|
|
||||||
<li>ANativeActivity
|
|
||||||
: <a class="el" href="group___native_activity.html#ga8abd07923f37feb1ce724d139cc2609d">native_activity.h</a>
|
|
||||||
</li>
|
|
||||||
<li>ANativeActivity_createFunc
|
|
||||||
: <a class="el" href="group___native_activity.html#ga569a53bcac3fcedb0189b7c412ebcb22">native_activity.h</a>
|
|
||||||
</li>
|
|
||||||
<li>ANativeActivityCallbacks
|
|
||||||
: <a class="el" href="group___native_activity.html#ga28dca784e5ee939427135c72c0151c38">native_activity.h</a>
|
|
||||||
</li>
|
|
||||||
<li>ANativeWindow
|
|
||||||
: <a class="el" href="group___native_activity.html#ga66956d540c2e3709e12156d195e64726">native_window.h</a>
|
|
||||||
</li>
|
|
||||||
<li>ANativeWindow_Buffer
|
|
||||||
: <a class="el" href="group___native_activity.html#gad0983ca473ce36293baf5e51a14c3357">native_window.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AObbInfo
|
|
||||||
: <a class="el" href="group___storage.html#gaa5037fe4c0d785a50fc62ac2de9844c3">obb.h</a>
|
|
||||||
</li>
|
|
||||||
<li>ARect
|
|
||||||
: <a class="el" href="group___native_activity.html#gaa984a498f0e146ac57c6022a323423cf">rect.h</a>
|
|
||||||
</li>
|
|
||||||
<li>ASensor
|
|
||||||
: <a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">sensor.h</a>
|
|
||||||
</li>
|
|
||||||
<li>ASensorEvent
|
|
||||||
: <a class="el" href="group___sensor.html#ga6bb167c45f0ef0a94d8f178d227e781f">sensor.h</a>
|
|
||||||
</li>
|
|
||||||
<li>ASensorEventQueue
|
|
||||||
: <a class="el" href="group___sensor.html#gaa9448106d6d463f4cc5dded7c914e7ae">sensor.h</a>
|
|
||||||
</li>
|
|
||||||
<li>ASensorList
|
|
||||||
: <a class="el" href="group___sensor.html#ga26ff51817e8b320a631b3bf4ed378d58">sensor.h</a>
|
|
||||||
</li>
|
|
||||||
<li>ASensorManager
|
|
||||||
: <a class="el" href="group___sensor.html#gaef620baab9b276ab8f914ae77babc349">sensor.h</a>
|
|
||||||
</li>
|
|
||||||
<li>ASensorRef
|
|
||||||
: <a class="el" href="group___sensor.html#gafec8dd682458c750a5f0f913a0f162ce">sensor.h</a>
|
|
||||||
</li>
|
|
||||||
<li>ASensorVector
|
|
||||||
: <a class="el" href="group___sensor.html#ga207e807f9e18271f6a763e57232b409f">sensor.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AStorageManager
|
|
||||||
: <a class="el" href="group___storage.html#ga419f40803228bca62e32beb911ab28e2">storage_manager.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AStorageManager_obbCallbackFunc
|
|
||||||
: <a class="el" href="group___storage.html#gaf077d06586fa4c0212baa2fe458b9617">storage_manager.h</a>
|
|
||||||
</li>
|
|
||||||
<li>AUncalibratedEvent
|
|
||||||
: <a class="el" href="group___sensor.html#ga24acc545b908dd24cadc44c5e0760b3b">sensor.h</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div><!-- contents -->
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
page.title=Globals
|
|
||||||
page.customHeadTag=<link rel="stylesheet" type="text/css" href="doxygen-dac.css">
|
|
||||||
@jd:body
|
|
||||||
<!-- Generated by Doxygen 1.8.6 -->
|
|
||||||
</div><!-- top -->
|
|
||||||
<div class="contents">
|
|
||||||
 <ul>
|
|
||||||
<li>ANativeActivity_onCreate
|
|
||||||
: <a class="el" href="group___native_activity.html#ga02791d0d490839055169f39fdc905c5e">native_activity.h</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div><!-- contents -->
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
page.title=Globals
|
|
||||||
page.customHeadTag=<link rel="stylesheet" type="text/css" href="doxygen-dac.css">
|
|
||||||
@jd:body
|
|
||||||
<!-- Generated by Doxygen 1.8.6 -->
|
|
||||||
</div><!-- top -->
|
|
||||||
<div class="contents">
|
|
||||||
<div class="textblock">Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:</div>
|
|
||||||
|
|
||||||
<h3><a class="anchor" id="index_w"></a>- w -</h3><ul>
|
|
||||||
<li>WINDOW_FORMAT_RGB_565
|
|
||||||
: <a class="el" href="group___native_activity.html#gga94798fdadfbf49a7c658ace669a1d310ab26fa9c38f169263b611a8b757bb0259">native_window.h</a>
|
|
||||||
</li>
|
|
||||||
<li>WINDOW_FORMAT_RGBA_8888
|
|
||||||
: <a class="el" href="group___native_activity.html#gga94798fdadfbf49a7c658ace669a1d310a6a165383340acce0b32c555dd2ac2c01">native_window.h</a>
|
|
||||||
</li>
|
|
||||||
<li>WINDOW_FORMAT_RGBX_8888
|
|
||||||
: <a class="el" href="group___native_activity.html#gga94798fdadfbf49a7c658ace669a1d310a5f83a97ccf64fc1554c220476e8aaf30">native_window.h</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div><!-- contents -->
|
|
||||||
@@ -1,591 +0,0 @@
|
|||||||
page.title=Asset
|
|
||||||
page.customHeadTag=<link rel="stylesheet" type="text/css" href="doxygen-dac.css">
|
|
||||||
@jd:body
|
|
||||||
<!-- Generated by Doxygen 1.8.6 -->
|
|
||||||
</div><!-- top -->
|
|
||||||
<div class="header">
|
|
||||||
<div class="summary">
|
|
||||||
<a href="#files">Files</a> |
|
|
||||||
<a href="#typedef-members">Typedefs</a> |
|
|
||||||
<a href="#enum-members">Enumerations</a> |
|
|
||||||
<a href="#func-members">Functions</a> </div>
|
|
||||||
<div class="headertitle">
|
|
||||||
<div class="title">Asset</div> </div>
|
|
||||||
</div><!--header-->
|
|
||||||
<div class="contents">
|
|
||||||
<table class="memberdecls">
|
|
||||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="files"></a>
|
|
||||||
Files</h2></td></tr>
|
|
||||||
<tr class="memitem:asset__manager_8h"><td class="memItemLeft" align="right" valign="top">file  </td><td class="memItemRight" valign="bottom"><a class="el" href="asset__manager_8h.html">asset_manager.h</a></td></tr>
|
|
||||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:asset__manager__jni_8h"><td class="memItemLeft" align="right" valign="top">file  </td><td class="memItemRight" valign="bottom"><a class="el" href="asset__manager__jni_8h.html">asset_manager_jni.h</a></td></tr>
|
|
||||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
</table><table class="memberdecls">
|
|
||||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
|
|
||||||
Typedefs</h2></td></tr>
|
|
||||||
<tr class="memitem:ga90c459935e76acf809b9ec90d1872771"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="group___asset.html#ga90c459935e76acf809b9ec90d1872771">AAssetManager</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#ga90c459935e76acf809b9ec90d1872771">AAssetManager</a></td></tr>
|
|
||||||
<tr class="separator:ga90c459935e76acf809b9ec90d1872771"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:ga001a6b9c36a06ee977b9f51ed7103cdb"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="group___asset.html#ga001a6b9c36a06ee977b9f51ed7103cdb">AAssetDir</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#ga001a6b9c36a06ee977b9f51ed7103cdb">AAssetDir</a></td></tr>
|
|
||||||
<tr class="separator:ga001a6b9c36a06ee977b9f51ed7103cdb"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:ga5630b1f1aa5cd363303018cb2f12f95c"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a></td></tr>
|
|
||||||
<tr class="separator:ga5630b1f1aa5cd363303018cb2f12f95c"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
</table><table class="memberdecls">
|
|
||||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
|
|
||||||
Enumerations</h2></td></tr>
|
|
||||||
<tr class="memitem:ga06fc87d81c62e9abb8790b6e5713c55b"><td class="memItemLeft" align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom">{ <a class="el" href="group___asset.html#gga06fc87d81c62e9abb8790b6e5713c55ba5bf76576f07042f965f230086f7c09f4">AASSET_MODE_UNKNOWN</a> = 0,
|
|
||||||
<a class="el" href="group___asset.html#gga06fc87d81c62e9abb8790b6e5713c55ba88e1b2a920963d7596735fe28bf30e2f">AASSET_MODE_RANDOM</a> = 1,
|
|
||||||
<a class="el" href="group___asset.html#gga06fc87d81c62e9abb8790b6e5713c55bac76f5fdb953097efc04e534474a7ea74">AASSET_MODE_STREAMING</a> = 2,
|
|
||||||
<a class="el" href="group___asset.html#gga06fc87d81c62e9abb8790b6e5713c55ba40ec098f4afb7c2869fa449d3059f6bb">AASSET_MODE_BUFFER</a> = 3
|
|
||||||
}</td></tr>
|
|
||||||
<tr class="separator:ga06fc87d81c62e9abb8790b6e5713c55b"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
</table><table class="memberdecls">
|
|
||||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
|
|
||||||
Functions</h2></td></tr>
|
|
||||||
<tr class="memitem:gab5b57ff012d6d1024d8bf5d30aedced4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___asset.html#ga001a6b9c36a06ee977b9f51ed7103cdb">AAssetDir</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#gab5b57ff012d6d1024d8bf5d30aedced4">AAssetManager_openDir</a> (<a class="el" href="group___asset.html#ga90c459935e76acf809b9ec90d1872771">AAssetManager</a> *mgr, const char *dirName)</td></tr>
|
|
||||||
<tr class="separator:gab5b57ff012d6d1024d8bf5d30aedced4"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:ga0037ce3c10a591fe632f34c1aa62955c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#ga0037ce3c10a591fe632f34c1aa62955c">AAssetManager_open</a> (<a class="el" href="group___asset.html#ga90c459935e76acf809b9ec90d1872771">AAssetManager</a> *mgr, const char *filename, int mode)</td></tr>
|
|
||||||
<tr class="separator:ga0037ce3c10a591fe632f34c1aa62955c"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:ga4703b9f7baa3daeba248b6547de6b9b0"><td class="memItemLeft" align="right" valign="top">const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#ga4703b9f7baa3daeba248b6547de6b9b0">AAssetDir_getNextFileName</a> (<a class="el" href="group___asset.html#ga001a6b9c36a06ee977b9f51ed7103cdb">AAssetDir</a> *assetDir)</td></tr>
|
|
||||||
<tr class="separator:ga4703b9f7baa3daeba248b6547de6b9b0"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:ga45db6d19ad5e1c0f9b2e6b4059da14b3"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#ga45db6d19ad5e1c0f9b2e6b4059da14b3">AAssetDir_rewind</a> (<a class="el" href="group___asset.html#ga001a6b9c36a06ee977b9f51ed7103cdb">AAssetDir</a> *assetDir)</td></tr>
|
|
||||||
<tr class="separator:ga45db6d19ad5e1c0f9b2e6b4059da14b3"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:gace1c4d0da274d643c5b10ca218cc6088"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#gace1c4d0da274d643c5b10ca218cc6088">AAssetDir_close</a> (<a class="el" href="group___asset.html#ga001a6b9c36a06ee977b9f51ed7103cdb">AAssetDir</a> *assetDir)</td></tr>
|
|
||||||
<tr class="separator:gace1c4d0da274d643c5b10ca218cc6088"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:gaadd86322c1fda5121b6d33745c317fb9"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#gaadd86322c1fda5121b6d33745c317fb9">AAsset_read</a> (<a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> *asset, void *buf, size_t count)</td></tr>
|
|
||||||
<tr class="separator:gaadd86322c1fda5121b6d33745c317fb9"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:gacc026a8bedeb1ef80bf12df3b72611a2"><td class="memItemLeft" align="right" valign="top">off_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#gacc026a8bedeb1ef80bf12df3b72611a2">AAsset_seek</a> (<a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> *asset, off_t offset, int whence)</td></tr>
|
|
||||||
<tr class="separator:gacc026a8bedeb1ef80bf12df3b72611a2"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:ga81fbe4368de24a3296ef7a6eba0053c7"><td class="memItemLeft" align="right" valign="top">off64_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#ga81fbe4368de24a3296ef7a6eba0053c7">AAsset_seek64</a> (<a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> *asset, off64_t offset, int whence)</td></tr>
|
|
||||||
<tr class="separator:ga81fbe4368de24a3296ef7a6eba0053c7"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:ga1f241e49f691dafcada23bcb76155122"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#ga1f241e49f691dafcada23bcb76155122">AAsset_close</a> (<a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> *asset)</td></tr>
|
|
||||||
<tr class="separator:ga1f241e49f691dafcada23bcb76155122"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:ga553a14512a98542306238c3ce70d344f"><td class="memItemLeft" align="right" valign="top">const void * </td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#ga553a14512a98542306238c3ce70d344f">AAsset_getBuffer</a> (<a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> *asset)</td></tr>
|
|
||||||
<tr class="separator:ga553a14512a98542306238c3ce70d344f"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:gaad8ec42e28522ebc72d3a5c357f9a600"><td class="memItemLeft" align="right" valign="top">off_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#gaad8ec42e28522ebc72d3a5c357f9a600">AAsset_getLength</a> (<a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> *asset)</td></tr>
|
|
||||||
<tr class="separator:gaad8ec42e28522ebc72d3a5c357f9a600"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:ga55c8bc459327d5d23089e6a4b453f3f1"><td class="memItemLeft" align="right" valign="top">off64_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#ga55c8bc459327d5d23089e6a4b453f3f1">AAsset_getLength64</a> (<a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> *asset)</td></tr>
|
|
||||||
<tr class="separator:ga55c8bc459327d5d23089e6a4b453f3f1"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:gae806f55cbc4a93ca245f2adfd63d3eee"><td class="memItemLeft" align="right" valign="top">off_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#gae806f55cbc4a93ca245f2adfd63d3eee">AAsset_getRemainingLength</a> (<a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> *asset)</td></tr>
|
|
||||||
<tr class="separator:gae806f55cbc4a93ca245f2adfd63d3eee"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:ga21e7221d88dcc44106843192b66755b5"><td class="memItemLeft" align="right" valign="top">off64_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#ga21e7221d88dcc44106843192b66755b5">AAsset_getRemainingLength64</a> (<a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> *asset)</td></tr>
|
|
||||||
<tr class="separator:ga21e7221d88dcc44106843192b66755b5"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:ga1af4ffd050016e99961e24f550981677"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#ga1af4ffd050016e99961e24f550981677">AAsset_openFileDescriptor</a> (<a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> *asset, off_t *outStart, off_t *outLength)</td></tr>
|
|
||||||
<tr class="separator:ga1af4ffd050016e99961e24f550981677"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:ga123a44a575f85d91a00a8456dab7bd0a"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#ga123a44a575f85d91a00a8456dab7bd0a">AAsset_openFileDescriptor64</a> (<a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> *asset, off64_t *outStart, off64_t *outLength)</td></tr>
|
|
||||||
<tr class="separator:ga123a44a575f85d91a00a8456dab7bd0a"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:ga20344cb952a77fa1004f592fb1b55124"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#ga20344cb952a77fa1004f592fb1b55124">AAsset_isAllocated</a> (<a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> *asset)</td></tr>
|
|
||||||
<tr class="separator:ga20344cb952a77fa1004f592fb1b55124"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:gadfd6537af41577735bcaee52120127f4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___asset.html#ga90c459935e76acf809b9ec90d1872771">AAssetManager</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#gadfd6537af41577735bcaee52120127f4">AAssetManager_fromJava</a> (JNIEnv *env, jobject assetManager)</td></tr>
|
|
||||||
<tr class="separator:gadfd6537af41577735bcaee52120127f4"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
</table>
|
|
||||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
|
||||||
<h2 class="groupheader">Typedef Documentation</h2>
|
|
||||||
<a class="anchor" id="ga5630b1f1aa5cd363303018cb2f12f95c"></a>
|
|
||||||
<div class="memitem">
|
|
||||||
<div class="memproto">
|
|
||||||
<table class="memname">
|
|
||||||
<tr>
|
|
||||||
<td class="memname">typedef struct <a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> <a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div><div class="memdoc">
|
|
||||||
<p><a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> provides access to a read-only asset.</p>
|
|
||||||
<p><a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> objects are NOT thread-safe, and should not be shared across threads. </p>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<a class="anchor" id="ga001a6b9c36a06ee977b9f51ed7103cdb"></a>
|
|
||||||
<div class="memitem">
|
|
||||||
<div class="memproto">
|
|
||||||
<table class="memname">
|
|
||||||
<tr>
|
|
||||||
<td class="memname">typedef struct <a class="el" href="group___asset.html#ga001a6b9c36a06ee977b9f51ed7103cdb">AAssetDir</a> <a class="el" href="group___asset.html#ga001a6b9c36a06ee977b9f51ed7103cdb">AAssetDir</a></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div><div class="memdoc">
|
|
||||||
<p><a class="el" href="group___asset.html#ga001a6b9c36a06ee977b9f51ed7103cdb">AAssetDir</a> provides access to a chunk of the asset hierarchy as if it were a single directory. The contents are populated by the <a class="el" href="group___asset.html#ga90c459935e76acf809b9ec90d1872771">AAssetManager</a>.</p>
|
|
||||||
<p>The list of files will be sorted in ascending order by ASCII value. </p>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<a class="anchor" id="ga90c459935e76acf809b9ec90d1872771"></a>
|
|
||||||
<div class="memitem">
|
|
||||||
<div class="memproto">
|
|
||||||
<table class="memname">
|
|
||||||
<tr>
|
|
||||||
<td class="memname">typedef struct <a class="el" href="group___asset.html#ga90c459935e76acf809b9ec90d1872771">AAssetManager</a> <a class="el" href="group___asset.html#ga90c459935e76acf809b9ec90d1872771">AAssetManager</a></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div><div class="memdoc">
|
|
||||||
<p><a class="el" href="group___asset.html#ga90c459935e76acf809b9ec90d1872771">AAssetManager</a> provides access to an application's raw assets by creating <a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> objects.</p>
|
|
||||||
<p>AAssetManager is a wrapper to the low-level native implementation of the java <a class="el" href="group___asset.html#ga90c459935e76acf809b9ec90d1872771">AAssetManager</a>, a pointer can be obtained using <a class="el" href="group___asset.html#gadfd6537af41577735bcaee52120127f4">AAssetManager_fromJava()</a>.</p>
|
|
||||||
<p>The asset hierarchy may be examined like a filesystem, using <a class="el" href="group___asset.html#ga001a6b9c36a06ee977b9f51ed7103cdb">AAssetDir</a> objects to peruse a single directory.</p>
|
|
||||||
<p>A native <a class="el" href="group___asset.html#ga90c459935e76acf809b9ec90d1872771">AAssetManager</a> pointer may be shared across multiple threads. </p>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<h2 class="groupheader">Enumeration Type Documentation</h2>
|
|
||||||
<a class="anchor" id="ga06fc87d81c62e9abb8790b6e5713c55b"></a>
|
|
||||||
<div class="memitem">
|
|
||||||
<div class="memproto">
|
|
||||||
<table class="memname">
|
|
||||||
<tr>
|
|
||||||
<td class="memname">anonymous enum</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div><div class="memdoc">
|
|
||||||
<p>Available access modes for opening assets with <a class="el" href="group___asset.html#ga0037ce3c10a591fe632f34c1aa62955c">AAssetManager_open</a> </p>
|
|
||||||
<table class="fieldtable">
|
|
||||||
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="gga06fc87d81c62e9abb8790b6e5713c55ba5bf76576f07042f965f230086f7c09f4"></a>AASSET_MODE_UNKNOWN</em> </td><td class="fielddoc">
|
|
||||||
<p>No specific information about how data will be accessed. </p>
|
|
||||||
</td></tr>
|
|
||||||
<tr><td class="fieldname"><em><a class="anchor" id="gga06fc87d81c62e9abb8790b6e5713c55ba88e1b2a920963d7596735fe28bf30e2f"></a>AASSET_MODE_RANDOM</em> </td><td class="fielddoc">
|
|
||||||
<p>Read chunks, and seek forward and backward. </p>
|
|
||||||
</td></tr>
|
|
||||||
<tr><td class="fieldname"><em><a class="anchor" id="gga06fc87d81c62e9abb8790b6e5713c55bac76f5fdb953097efc04e534474a7ea74"></a>AASSET_MODE_STREAMING</em> </td><td class="fielddoc">
|
|
||||||
<p>Read sequentially, with an occasional forward seek. </p>
|
|
||||||
</td></tr>
|
|
||||||
<tr><td class="fieldname"><em><a class="anchor" id="gga06fc87d81c62e9abb8790b6e5713c55ba40ec098f4afb7c2869fa449d3059f6bb"></a>AASSET_MODE_BUFFER</em> </td><td class="fielddoc">
|
|
||||||
<p>Caller plans to ask for a read-only buffer with all data. </p>
|
|
||||||
</td></tr>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<h2 class="groupheader">Function Documentation</h2>
|
|
||||||
<a class="anchor" id="ga1f241e49f691dafcada23bcb76155122"></a>
|
|
||||||
<div class="memitem">
|
|
||||||
<div class="memproto">
|
|
||||||
<table class="memname">
|
|
||||||
<tr>
|
|
||||||
<td class="memname">void AAsset_close </td>
|
|
||||||
<td>(</td>
|
|
||||||
<td class="paramtype"><a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> * </td>
|
|
||||||
<td class="paramname"><em>asset</em></td><td>)</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div><div class="memdoc">
|
|
||||||
<p>Close the asset, freeing all associated resources. </p>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<a class="anchor" id="ga553a14512a98542306238c3ce70d344f"></a>
|
|
||||||
<div class="memitem">
|
|
||||||
<div class="memproto">
|
|
||||||
<table class="memname">
|
|
||||||
<tr>
|
|
||||||
<td class="memname">const void* AAsset_getBuffer </td>
|
|
||||||
<td>(</td>
|
|
||||||
<td class="paramtype"><a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> * </td>
|
|
||||||
<td class="paramname"><em>asset</em></td><td>)</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div><div class="memdoc">
|
|
||||||
<p>Get a pointer to a buffer holding the entire contents of the assset.</p>
|
|
||||||
<p>Returns NULL on failure. </p>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<a class="anchor" id="gaad8ec42e28522ebc72d3a5c357f9a600"></a>
|
|
||||||
<div class="memitem">
|
|
||||||
<div class="memproto">
|
|
||||||
<table class="memname">
|
|
||||||
<tr>
|
|
||||||
<td class="memname">off_t AAsset_getLength </td>
|
|
||||||
<td>(</td>
|
|
||||||
<td class="paramtype"><a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> * </td>
|
|
||||||
<td class="paramname"><em>asset</em></td><td>)</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div><div class="memdoc">
|
|
||||||
<p>Report the total size of the asset data. </p>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<a class="anchor" id="ga55c8bc459327d5d23089e6a4b453f3f1"></a>
|
|
||||||
<div class="memitem">
|
|
||||||
<div class="memproto">
|
|
||||||
<table class="memname">
|
|
||||||
<tr>
|
|
||||||
<td class="memname">off64_t AAsset_getLength64 </td>
|
|
||||||
<td>(</td>
|
|
||||||
<td class="paramtype"><a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> * </td>
|
|
||||||
<td class="paramname"><em>asset</em></td><td>)</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div><div class="memdoc">
|
|
||||||
<p>Report the total size of the asset data. Reports the size using a 64-bit number insted of 32-bit as AAsset_getLength. </p>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<a class="anchor" id="gae806f55cbc4a93ca245f2adfd63d3eee"></a>
|
|
||||||
<div class="memitem">
|
|
||||||
<div class="memproto">
|
|
||||||
<table class="memname">
|
|
||||||
<tr>
|
|
||||||
<td class="memname">off_t AAsset_getRemainingLength </td>
|
|
||||||
<td>(</td>
|
|
||||||
<td class="paramtype"><a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> * </td>
|
|
||||||
<td class="paramname"><em>asset</em></td><td>)</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div><div class="memdoc">
|
|
||||||
<p>Report the total amount of asset data that can be read from the current position. </p>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<a class="anchor" id="ga21e7221d88dcc44106843192b66755b5"></a>
|
|
||||||
<div class="memitem">
|
|
||||||
<div class="memproto">
|
|
||||||
<table class="memname">
|
|
||||||
<tr>
|
|
||||||
<td class="memname">off64_t AAsset_getRemainingLength64 </td>
|
|
||||||
<td>(</td>
|
|
||||||
<td class="paramtype"><a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> * </td>
|
|
||||||
<td class="paramname"><em>asset</em></td><td>)</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div><div class="memdoc">
|
|
||||||
<p>Report the total amount of asset data that can be read from the current position.</p>
|
|
||||||
<p>Uses a 64-bit number instead of a 32-bit number as AAsset_getRemainingLength does. </p>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<a class="anchor" id="ga20344cb952a77fa1004f592fb1b55124"></a>
|
|
||||||
<div class="memitem">
|
|
||||||
<div class="memproto">
|
|
||||||
<table class="memname">
|
|
||||||
<tr>
|
|
||||||
<td class="memname">int AAsset_isAllocated </td>
|
|
||||||
<td>(</td>
|
|
||||||
<td class="paramtype"><a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> * </td>
|
|
||||||
<td class="paramname"><em>asset</em></td><td>)</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div><div class="memdoc">
|
|
||||||
<p>Returns whether this asset's internal buffer is allocated in ordinary RAM (i.e. not mmapped). </p>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<a class="anchor" id="ga1af4ffd050016e99961e24f550981677"></a>
|
|
||||||
<div class="memitem">
|
|
||||||
<div class="memproto">
|
|
||||||
<table class="memname">
|
|
||||||
<tr>
|
|
||||||
<td class="memname">int AAsset_openFileDescriptor </td>
|
|
||||||
<td>(</td>
|
|
||||||
<td class="paramtype"><a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> * </td>
|
|
||||||
<td class="paramname"><em>asset</em>, </td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="paramkey"></td>
|
|
||||||
<td></td>
|
|
||||||
<td class="paramtype">off_t * </td>
|
|
||||||
<td class="paramname"><em>outStart</em>, </td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="paramkey"></td>
|
|
||||||
<td></td>
|
|
||||||
<td class="paramtype">off_t * </td>
|
|
||||||
<td class="paramname"><em>outLength</em> </td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td></td>
|
|
||||||
<td>)</td>
|
|
||||||
<td></td><td></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div><div class="memdoc">
|
|
||||||
<p>Open a new file descriptor that can be used to read the asset data. If the start or length cannot be represented by a 32-bit number, it will be truncated. If the file is large, use AAsset_openFileDescriptor64 instead.</p>
|
|
||||||
<p>Returns < 0 if direct fd access is not possible (for example, if the asset is compressed). </p>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<a class="anchor" id="ga123a44a575f85d91a00a8456dab7bd0a"></a>
|
|
||||||
<div class="memitem">
|
|
||||||
<div class="memproto">
|
|
||||||
<table class="memname">
|
|
||||||
<tr>
|
|
||||||
<td class="memname">int AAsset_openFileDescriptor64 </td>
|
|
||||||
<td>(</td>
|
|
||||||
<td class="paramtype"><a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> * </td>
|
|
||||||
<td class="paramname"><em>asset</em>, </td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="paramkey"></td>
|
|
||||||
<td></td>
|
|
||||||
<td class="paramtype">off64_t * </td>
|
|
||||||
<td class="paramname"><em>outStart</em>, </td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="paramkey"></td>
|
|
||||||
<td></td>
|
|
||||||
<td class="paramtype">off64_t * </td>
|
|
||||||
<td class="paramname"><em>outLength</em> </td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td></td>
|
|
||||||
<td>)</td>
|
|
||||||
<td></td><td></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div><div class="memdoc">
|
|
||||||
<p>Open a new file descriptor that can be used to read the asset data.</p>
|
|
||||||
<p>Uses a 64-bit number for the offset and length instead of 32-bit instead of as AAsset_openFileDescriptor does.</p>
|
|
||||||
<p>Returns < 0 if direct fd access is not possible (for example, if the asset is compressed). </p>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<a class="anchor" id="gaadd86322c1fda5121b6d33745c317fb9"></a>
|
|
||||||
<div class="memitem">
|
|
||||||
<div class="memproto">
|
|
||||||
<table class="memname">
|
|
||||||
<tr>
|
|
||||||
<td class="memname">int AAsset_read </td>
|
|
||||||
<td>(</td>
|
|
||||||
<td class="paramtype"><a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> * </td>
|
|
||||||
<td class="paramname"><em>asset</em>, </td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="paramkey"></td>
|
|
||||||
<td></td>
|
|
||||||
<td class="paramtype">void * </td>
|
|
||||||
<td class="paramname"><em>buf</em>, </td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="paramkey"></td>
|
|
||||||
<td></td>
|
|
||||||
<td class="paramtype">size_t </td>
|
|
||||||
<td class="paramname"><em>count</em> </td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td></td>
|
|
||||||
<td>)</td>
|
|
||||||
<td></td><td></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div><div class="memdoc">
|
|
||||||
<p>Attempt to read 'count' bytes of data from the current offset.</p>
|
|
||||||
<p>Returns the number of bytes read, zero on EOF, or < 0 on error. </p>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<a class="anchor" id="gacc026a8bedeb1ef80bf12df3b72611a2"></a>
|
|
||||||
<div class="memitem">
|
|
||||||
<div class="memproto">
|
|
||||||
<table class="memname">
|
|
||||||
<tr>
|
|
||||||
<td class="memname">off_t AAsset_seek </td>
|
|
||||||
<td>(</td>
|
|
||||||
<td class="paramtype"><a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> * </td>
|
|
||||||
<td class="paramname"><em>asset</em>, </td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="paramkey"></td>
|
|
||||||
<td></td>
|
|
||||||
<td class="paramtype">off_t </td>
|
|
||||||
<td class="paramname"><em>offset</em>, </td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="paramkey"></td>
|
|
||||||
<td></td>
|
|
||||||
<td class="paramtype">int </td>
|
|
||||||
<td class="paramname"><em>whence</em> </td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td></td>
|
|
||||||
<td>)</td>
|
|
||||||
<td></td><td></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div><div class="memdoc">
|
|
||||||
<p>Seek to the specified offset within the asset data. 'whence' uses the same constants as lseek()/fseek().</p>
|
|
||||||
<p>Returns the new position on success, or (off_t) -1 on error. </p>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<a class="anchor" id="ga81fbe4368de24a3296ef7a6eba0053c7"></a>
|
|
||||||
<div class="memitem">
|
|
||||||
<div class="memproto">
|
|
||||||
<table class="memname">
|
|
||||||
<tr>
|
|
||||||
<td class="memname">off64_t AAsset_seek64 </td>
|
|
||||||
<td>(</td>
|
|
||||||
<td class="paramtype"><a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> * </td>
|
|
||||||
<td class="paramname"><em>asset</em>, </td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="paramkey"></td>
|
|
||||||
<td></td>
|
|
||||||
<td class="paramtype">off64_t </td>
|
|
||||||
<td class="paramname"><em>offset</em>, </td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="paramkey"></td>
|
|
||||||
<td></td>
|
|
||||||
<td class="paramtype">int </td>
|
|
||||||
<td class="paramname"><em>whence</em> </td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td></td>
|
|
||||||
<td>)</td>
|
|
||||||
<td></td><td></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div><div class="memdoc">
|
|
||||||
<p>Seek to the specified offset within the asset data. 'whence' uses the same constants as lseek()/fseek().</p>
|
|
||||||
<p>Uses 64-bit data type for large files as opposed to the 32-bit type used by AAsset_seek.</p>
|
|
||||||
<p>Returns the new position on success, or (off64_t) -1 on error. </p>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<a class="anchor" id="gace1c4d0da274d643c5b10ca218cc6088"></a>
|
|
||||||
<div class="memitem">
|
|
||||||
<div class="memproto">
|
|
||||||
<table class="memname">
|
|
||||||
<tr>
|
|
||||||
<td class="memname">void AAssetDir_close </td>
|
|
||||||
<td>(</td>
|
|
||||||
<td class="paramtype"><a class="el" href="group___asset.html#ga001a6b9c36a06ee977b9f51ed7103cdb">AAssetDir</a> * </td>
|
|
||||||
<td class="paramname"><em>assetDir</em></td><td>)</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div><div class="memdoc">
|
|
||||||
<p>Close an opened AAssetDir, freeing any related resources. </p>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<a class="anchor" id="ga4703b9f7baa3daeba248b6547de6b9b0"></a>
|
|
||||||
<div class="memitem">
|
|
||||||
<div class="memproto">
|
|
||||||
<table class="memname">
|
|
||||||
<tr>
|
|
||||||
<td class="memname">const char* AAssetDir_getNextFileName </td>
|
|
||||||
<td>(</td>
|
|
||||||
<td class="paramtype"><a class="el" href="group___asset.html#ga001a6b9c36a06ee977b9f51ed7103cdb">AAssetDir</a> * </td>
|
|
||||||
<td class="paramname"><em>assetDir</em></td><td>)</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div><div class="memdoc">
|
|
||||||
<p>Iterate over the files in an asset directory. A NULL string is returned when all the file names have been returned.</p>
|
|
||||||
<p>The returned file name is suitable for passing to <a class="el" href="group___asset.html#ga0037ce3c10a591fe632f34c1aa62955c">AAssetManager_open()</a>.</p>
|
|
||||||
<p>The string returned here is owned by the AssetDir implementation and is not guaranteed to remain valid if any other calls are made on this AAssetDir instance. </p>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<a class="anchor" id="ga45db6d19ad5e1c0f9b2e6b4059da14b3"></a>
|
|
||||||
<div class="memitem">
|
|
||||||
<div class="memproto">
|
|
||||||
<table class="memname">
|
|
||||||
<tr>
|
|
||||||
<td class="memname">void AAssetDir_rewind </td>
|
|
||||||
<td>(</td>
|
|
||||||
<td class="paramtype"><a class="el" href="group___asset.html#ga001a6b9c36a06ee977b9f51ed7103cdb">AAssetDir</a> * </td>
|
|
||||||
<td class="paramname"><em>assetDir</em></td><td>)</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div><div class="memdoc">
|
|
||||||
<p>Reset the iteration state of <a class="el" href="group___asset.html#ga4703b9f7baa3daeba248b6547de6b9b0">AAssetDir_getNextFileName()</a> to the beginning. </p>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<a class="anchor" id="gadfd6537af41577735bcaee52120127f4"></a>
|
|
||||||
<div class="memitem">
|
|
||||||
<div class="memproto">
|
|
||||||
<table class="memname">
|
|
||||||
<tr>
|
|
||||||
<td class="memname"><a class="el" href="group___asset.html#ga90c459935e76acf809b9ec90d1872771">AAssetManager</a>* AAssetManager_fromJava </td>
|
|
||||||
<td>(</td>
|
|
||||||
<td class="paramtype">JNIEnv * </td>
|
|
||||||
<td class="paramname"><em>env</em>, </td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="paramkey"></td>
|
|
||||||
<td></td>
|
|
||||||
<td class="paramtype">jobject </td>
|
|
||||||
<td class="paramname"><em>assetManager</em> </td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td></td>
|
|
||||||
<td>)</td>
|
|
||||||
<td></td><td></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div><div class="memdoc">
|
|
||||||
<p>Given a Dalvik AssetManager object, obtain the corresponding native AAssetManager object. Note that the caller is responsible for obtaining and holding a VM reference to the jobject to prevent its being garbage collected while the native object is in use. </p>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<a class="anchor" id="ga0037ce3c10a591fe632f34c1aa62955c"></a>
|
|
||||||
<div class="memitem">
|
|
||||||
<div class="memproto">
|
|
||||||
<table class="memname">
|
|
||||||
<tr>
|
|
||||||
<td class="memname"><a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a>* AAssetManager_open </td>
|
|
||||||
<td>(</td>
|
|
||||||
<td class="paramtype"><a class="el" href="group___asset.html#ga90c459935e76acf809b9ec90d1872771">AAssetManager</a> * </td>
|
|
||||||
<td class="paramname"><em>mgr</em>, </td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="paramkey"></td>
|
|
||||||
<td></td>
|
|
||||||
<td class="paramtype">const char * </td>
|
|
||||||
<td class="paramname"><em>filename</em>, </td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="paramkey"></td>
|
|
||||||
<td></td>
|
|
||||||
<td class="paramtype">int </td>
|
|
||||||
<td class="paramname"><em>mode</em> </td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td></td>
|
|
||||||
<td>)</td>
|
|
||||||
<td></td><td></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div><div class="memdoc">
|
|
||||||
<p>Open an asset.</p>
|
|
||||||
<p>The object returned here should be freed by calling <a class="el" href="group___asset.html#ga1f241e49f691dafcada23bcb76155122">AAsset_close()</a>. </p>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<a class="anchor" id="gab5b57ff012d6d1024d8bf5d30aedced4"></a>
|
|
||||||
<div class="memitem">
|
|
||||||
<div class="memproto">
|
|
||||||
<table class="memname">
|
|
||||||
<tr>
|
|
||||||
<td class="memname"><a class="el" href="group___asset.html#ga001a6b9c36a06ee977b9f51ed7103cdb">AAssetDir</a>* AAssetManager_openDir </td>
|
|
||||||
<td>(</td>
|
|
||||||
<td class="paramtype"><a class="el" href="group___asset.html#ga90c459935e76acf809b9ec90d1872771">AAssetManager</a> * </td>
|
|
||||||
<td class="paramname"><em>mgr</em>, </td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="paramkey"></td>
|
|
||||||
<td></td>
|
|
||||||
<td class="paramtype">const char * </td>
|
|
||||||
<td class="paramname"><em>dirName</em> </td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td></td>
|
|
||||||
<td>)</td>
|
|
||||||
<td></td><td></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div><div class="memdoc">
|
|
||||||
<p>Open the named directory within the asset hierarchy. The directory can then be inspected with the AAssetDir functions. To open the top-level directory, pass in "" as the dirName.</p>
|
|
||||||
<p>The object returned here should be freed by calling <a class="el" href="group___asset.html#gace1c4d0da274d643c5b10ca218cc6088">AAssetDir_close()</a>. </p>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div><!-- contents -->
|
|
||||||
@@ -1,230 +0,0 @@
|
|||||||
page.title=Bitmap
|
|
||||||
page.customHeadTag=<link rel="stylesheet" type="text/css" href="doxygen-dac.css">
|
|
||||||
@jd:body
|
|
||||||
<!-- Generated by Doxygen 1.8.6 -->
|
|
||||||
</div><!-- top -->
|
|
||||||
<div class="header">
|
|
||||||
<div class="summary">
|
|
||||||
<a href="#files">Files</a> |
|
|
||||||
<a href="#nested-classes">Data Structures</a> |
|
|
||||||
<a href="#define-members">Macros</a> |
|
|
||||||
<a href="#enum-members">Enumerations</a> |
|
|
||||||
<a href="#func-members">Functions</a> </div>
|
|
||||||
<div class="headertitle">
|
|
||||||
<div class="title">Bitmap</div> </div>
|
|
||||||
</div><!--header-->
|
|
||||||
<div class="contents">
|
|
||||||
<table class="memberdecls">
|
|
||||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="files"></a>
|
|
||||||
Files</h2></td></tr>
|
|
||||||
<tr class="memitem:bitmap_8h"><td class="memItemLeft" align="right" valign="top">file  </td><td class="memItemRight" valign="bottom"><a class="el" href="bitmap_8h.html">bitmap.h</a></td></tr>
|
|
||||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
</table><table class="memberdecls">
|
|
||||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
|
|
||||||
Data Structures</h2></td></tr>
|
|
||||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_android_bitmap_info.html">AndroidBitmapInfo</a></td></tr>
|
|
||||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
</table><table class="memberdecls">
|
|
||||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
|
|
||||||
Macros</h2></td></tr>
|
|
||||||
<tr class="memitem:gafb665ac9fefad34ac5c035f5d1314080"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group___bitmap.html#gafb665ac9fefad34ac5c035f5d1314080">ANDROID_BITMAP_RESUT_SUCCESS</a>   <a class="el" href="group___bitmap.html#ggadf764cbdea00d65edcd07bb9953ad2b7a07f71cf5c5d4950ac9813ae4bbf6d076">ANDROID_BITMAP_RESULT_SUCCESS</a></td></tr>
|
|
||||||
<tr class="separator:gafb665ac9fefad34ac5c035f5d1314080"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
</table><table class="memberdecls">
|
|
||||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
|
|
||||||
Enumerations</h2></td></tr>
|
|
||||||
<tr class="memitem:gadf764cbdea00d65edcd07bb9953ad2b7"><td class="memItemLeft" align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom">{ <a class="el" href="group___bitmap.html#ggadf764cbdea00d65edcd07bb9953ad2b7a07f71cf5c5d4950ac9813ae4bbf6d076">ANDROID_BITMAP_RESULT_SUCCESS</a> = 0,
|
|
||||||
<a class="el" href="group___bitmap.html#ggadf764cbdea00d65edcd07bb9953ad2b7acf7205d1a348d867c63ac2885ce01374">ANDROID_BITMAP_RESULT_BAD_PARAMETER</a> = -1,
|
|
||||||
<a class="el" href="group___bitmap.html#ggadf764cbdea00d65edcd07bb9953ad2b7a6b099b9533c38729a6c305f2fe93f98d">ANDROID_BITMAP_RESULT_JNI_EXCEPTION</a> = -2,
|
|
||||||
<a class="el" href="group___bitmap.html#ggadf764cbdea00d65edcd07bb9953ad2b7a512f5b95b6b57e78d65502c06391f990">ANDROID_BITMAP_RESULT_ALLOCATION_FAILED</a> = -3
|
|
||||||
}</td></tr>
|
|
||||||
<tr class="separator:gadf764cbdea00d65edcd07bb9953ad2b7"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:gaea286a2d4c61ae2abb02b51500499f13"><td class="memItemLeft" align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom"><a class="el" href="group___bitmap.html#gaea286a2d4c61ae2abb02b51500499f13">AndroidBitmapFormat</a> { <br/>
|
|
||||||
  <a class="el" href="group___bitmap.html#ggaea286a2d4c61ae2abb02b51500499f13ac6f0378ea5cfefd9abee2596af5a9021">ANDROID_BITMAP_FORMAT_NONE</a> = 0,
|
|
||||||
<a class="el" href="group___bitmap.html#ggaea286a2d4c61ae2abb02b51500499f13ab92ae96ceea06aa534583beadba84057">ANDROID_BITMAP_FORMAT_RGBA_8888</a> = 1,
|
|
||||||
<a class="el" href="group___bitmap.html#ggaea286a2d4c61ae2abb02b51500499f13a11b32e10d6db28fae70ec3590cb9ee91">ANDROID_BITMAP_FORMAT_RGB_565</a> = 4,
|
|
||||||
<a class="el" href="group___bitmap.html#ggaea286a2d4c61ae2abb02b51500499f13adc2ede06eafe20439271cb8137dc7528">ANDROID_BITMAP_FORMAT_RGBA_4444</a> = 7,
|
|
||||||
<br/>
|
|
||||||
  <a class="el" href="group___bitmap.html#ggaea286a2d4c61ae2abb02b51500499f13ad29996be25f8f88c96e016a1da5c4bca">ANDROID_BITMAP_FORMAT_A_8</a> = 8
|
|
||||||
<br/>
|
|
||||||
}</td></tr>
|
|
||||||
<tr class="separator:gaea286a2d4c61ae2abb02b51500499f13"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
</table><table class="memberdecls">
|
|
||||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
|
|
||||||
Functions</h2></td></tr>
|
|
||||||
<tr class="memitem:ga80292ee39d8a675928e38849742b54bf"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group___bitmap.html#ga80292ee39d8a675928e38849742b54bf">AndroidBitmap_getInfo</a> (JNIEnv *env, jobject jbitmap, <a class="el" href="struct_android_bitmap_info.html">AndroidBitmapInfo</a> *info)</td></tr>
|
|
||||||
<tr class="separator:ga80292ee39d8a675928e38849742b54bf"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:ga2908d42fa4db286c34b7f8c11f29206f"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group___bitmap.html#ga2908d42fa4db286c34b7f8c11f29206f">AndroidBitmap_lockPixels</a> (JNIEnv *env, jobject jbitmap, void **addrPtr)</td></tr>
|
|
||||||
<tr class="separator:ga2908d42fa4db286c34b7f8c11f29206f"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:ga4aca91f37baddd42d0051dca8179d4ed"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group___bitmap.html#ga4aca91f37baddd42d0051dca8179d4ed">AndroidBitmap_unlockPixels</a> (JNIEnv *env, jobject jbitmap)</td></tr>
|
|
||||||
<tr class="separator:ga4aca91f37baddd42d0051dca8179d4ed"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
</table>
|
|
||||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
|
||||||
<h2 class="groupheader">Macro Definition Documentation</h2>
|
|
||||||
<a class="anchor" id="gafb665ac9fefad34ac5c035f5d1314080"></a>
|
|
||||||
<div class="memitem">
|
|
||||||
<div class="memproto">
|
|
||||||
<table class="memname">
|
|
||||||
<tr>
|
|
||||||
<td class="memname">#define ANDROID_BITMAP_RESUT_SUCCESS   <a class="el" href="group___bitmap.html#ggadf764cbdea00d65edcd07bb9953ad2b7a07f71cf5c5d4950ac9813ae4bbf6d076">ANDROID_BITMAP_RESULT_SUCCESS</a></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div><div class="memdoc">
|
|
||||||
<p>Backward compatibility: this macro used to be misspelled. </p>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<h2 class="groupheader">Enumeration Type Documentation</h2>
|
|
||||||
<a class="anchor" id="gadf764cbdea00d65edcd07bb9953ad2b7"></a>
|
|
||||||
<div class="memitem">
|
|
||||||
<div class="memproto">
|
|
||||||
<table class="memname">
|
|
||||||
<tr>
|
|
||||||
<td class="memname">anonymous enum</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div><div class="memdoc">
|
|
||||||
<p>AndroidBitmap functions result code. </p>
|
|
||||||
<table class="fieldtable">
|
|
||||||
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="ggadf764cbdea00d65edcd07bb9953ad2b7a07f71cf5c5d4950ac9813ae4bbf6d076"></a>ANDROID_BITMAP_RESULT_SUCCESS</em> </td><td class="fielddoc">
|
|
||||||
<p>Operation was successful. </p>
|
|
||||||
</td></tr>
|
|
||||||
<tr><td class="fieldname"><em><a class="anchor" id="ggadf764cbdea00d65edcd07bb9953ad2b7acf7205d1a348d867c63ac2885ce01374"></a>ANDROID_BITMAP_RESULT_BAD_PARAMETER</em> </td><td class="fielddoc">
|
|
||||||
<p>Bad parameter. </p>
|
|
||||||
</td></tr>
|
|
||||||
<tr><td class="fieldname"><em><a class="anchor" id="ggadf764cbdea00d65edcd07bb9953ad2b7a6b099b9533c38729a6c305f2fe93f98d"></a>ANDROID_BITMAP_RESULT_JNI_EXCEPTION</em> </td><td class="fielddoc">
|
|
||||||
<p>JNI exception occured. </p>
|
|
||||||
</td></tr>
|
|
||||||
<tr><td class="fieldname"><em><a class="anchor" id="ggadf764cbdea00d65edcd07bb9953ad2b7a512f5b95b6b57e78d65502c06391f990"></a>ANDROID_BITMAP_RESULT_ALLOCATION_FAILED</em> </td><td class="fielddoc">
|
|
||||||
<p>Allocation failed. </p>
|
|
||||||
</td></tr>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<a class="anchor" id="gaea286a2d4c61ae2abb02b51500499f13"></a>
|
|
||||||
<div class="memitem">
|
|
||||||
<div class="memproto">
|
|
||||||
<table class="memname">
|
|
||||||
<tr>
|
|
||||||
<td class="memname">enum <a class="el" href="group___bitmap.html#gaea286a2d4c61ae2abb02b51500499f13">AndroidBitmapFormat</a></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div><div class="memdoc">
|
|
||||||
<p>Bitmap pixel format. </p>
|
|
||||||
<table class="fieldtable">
|
|
||||||
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="ggaea286a2d4c61ae2abb02b51500499f13ac6f0378ea5cfefd9abee2596af5a9021"></a>ANDROID_BITMAP_FORMAT_NONE</em> </td><td class="fielddoc">
|
|
||||||
<p>No format. </p>
|
|
||||||
</td></tr>
|
|
||||||
<tr><td class="fieldname"><em><a class="anchor" id="ggaea286a2d4c61ae2abb02b51500499f13ab92ae96ceea06aa534583beadba84057"></a>ANDROID_BITMAP_FORMAT_RGBA_8888</em> </td><td class="fielddoc">
|
|
||||||
<p>Red: 8 bits, Green: 8 bits, Blue: 8 bits, Alpha: 8 bits. </p>
|
|
||||||
</td></tr>
|
|
||||||
<tr><td class="fieldname"><em><a class="anchor" id="ggaea286a2d4c61ae2abb02b51500499f13a11b32e10d6db28fae70ec3590cb9ee91"></a>ANDROID_BITMAP_FORMAT_RGB_565</em> </td><td class="fielddoc">
|
|
||||||
<p>Red: 5 bits, Green: 6 bits, Blue: 5 bits. </p>
|
|
||||||
</td></tr>
|
|
||||||
<tr><td class="fieldname"><em><a class="anchor" id="ggaea286a2d4c61ae2abb02b51500499f13adc2ede06eafe20439271cb8137dc7528"></a>ANDROID_BITMAP_FORMAT_RGBA_4444</em> </td><td class="fielddoc">
|
|
||||||
<p>Red: 4 bits, Green: 4 bits, Blue: 4 bits, Alpha: 4 bits. </p>
|
|
||||||
</td></tr>
|
|
||||||
<tr><td class="fieldname"><em><a class="anchor" id="ggaea286a2d4c61ae2abb02b51500499f13ad29996be25f8f88c96e016a1da5c4bca"></a>ANDROID_BITMAP_FORMAT_A_8</em> </td><td class="fielddoc">
|
|
||||||
<p>Deprecated. </p>
|
|
||||||
</td></tr>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<h2 class="groupheader">Function Documentation</h2>
|
|
||||||
<a class="anchor" id="ga80292ee39d8a675928e38849742b54bf"></a>
|
|
||||||
<div class="memitem">
|
|
||||||
<div class="memproto">
|
|
||||||
<table class="memname">
|
|
||||||
<tr>
|
|
||||||
<td class="memname">int AndroidBitmap_getInfo </td>
|
|
||||||
<td>(</td>
|
|
||||||
<td class="paramtype">JNIEnv * </td>
|
|
||||||
<td class="paramname"><em>env</em>, </td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="paramkey"></td>
|
|
||||||
<td></td>
|
|
||||||
<td class="paramtype">jobject </td>
|
|
||||||
<td class="paramname"><em>jbitmap</em>, </td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="paramkey"></td>
|
|
||||||
<td></td>
|
|
||||||
<td class="paramtype"><a class="el" href="struct_android_bitmap_info.html">AndroidBitmapInfo</a> * </td>
|
|
||||||
<td class="paramname"><em>info</em> </td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td></td>
|
|
||||||
<td>)</td>
|
|
||||||
<td></td><td></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div><div class="memdoc">
|
|
||||||
<p>Given a java bitmap object, fill out the <a class="el" href="struct_android_bitmap_info.html">AndroidBitmapInfo</a> struct for it. If the call fails, the info parameter will be ignored. </p>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<a class="anchor" id="ga2908d42fa4db286c34b7f8c11f29206f"></a>
|
|
||||||
<div class="memitem">
|
|
||||||
<div class="memproto">
|
|
||||||
<table class="memname">
|
|
||||||
<tr>
|
|
||||||
<td class="memname">int AndroidBitmap_lockPixels </td>
|
|
||||||
<td>(</td>
|
|
||||||
<td class="paramtype">JNIEnv * </td>
|
|
||||||
<td class="paramname"><em>env</em>, </td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="paramkey"></td>
|
|
||||||
<td></td>
|
|
||||||
<td class="paramtype">jobject </td>
|
|
||||||
<td class="paramname"><em>jbitmap</em>, </td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="paramkey"></td>
|
|
||||||
<td></td>
|
|
||||||
<td class="paramtype">void ** </td>
|
|
||||||
<td class="paramname"><em>addrPtr</em> </td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td></td>
|
|
||||||
<td>)</td>
|
|
||||||
<td></td><td></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div><div class="memdoc">
|
|
||||||
<p>Given a java bitmap object, attempt to lock the pixel address. Locking will ensure that the memory for the pixels will not move until the unlockPixels call, and ensure that, if the pixels had been previously purged, they will have been restored.</p>
|
|
||||||
<p>If this call succeeds, it must be balanced by a call to AndroidBitmap_unlockPixels, after which time the address of the pixels should no longer be used.</p>
|
|
||||||
<p>If this succeeds, *addrPtr will be set to the pixel address. If the call fails, addrPtr will be ignored. </p>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<a class="anchor" id="ga4aca91f37baddd42d0051dca8179d4ed"></a>
|
|
||||||
<div class="memitem">
|
|
||||||
<div class="memproto">
|
|
||||||
<table class="memname">
|
|
||||||
<tr>
|
|
||||||
<td class="memname">int AndroidBitmap_unlockPixels </td>
|
|
||||||
<td>(</td>
|
|
||||||
<td class="paramtype">JNIEnv * </td>
|
|
||||||
<td class="paramname"><em>env</em>, </td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="paramkey"></td>
|
|
||||||
<td></td>
|
|
||||||
<td class="paramtype">jobject </td>
|
|
||||||
<td class="paramname"><em>jbitmap</em> </td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td></td>
|
|
||||||
<td>)</td>
|
|
||||||
<td></td><td></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div><div class="memdoc">
|
|
||||||
<p>Call this to balance a successful call to AndroidBitmap_lockPixels. </p>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div><!-- contents -->
|
|
||||||
@@ -1,442 +0,0 @@
|
|||||||
page.title=Looper
|
|
||||||
page.customHeadTag=<link rel="stylesheet" type="text/css" href="doxygen-dac.css">
|
|
||||||
@jd:body
|
|
||||||
<!-- Generated by Doxygen 1.8.6 -->
|
|
||||||
</div><!-- top -->
|
|
||||||
<div class="header">
|
|
||||||
<div class="summary">
|
|
||||||
<a href="#files">Files</a> |
|
|
||||||
<a href="#typedef-members">Typedefs</a> |
|
|
||||||
<a href="#enum-members">Enumerations</a> |
|
|
||||||
<a href="#func-members">Functions</a> </div>
|
|
||||||
<div class="headertitle">
|
|
||||||
<div class="title">Looper</div> </div>
|
|
||||||
</div><!--header-->
|
|
||||||
<div class="contents">
|
|
||||||
<table class="memberdecls">
|
|
||||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="files"></a>
|
|
||||||
Files</h2></td></tr>
|
|
||||||
<tr class="memitem:looper_8h"><td class="memItemLeft" align="right" valign="top">file  </td><td class="memItemRight" valign="bottom"><a class="el" href="looper_8h.html">looper.h</a></td></tr>
|
|
||||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
</table><table class="memberdecls">
|
|
||||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
|
|
||||||
Typedefs</h2></td></tr>
|
|
||||||
<tr class="memitem:gadb10521a80138b777ba1bc2ca74d4af5"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="group___looper.html#gadb10521a80138b777ba1bc2ca74d4af5">ALooper</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group___looper.html#gadb10521a80138b777ba1bc2ca74d4af5">ALooper</a></td></tr>
|
|
||||||
<tr class="separator:gadb10521a80138b777ba1bc2ca74d4af5"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:ga410b184b4e48302c439e36c8ce0a7a89"><td class="memItemLeft" align="right" valign="top">typedef int(* </td><td class="memItemRight" valign="bottom"><a class="el" href="group___looper.html#ga410b184b4e48302c439e36c8ce0a7a89">ALooper_callbackFunc</a> )(int fd, int events, void *data)</td></tr>
|
|
||||||
<tr class="separator:ga410b184b4e48302c439e36c8ce0a7a89"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
</table><table class="memberdecls">
|
|
||||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
|
|
||||||
Enumerations</h2></td></tr>
|
|
||||||
<tr class="memitem:gaf9bdc3014f3d54c426b6d2df10de4960"><td class="memItemLeft" align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom">{ <a class="el" href="group___looper.html#ggaf9bdc3014f3d54c426b6d2df10de4960a1fff26ab5859b0308b58a3f8d58ef1eb">ALOOPER_PREPARE_ALLOW_NON_CALLBACKS</a> = 1<<0
|
|
||||||
}</td></tr>
|
|
||||||
<tr class="separator:gaf9bdc3014f3d54c426b6d2df10de4960"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:gadb49720dc49f7d4e4cf9adbf2948e409"><td class="memItemLeft" align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom">{ <a class="el" href="group___looper.html#ggadb49720dc49f7d4e4cf9adbf2948e409a55528f1b28df17cc4b6317cc0d0fde47">ALOOPER_POLL_WAKE</a> = -1,
|
|
||||||
<a class="el" href="group___looper.html#ggadb49720dc49f7d4e4cf9adbf2948e409a64fe936780bfd9927affaf8e8cc81cc2">ALOOPER_POLL_CALLBACK</a> = -2,
|
|
||||||
<a class="el" href="group___looper.html#ggadb49720dc49f7d4e4cf9adbf2948e409a3fe4eec66dff78a9fa8afca02e8b8443">ALOOPER_POLL_TIMEOUT</a> = -3,
|
|
||||||
<a class="el" href="group___looper.html#ggadb49720dc49f7d4e4cf9adbf2948e409af8ebd4022f6f5d5fea864f6999b7e6b4">ALOOPER_POLL_ERROR</a> = -4
|
|
||||||
}</td></tr>
|
|
||||||
<tr class="separator:gadb49720dc49f7d4e4cf9adbf2948e409"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:gaae05225933a42f81e7c4a9fb286596f9"><td class="memItemLeft" align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom">{ <br/>
|
|
||||||
  <a class="el" href="group___looper.html#ggaae05225933a42f81e7c4a9fb286596f9ae3d18f8dd1faf6f34468df10667949bc">ALOOPER_EVENT_INPUT</a> = 1 << 0,
|
|
||||||
<a class="el" href="group___looper.html#ggaae05225933a42f81e7c4a9fb286596f9a71273fd07e009057e6e3475d10f8286d">ALOOPER_EVENT_OUTPUT</a> = 1 << 1,
|
|
||||||
<a class="el" href="group___looper.html#ggaae05225933a42f81e7c4a9fb286596f9a14016d8f39373b8ce061276a957960f6">ALOOPER_EVENT_ERROR</a> = 1 << 2,
|
|
||||||
<a class="el" href="group___looper.html#ggaae05225933a42f81e7c4a9fb286596f9a5e7fb5acdecef18b2c293f6309e5d4ab">ALOOPER_EVENT_HANGUP</a> = 1 << 3,
|
|
||||||
<br/>
|
|
||||||
  <a class="el" href="group___looper.html#ggaae05225933a42f81e7c4a9fb286596f9aefe82c6ce8e02d13aceaebdec15c2aff">ALOOPER_EVENT_INVALID</a> = 1 << 4
|
|
||||||
<br/>
|
|
||||||
}</td></tr>
|
|
||||||
<tr class="separator:gaae05225933a42f81e7c4a9fb286596f9"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
</table><table class="memberdecls">
|
|
||||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
|
|
||||||
Functions</h2></td></tr>
|
|
||||||
<tr class="memitem:ga741ccd90a0eb9209c6bddf2326d89e4a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___looper.html#gadb10521a80138b777ba1bc2ca74d4af5">ALooper</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="group___looper.html#ga741ccd90a0eb9209c6bddf2326d89e4a">ALooper_forThread</a> ()</td></tr>
|
|
||||||
<tr class="separator:ga741ccd90a0eb9209c6bddf2326d89e4a"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:ga1a070b904dd957cc65af9eb5ef6dfa25"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___looper.html#gadb10521a80138b777ba1bc2ca74d4af5">ALooper</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="group___looper.html#ga1a070b904dd957cc65af9eb5ef6dfa25">ALooper_prepare</a> (int opts)</td></tr>
|
|
||||||
<tr class="separator:ga1a070b904dd957cc65af9eb5ef6dfa25"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:gae1ad7ac48ab01a34bfd25840c92ff07b"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group___looper.html#gae1ad7ac48ab01a34bfd25840c92ff07b">ALooper_acquire</a> (<a class="el" href="group___looper.html#gadb10521a80138b777ba1bc2ca74d4af5">ALooper</a> *looper)</td></tr>
|
|
||||||
<tr class="separator:gae1ad7ac48ab01a34bfd25840c92ff07b"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:gab723c3c2ac2c66bc695913a194073727"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group___looper.html#gab723c3c2ac2c66bc695913a194073727">ALooper_release</a> (<a class="el" href="group___looper.html#gadb10521a80138b777ba1bc2ca74d4af5">ALooper</a> *looper)</td></tr>
|
|
||||||
<tr class="separator:gab723c3c2ac2c66bc695913a194073727"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:ga2a9044602b76fef7f47c7e11a801561c"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group___looper.html#ga2a9044602b76fef7f47c7e11a801561c">ALooper_pollOnce</a> (int timeoutMillis, int *outFd, int *outEvents, void **outData)</td></tr>
|
|
||||||
<tr class="separator:ga2a9044602b76fef7f47c7e11a801561c"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:gaa7cd0636edc4ed227aadc585360ebefa"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group___looper.html#gaa7cd0636edc4ed227aadc585360ebefa">ALooper_pollAll</a> (int timeoutMillis, int *outFd, int *outEvents, void **outData)</td></tr>
|
|
||||||
<tr class="separator:gaa7cd0636edc4ed227aadc585360ebefa"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:gab2585652f8ae2e2444979194ebe32aaf"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group___looper.html#gab2585652f8ae2e2444979194ebe32aaf">ALooper_wake</a> (<a class="el" href="group___looper.html#gadb10521a80138b777ba1bc2ca74d4af5">ALooper</a> *looper)</td></tr>
|
|
||||||
<tr class="separator:gab2585652f8ae2e2444979194ebe32aaf"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:ga2668285bfadcf21ef4d371568a30be33"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group___looper.html#ga2668285bfadcf21ef4d371568a30be33">ALooper_addFd</a> (<a class="el" href="group___looper.html#gadb10521a80138b777ba1bc2ca74d4af5">ALooper</a> *looper, int fd, int ident, int events, <a class="el" href="group___looper.html#ga410b184b4e48302c439e36c8ce0a7a89">ALooper_callbackFunc</a> callback, void *data)</td></tr>
|
|
||||||
<tr class="separator:ga2668285bfadcf21ef4d371568a30be33"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
<tr class="memitem:gaf7d68ed05698b251489b4f6c8e54daad"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group___looper.html#gaf7d68ed05698b251489b4f6c8e54daad">ALooper_removeFd</a> (<a class="el" href="group___looper.html#gadb10521a80138b777ba1bc2ca74d4af5">ALooper</a> *looper, int fd)</td></tr>
|
|
||||||
<tr class="separator:gaf7d68ed05698b251489b4f6c8e54daad"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
</table>
|
|
||||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
|
||||||
<h2 class="groupheader">Typedef Documentation</h2>
|
|
||||||
<a class="anchor" id="gadb10521a80138b777ba1bc2ca74d4af5"></a>
|
|
||||||
<div class="memitem">
|
|
||||||
<div class="memproto">
|
|
||||||
<table class="memname">
|
|
||||||
<tr>
|
|
||||||
<td class="memname">typedef struct <a class="el" href="group___looper.html#gadb10521a80138b777ba1bc2ca74d4af5">ALooper</a> <a class="el" href="group___looper.html#gadb10521a80138b777ba1bc2ca74d4af5">ALooper</a></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div><div class="memdoc">
|
|
||||||
<p>ALooper</p>
|
|
||||||
<p>A looper is the state tracking an event loop for a thread. Loopers do not define event structures or other such things; rather they are a lower-level facility to attach one or more discrete objects listening for an event. An "event" here is simply data available on a file descriptor: each attached object has an associated file descriptor, and waiting for "events" means (internally) polling on all of these file descriptors until one or more of them have data available.</p>
|
|
||||||
<p>A thread can have only one ALooper associated with it. </p>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<a class="anchor" id="ga410b184b4e48302c439e36c8ce0a7a89"></a>
|
|
||||||
<div class="memitem">
|
|
||||||
<div class="memproto">
|
|
||||||
<table class="memname">
|
|
||||||
<tr>
|
|
||||||
<td class="memname">typedef int(* ALooper_callbackFunc)(int fd, int events, void *data)</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div><div class="memdoc">
|
|
||||||
<p>For callback-based event loops, this is the prototype of the function that is called when a file descriptor event occurs. It is given the file descriptor it is associated with, a bitmask of the poll events that were triggered (typically ALOOPER_EVENT_INPUT), and the data pointer that was originally supplied.</p>
|
|
||||||
<p>Implementations should return 1 to continue receiving callbacks, or 0 to have this file descriptor and callback unregistered from the looper. </p>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<h2 class="groupheader">Enumeration Type Documentation</h2>
|
|
||||||
<a class="anchor" id="gaf9bdc3014f3d54c426b6d2df10de4960"></a>
|
|
||||||
<div class="memitem">
|
|
||||||
<div class="memproto">
|
|
||||||
<table class="memname">
|
|
||||||
<tr>
|
|
||||||
<td class="memname">anonymous enum</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div><div class="memdoc">
|
|
||||||
<p>Option for for <a class="el" href="group___looper.html#ga1a070b904dd957cc65af9eb5ef6dfa25">ALooper_prepare()</a>. </p>
|
|
||||||
<table class="fieldtable">
|
|
||||||
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="ggaf9bdc3014f3d54c426b6d2df10de4960a1fff26ab5859b0308b58a3f8d58ef1eb"></a>ALOOPER_PREPARE_ALLOW_NON_CALLBACKS</em> </td><td class="fielddoc">
|
|
||||||
<p>This looper will accept calls to <a class="el" href="group___looper.html#ga2668285bfadcf21ef4d371568a30be33">ALooper_addFd()</a> that do not have a callback (that is provide NULL for the callback). In this case the caller of <a class="el" href="group___looper.html#ga2a9044602b76fef7f47c7e11a801561c">ALooper_pollOnce()</a> or <a class="el" href="group___looper.html#gaa7cd0636edc4ed227aadc585360ebefa">ALooper_pollAll()</a> MUST check the return from these functions to discover when data is available on such fds and process it. </p>
|
|
||||||
</td></tr>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<a class="anchor" id="gadb49720dc49f7d4e4cf9adbf2948e409"></a>
|
|
||||||
<div class="memitem">
|
|
||||||
<div class="memproto">
|
|
||||||
<table class="memname">
|
|
||||||
<tr>
|
|
||||||
<td class="memname">anonymous enum</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div><div class="memdoc">
|
|
||||||
<p>Result from <a class="el" href="group___looper.html#ga2a9044602b76fef7f47c7e11a801561c">ALooper_pollOnce()</a> and <a class="el" href="group___looper.html#gaa7cd0636edc4ed227aadc585360ebefa">ALooper_pollAll()</a>. </p>
|
|
||||||
<table class="fieldtable">
|
|
||||||
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="ggadb49720dc49f7d4e4cf9adbf2948e409a55528f1b28df17cc4b6317cc0d0fde47"></a>ALOOPER_POLL_WAKE</em> </td><td class="fielddoc">
|
|
||||||
<p>The poll was awoken using wake() before the timeout expired and no callbacks were executed and no other file descriptors were ready. </p>
|
|
||||||
</td></tr>
|
|
||||||
<tr><td class="fieldname"><em><a class="anchor" id="ggadb49720dc49f7d4e4cf9adbf2948e409a64fe936780bfd9927affaf8e8cc81cc2"></a>ALOOPER_POLL_CALLBACK</em> </td><td class="fielddoc">
|
|
||||||
<p>Result from <a class="el" href="group___looper.html#ga2a9044602b76fef7f47c7e11a801561c">ALooper_pollOnce()</a> and <a class="el" href="group___looper.html#gaa7cd0636edc4ed227aadc585360ebefa">ALooper_pollAll()</a>: One or more callbacks were executed. </p>
|
|
||||||
</td></tr>
|
|
||||||
<tr><td class="fieldname"><em><a class="anchor" id="ggadb49720dc49f7d4e4cf9adbf2948e409a3fe4eec66dff78a9fa8afca02e8b8443"></a>ALOOPER_POLL_TIMEOUT</em> </td><td class="fielddoc">
|
|
||||||
<p>Result from <a class="el" href="group___looper.html#ga2a9044602b76fef7f47c7e11a801561c">ALooper_pollOnce()</a> and <a class="el" href="group___looper.html#gaa7cd0636edc4ed227aadc585360ebefa">ALooper_pollAll()</a>: The timeout expired. </p>
|
|
||||||
</td></tr>
|
|
||||||
<tr><td class="fieldname"><em><a class="anchor" id="ggadb49720dc49f7d4e4cf9adbf2948e409af8ebd4022f6f5d5fea864f6999b7e6b4"></a>ALOOPER_POLL_ERROR</em> </td><td class="fielddoc">
|
|
||||||
<p>Result from <a class="el" href="group___looper.html#ga2a9044602b76fef7f47c7e11a801561c">ALooper_pollOnce()</a> and <a class="el" href="group___looper.html#gaa7cd0636edc4ed227aadc585360ebefa">ALooper_pollAll()</a>: An error occurred. </p>
|
|
||||||
</td></tr>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<a class="anchor" id="gaae05225933a42f81e7c4a9fb286596f9"></a>
|
|
||||||
<div class="memitem">
|
|
||||||
<div class="memproto">
|
|
||||||
<table class="memname">
|
|
||||||
<tr>
|
|
||||||
<td class="memname">anonymous enum</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div><div class="memdoc">
|
|
||||||
<p>Flags for file descriptor events that a looper can monitor.</p>
|
|
||||||
<p>These flag bits can be combined to monitor multiple events at once. </p>
|
|
||||||
<table class="fieldtable">
|
|
||||||
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="ggaae05225933a42f81e7c4a9fb286596f9ae3d18f8dd1faf6f34468df10667949bc"></a>ALOOPER_EVENT_INPUT</em> </td><td class="fielddoc">
|
|
||||||
<p>The file descriptor is available for read operations. </p>
|
|
||||||
</td></tr>
|
|
||||||
<tr><td class="fieldname"><em><a class="anchor" id="ggaae05225933a42f81e7c4a9fb286596f9a71273fd07e009057e6e3475d10f8286d"></a>ALOOPER_EVENT_OUTPUT</em> </td><td class="fielddoc">
|
|
||||||
<p>The file descriptor is available for write operations. </p>
|
|
||||||
</td></tr>
|
|
||||||
<tr><td class="fieldname"><em><a class="anchor" id="ggaae05225933a42f81e7c4a9fb286596f9a14016d8f39373b8ce061276a957960f6"></a>ALOOPER_EVENT_ERROR</em> </td><td class="fielddoc">
|
|
||||||
<p>The file descriptor has encountered an error condition.</p>
|
|
||||||
<p>The looper always sends notifications about errors; it is not necessary to specify this event flag in the requested event set. </p>
|
|
||||||
</td></tr>
|
|
||||||
<tr><td class="fieldname"><em><a class="anchor" id="ggaae05225933a42f81e7c4a9fb286596f9a5e7fb5acdecef18b2c293f6309e5d4ab"></a>ALOOPER_EVENT_HANGUP</em> </td><td class="fielddoc">
|
|
||||||
<p>The file descriptor was hung up. For example, indicates that the remote end of a pipe or socket was closed.</p>
|
|
||||||
<p>The looper always sends notifications about hangups; it is not necessary to specify this event flag in the requested event set. </p>
|
|
||||||
</td></tr>
|
|
||||||
<tr><td class="fieldname"><em><a class="anchor" id="ggaae05225933a42f81e7c4a9fb286596f9aefe82c6ce8e02d13aceaebdec15c2aff"></a>ALOOPER_EVENT_INVALID</em> </td><td class="fielddoc">
|
|
||||||
<p>The file descriptor is invalid. For example, the file descriptor was closed prematurely.</p>
|
|
||||||
<p>The looper always sends notifications about invalid file descriptors; it is not necessary to specify this event flag in the requested event set. </p>
|
|
||||||
</td></tr>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<h2 class="groupheader">Function Documentation</h2>
|
|
||||||
<a class="anchor" id="gae1ad7ac48ab01a34bfd25840c92ff07b"></a>
|
|
||||||
<div class="memitem">
|
|
||||||
<div class="memproto">
|
|
||||||
<table class="memname">
|
|
||||||
<tr>
|
|
||||||
<td class="memname">void ALooper_acquire </td>
|
|
||||||
<td>(</td>
|
|
||||||
<td class="paramtype"><a class="el" href="group___looper.html#gadb10521a80138b777ba1bc2ca74d4af5">ALooper</a> * </td>
|
|
||||||
<td class="paramname"><em>looper</em></td><td>)</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div><div class="memdoc">
|
|
||||||
<p>Acquire a reference on the given ALooper object. This prevents the object from being deleted until the reference is removed. This is only needed to safely hand an ALooper from one thread to another. </p>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<a class="anchor" id="ga2668285bfadcf21ef4d371568a30be33"></a>
|
|
||||||
<div class="memitem">
|
|
||||||
<div class="memproto">
|
|
||||||
<table class="memname">
|
|
||||||
<tr>
|
|
||||||
<td class="memname">int ALooper_addFd </td>
|
|
||||||
<td>(</td>
|
|
||||||
<td class="paramtype"><a class="el" href="group___looper.html#gadb10521a80138b777ba1bc2ca74d4af5">ALooper</a> * </td>
|
|
||||||
<td class="paramname"><em>looper</em>, </td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="paramkey"></td>
|
|
||||||
<td></td>
|
|
||||||
<td class="paramtype">int </td>
|
|
||||||
<td class="paramname"><em>fd</em>, </td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="paramkey"></td>
|
|
||||||
<td></td>
|
|
||||||
<td class="paramtype">int </td>
|
|
||||||
<td class="paramname"><em>ident</em>, </td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="paramkey"></td>
|
|
||||||
<td></td>
|
|
||||||
<td class="paramtype">int </td>
|
|
||||||
<td class="paramname"><em>events</em>, </td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="paramkey"></td>
|
|
||||||
<td></td>
|
|
||||||
<td class="paramtype"><a class="el" href="group___looper.html#ga410b184b4e48302c439e36c8ce0a7a89">ALooper_callbackFunc</a> </td>
|
|
||||||
<td class="paramname"><em>callback</em>, </td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="paramkey"></td>
|
|
||||||
<td></td>
|
|
||||||
<td class="paramtype">void * </td>
|
|
||||||
<td class="paramname"><em>data</em> </td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td></td>
|
|
||||||
<td>)</td>
|
|
||||||
<td></td><td></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div><div class="memdoc">
|
|
||||||
<p>Adds a new file descriptor to be polled by the looper. If the same file descriptor was previously added, it is replaced.</p>
|
|
||||||
<p>"fd" is the file descriptor to be added. "ident" is an identifier for this event, which is returned from <a class="el" href="group___looper.html#ga2a9044602b76fef7f47c7e11a801561c">ALooper_pollOnce()</a>. The identifier must be >= 0, or ALOOPER_POLL_CALLBACK if providing a non-NULL callback. "events" are the poll events to wake up on. Typically this is ALOOPER_EVENT_INPUT. "callback" is the function to call when there is an event on the file descriptor. "data" is a private data pointer to supply to the callback.</p>
|
|
||||||
<p>There are two main uses of this function:</p>
|
|
||||||
<p>(1) If "callback" is non-NULL, then this function will be called when there is data on the file descriptor. It should execute any events it has pending, appropriately reading from the file descriptor. The 'ident' is ignored in this case.</p>
|
|
||||||
<p>(2) If "callback" is NULL, the 'ident' will be returned by ALooper_pollOnce when its file descriptor has data available, requiring the caller to take care of processing it.</p>
|
|
||||||
<p>Returns 1 if the file descriptor was added or -1 if an error occurred.</p>
|
|
||||||
<p>This method can be called on any thread. This method may block briefly if it needs to wake the poll. </p>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<a class="anchor" id="ga741ccd90a0eb9209c6bddf2326d89e4a"></a>
|
|
||||||
<div class="memitem">
|
|
||||||
<div class="memproto">
|
|
||||||
<table class="memname">
|
|
||||||
<tr>
|
|
||||||
<td class="memname"><a class="el" href="group___looper.html#gadb10521a80138b777ba1bc2ca74d4af5">ALooper</a>* ALooper_forThread </td>
|
|
||||||
<td>(</td>
|
|
||||||
<td class="paramname"></td><td>)</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div><div class="memdoc">
|
|
||||||
<p>Returns the looper associated with the calling thread, or NULL if there is not one. </p>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<a class="anchor" id="gaa7cd0636edc4ed227aadc585360ebefa"></a>
|
|
||||||
<div class="memitem">
|
|
||||||
<div class="memproto">
|
|
||||||
<table class="memname">
|
|
||||||
<tr>
|
|
||||||
<td class="memname">int ALooper_pollAll </td>
|
|
||||||
<td>(</td>
|
|
||||||
<td class="paramtype">int </td>
|
|
||||||
<td class="paramname"><em>timeoutMillis</em>, </td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="paramkey"></td>
|
|
||||||
<td></td>
|
|
||||||
<td class="paramtype">int * </td>
|
|
||||||
<td class="paramname"><em>outFd</em>, </td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="paramkey"></td>
|
|
||||||
<td></td>
|
|
||||||
<td class="paramtype">int * </td>
|
|
||||||
<td class="paramname"><em>outEvents</em>, </td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="paramkey"></td>
|
|
||||||
<td></td>
|
|
||||||
<td class="paramtype">void ** </td>
|
|
||||||
<td class="paramname"><em>outData</em> </td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td></td>
|
|
||||||
<td>)</td>
|
|
||||||
<td></td><td></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div><div class="memdoc">
|
|
||||||
<p>Like <a class="el" href="group___looper.html#ga2a9044602b76fef7f47c7e11a801561c">ALooper_pollOnce()</a>, but performs all pending callbacks until all data has been consumed or a file descriptor is available with no callback. This function will never return ALOOPER_POLL_CALLBACK. </p>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<a class="anchor" id="ga2a9044602b76fef7f47c7e11a801561c"></a>
|
|
||||||
<div class="memitem">
|
|
||||||
<div class="memproto">
|
|
||||||
<table class="memname">
|
|
||||||
<tr>
|
|
||||||
<td class="memname">int ALooper_pollOnce </td>
|
|
||||||
<td>(</td>
|
|
||||||
<td class="paramtype">int </td>
|
|
||||||
<td class="paramname"><em>timeoutMillis</em>, </td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="paramkey"></td>
|
|
||||||
<td></td>
|
|
||||||
<td class="paramtype">int * </td>
|
|
||||||
<td class="paramname"><em>outFd</em>, </td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="paramkey"></td>
|
|
||||||
<td></td>
|
|
||||||
<td class="paramtype">int * </td>
|
|
||||||
<td class="paramname"><em>outEvents</em>, </td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="paramkey"></td>
|
|
||||||
<td></td>
|
|
||||||
<td class="paramtype">void ** </td>
|
|
||||||
<td class="paramname"><em>outData</em> </td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td></td>
|
|
||||||
<td>)</td>
|
|
||||||
<td></td><td></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div><div class="memdoc">
|
|
||||||
<p>Waits for events to be available, with optional timeout in milliseconds. Invokes callbacks for all file descriptors on which an event occurred.</p>
|
|
||||||
<p>If the timeout is zero, returns immediately without blocking. If the timeout is negative, waits indefinitely until an event appears.</p>
|
|
||||||
<p>Returns ALOOPER_POLL_WAKE if the poll was awoken using wake() before the timeout expired and no callbacks were invoked and no other file descriptors were ready.</p>
|
|
||||||
<p>Returns ALOOPER_POLL_CALLBACK if one or more callbacks were invoked.</p>
|
|
||||||
<p>Returns ALOOPER_POLL_TIMEOUT if there was no data before the given timeout expired.</p>
|
|
||||||
<p>Returns ALOOPER_POLL_ERROR if an error occurred.</p>
|
|
||||||
<p>Returns a value >= 0 containing an identifier (the same identifier <code>ident</code> passed to <a class="el" href="group___looper.html#ga2668285bfadcf21ef4d371568a30be33">ALooper_addFd()</a>) if its file descriptor has data and it has no callback function (requiring the caller here to handle it). In this (and only this) case outFd, outEvents and outData will contain the poll events and data associated with the fd, otherwise they will be set to NULL.</p>
|
|
||||||
<p>This method does not return until it has finished invoking the appropriate callbacks for all file descriptors that were signalled. </p>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<a class="anchor" id="ga1a070b904dd957cc65af9eb5ef6dfa25"></a>
|
|
||||||
<div class="memitem">
|
|
||||||
<div class="memproto">
|
|
||||||
<table class="memname">
|
|
||||||
<tr>
|
|
||||||
<td class="memname"><a class="el" href="group___looper.html#gadb10521a80138b777ba1bc2ca74d4af5">ALooper</a>* ALooper_prepare </td>
|
|
||||||
<td>(</td>
|
|
||||||
<td class="paramtype">int </td>
|
|
||||||
<td class="paramname"><em>opts</em></td><td>)</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div><div class="memdoc">
|
|
||||||
<p>Prepares a looper associated with the calling thread, and returns it. If the thread already has a looper, it is returned. Otherwise, a new one is created, associated with the thread, and returned.</p>
|
|
||||||
<p>The opts may be ALOOPER_PREPARE_ALLOW_NON_CALLBACKS or 0. </p>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<a class="anchor" id="gab723c3c2ac2c66bc695913a194073727"></a>
|
|
||||||
<div class="memitem">
|
|
||||||
<div class="memproto">
|
|
||||||
<table class="memname">
|
|
||||||
<tr>
|
|
||||||
<td class="memname">void ALooper_release </td>
|
|
||||||
<td>(</td>
|
|
||||||
<td class="paramtype"><a class="el" href="group___looper.html#gadb10521a80138b777ba1bc2ca74d4af5">ALooper</a> * </td>
|
|
||||||
<td class="paramname"><em>looper</em></td><td>)</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div><div class="memdoc">
|
|
||||||
<p>Remove a reference that was previously acquired with <a class="el" href="group___looper.html#gae1ad7ac48ab01a34bfd25840c92ff07b">ALooper_acquire()</a>. </p>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<a class="anchor" id="gaf7d68ed05698b251489b4f6c8e54daad"></a>
|
|
||||||
<div class="memitem">
|
|
||||||
<div class="memproto">
|
|
||||||
<table class="memname">
|
|
||||||
<tr>
|
|
||||||
<td class="memname">int ALooper_removeFd </td>
|
|
||||||
<td>(</td>
|
|
||||||
<td class="paramtype"><a class="el" href="group___looper.html#gadb10521a80138b777ba1bc2ca74d4af5">ALooper</a> * </td>
|
|
||||||
<td class="paramname"><em>looper</em>, </td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="paramkey"></td>
|
|
||||||
<td></td>
|
|
||||||
<td class="paramtype">int </td>
|
|
||||||
<td class="paramname"><em>fd</em> </td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td></td>
|
|
||||||
<td>)</td>
|
|
||||||
<td></td><td></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div><div class="memdoc">
|
|
||||||
<p>Removes a previously added file descriptor from the looper.</p>
|
|
||||||
<p>When this method returns, it is safe to close the file descriptor since the looper will no longer have a reference to it. However, it is possible for the callback to already be running or for it to run one last time if the file descriptor was already signalled. Calling code is responsible for ensuring that this case is safely handled. For example, if the callback takes care of removing itself during its own execution either by returning 0 or by calling this method, then it can be guaranteed to not be invoked again at any later time unless registered anew.</p>
|
|
||||||
<p>Returns 1 if the file descriptor was removed, 0 if none was previously registered or -1 if an error occurred.</p>
|
|
||||||
<p>This method can be called on any thread. This method may block briefly if it needs to wake the poll. </p>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<a class="anchor" id="gab2585652f8ae2e2444979194ebe32aaf"></a>
|
|
||||||
<div class="memitem">
|
|
||||||
<div class="memproto">
|
|
||||||
<table class="memname">
|
|
||||||
<tr>
|
|
||||||
<td class="memname">void ALooper_wake </td>
|
|
||||||
<td>(</td>
|
|
||||||
<td class="paramtype"><a class="el" href="group___looper.html#gadb10521a80138b777ba1bc2ca74d4af5">ALooper</a> * </td>
|
|
||||||
<td class="paramname"><em>looper</em></td><td>)</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div><div class="memdoc">
|
|
||||||
<p>Wakes the poll asynchronously.</p>
|
|
||||||
<p>This method can be called on any thread. This method returns immediately. </p>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div><!-- contents -->
|
|
||||||