Commit Graph

22 Commits

Author SHA1 Message Date
Andrew Hsieh
4ba2dd5080 Fix warning compiling samples with clang3.1
Change-Id: I166cc64d34dcf8dd99fc28f2556306b8795e3c7e
2012-12-06 18:10:46 +08:00
Andrew Hsieh
1513e9eab2 Fixed wrong package names in samples hello-jni and two-libs
Fixed package names so tests project underneath can compile

Change-Id: Ia4e58e8caa5db65e05fdb2ec64e52c1564774899
2012-06-27 11:29:31 -07:00
Andrew Hsieh
a79e56e2f8 Fixed inconsistent minSdkVersion and target= in NDK samples
Also removed Dummy.java and auto-gen files
Inspired by http://code.google.com/p/android/issues/detail?id=20017
2012-04-02 15:00:03 +08:00
David 'Digit' Turner
f4790e6f9e Separate platform files and samples by API level.
Remove all duplicate platform files, i.e development/ndk/platforms/android-N now
only contains files that are introduced in API level 'N' and not found in level 'N-1'

(This makes it easier to manage independent platform release branches, and makes
 platform additions trivial to examine and maintain).

Move samples that depends on features of API level 'N' into platforms/android-N/samples

+ update tests/run-all.sh accordingly

Change-Id: I04c4c67c6c674c1714d5812d461d0524a4f4cfd9
2010-07-29 18:07:56 -07:00
David 'Digit' Turner
ad77ed7d47 ndk: fix samples compilation
Change-Id: I3e0f88f823c891cea5ca3f82f7c3a6284295425c
2010-07-17 09:00:01 -07:00
Dianne Hackborn
e551875b2d Update NDK for pre-key-dispatching changes.
The same code now calls the appropriate function as part of
its key processing.

Change-Id: Ie6fbcd802b098b85d8113fe0a49473134721009b
2010-07-15 22:21:04 -07:00
David 'Digit' Turner
4948c16366 Remove prebuilt static library "libthreaded_app.a".
Make the "glue library" part of the NDK as an importable module,
this has several benefits:

- no need to distribute a binary here with no easy way to regenerate it

- no need to explicitely list -lthreaded_app in your LOCAL_LDLIBS
  (this is handled automatically by the module import capability)

- allows easier native debugging of what's really happening.

Note that the header is renamed <threaded_native_app.h>

+ Modify the native-activity sample to use and import the new module
+ Start documenting usage in the header file. We probably need something
  better, and will probably put it under development/ndk/docs/ at some
  point.

After this patch, we should be able to get rid of the code under
framework/base/native/{include.glue}

Change-Id: I6e81d70a225a6ca006beabf6e8b42529e8f371b9
2010-07-13 23:50:02 -07:00
Dianne Hackborn
98b2c359c2 Copy over updated NDK APIs and follow other API changes.
Change-Id: Ifec95268c9ade21963eea13357ec2f56fd7968c2
2010-07-13 18:45:52 -07:00
David 'Digit' Turner
5ef6b2f256 ndk sample hello-neon: use $(call import-module) to access the 'cpufeatures' library
Change-Id: I29397158de0ccdd89dfe4da72a544fad14a8324e
2010-07-13 15:51:46 -07:00
Dianne Hackborn
29534f6275 Update for improved glue.
Change-Id: I73bb23644523e8ec19c51a3e3b9c5c4f7a98c558
2010-07-09 18:21:45 -07:00
Dianne Hackborn
1aa3218800 Add new native-plasma sample code.
This shows direct drawing to an ANativeWindow's bits.

Update the NDK API, and fix a bug in the native-activity app where it
would hang while exiting.

Change-Id: I4fa98d083405eb0d1b22b10a73a2ef18d45fdb59
2010-07-09 16:58:52 -07:00
Dianne Hackborn
11a89ea0bd Update native_activity sample to use new glue code.
The native_activity sample is now built with the new threaded_app
glue code, removing all of the boiler-plate code from it.  This
adds the glue code (header and .a) to the NDK.

Change-Id: I2a7be473811f22f948dcda3da8034dd0bd62049d
2010-07-08 12:23:58 -07:00
Dianne Hackborn
02215b36dd Update to use new looper API.
Also need to put back the stub Java class for now, as the
build system still seems to require it.

Change-Id: I31917a1fc7c0bf8cd928969125f94d55c59d42f8
2010-07-02 18:54:33 -07:00
Dianne Hackborn
2c5db16ba9 Merge "Stub code no longer needed." into gingerbread 2010-07-01 19:34:50 -07:00
Dianne Hackborn
a32bac113f Stub code no longer needed.
Change-Id: I985acdba1dd1c0acf00d88d2851b5f604475bf4c
2010-07-01 19:27:06 -07:00
Dianne Hackborn
2b352d76d8 Native activity now draws!
Very simple and dumb, but we now get touch events and fill the
window with a color (using OpenGL) based on its location.

Change-Id: I6657d2bb013570238bc0fe639f33c59f1ab68872
2010-07-01 19:20:44 -07:00
Dianne Hackborn
88510488e9 Update native_activity sample code to use ANativeWindow.
We now get the native window to the engine, all ready for something
to be done with it.

Change-Id: Ie4537e505cdf8a2fffc28de82b7e3cda448fde41
2010-07-01 13:38:58 -07:00
Dianne Hackborn
bbdfd7c347 Update to new native activity APIs.
Change-Id: Id2a32fd0ed0de39b2f266216d5b3d903156fb761
2010-06-28 23:37:49 -07:00
Dianne Hackborn
5468d76871 Update native APIs for events.
Copy current native event APIs over; start updating
sample code to use them.

The native activity sample is now much more real, creating
its own worker thread, which now monitors and prints any
incoming input events.

Note that due to the lack of default key handling, pressing
back no longer works!  Will be fixed in a bit.  This code
also needs to be refactored to put the engine part into
a separate source file.

Change-Id: I2ab3e6d9f840b99ec9a05bbc0d2cd9314beb23d7
2010-06-21 18:07:58 -07:00
David 'Digit' Turner
fcefaf88ab Add a sample to demonstrate module exports in the NDK.
+ add .gitignore

Change-Id: Ifa160316e37cf201099ab0d8d89fdd375ee3eb59
2010-06-10 16:56:16 -07:00
David 'Digit' Turner
d616e8b214 Fix build
Also remove unwanted binary files here

Change-Id: I1b52abbbfd3f67670fb5977f5430a1bb4dac22bb
2010-06-09 17:46:46 -07:00
David 'Digit' Turner
c817c5210e Copy platforms and samples from ndk/ source tree.
The idea is to allow developing the NDK in the open, while
having the platforms and samples under a private branch until
the corresponding release are open-sourced.

Change-Id: Iee995fb6c4d3ee1387dea7486e599e079c9e4c6d
2010-06-09 17:02:09 -07:00