Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hello-jni: add README and packaging metadata #2

Merged
merged 2 commits into from
Jun 15, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions hello-jni/.google/packaging.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
status: PUBLISHED
technologies: [Android, NDK]
categories: [Getting Started, Native]
languages: [C++, Java]
solutions: [Mobile]
github: googlesamples/android-ndk
level: BEGINNER
icon: hello-jni/screenshot.png
license: apache2
59 changes: 59 additions & 0 deletions hello-jni/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
Hello JNI
=========
This sample shows how to call Native C++ code from a Android Java Activity using JNI. Note this requires a preview build of Android Studio and the experimental version Android Gradle plugin, see the [Pre-requisites](#pre-requisites) and [Getting Started](#getting-started) instructions.

Pre-requisites
--------------

- [Android NDK](https://developer.android.com/ndk/)
- Android Studio 1.3 Preview from the [canary channel](http://tools.android.com/download/studio/canary)
- Experimental version of Android Plugin for Gradle [build from sources](http://tools.android.com/build/gradleplugin).

Getting Started
---------------

1. [Download](http://tools.android.com/download/studio/canary) or [switch](http://tools.android.com/download/studio/canary) to Android Studio canary channel.
1. Follow [instructions](http://tools.android.com/build/gradleplugin) to build the experimental version of the Android Plugin for Gradle.
1. Launch Android Studio.
1. Open `android-ndk/hello-jni` sample.
1. Open *File/Project Structure...*
1. Click *Download* or *Select NDK location*.
1. Click *Tools/Android/Sync Project with Gradle Files*.
1. Click *Run/Run 'app'*.

Screenshots
-----------

![screenshot](screenshot.png)

Support
-------

If you've found an error in these samples, please [file an issue](https://github.com/googlesamples/android-ndk/issues/new).

Patches are encouraged, and may be submitted by [forking this project](https://github.com/googlesamples/android-ndk/fork) and
submitting a pull request through GitHub. Please see [CONTRIBUTING.md](CONTRIBUTING.md) for more details.

- [Stack Overflow](http://stackoverflow.com/questions/tagged/android-ndk)
- [Google+ Community](https://plus.google.com/communities/105153134372062985968)
- [Android Tools Feedbacks](http://tools.android.com/feedback)

License
-------

Copyright 2015 Google, Inc.

Licensed to the Apache Software Foundation (ASF) under one or more contributor
license agreements. See the NOTICE file distributed with this work for
additional information regarding copyright ownership. The ASF licenses this
file to you under the Apache License, Version 2.0 (the "License"); you may not
use this file except in compliance with the License. You may obtain a copy of
the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations under
the License.
Binary file added hello-jni/screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.