Coder Social home page Coder Social logo

cqgiser / ndk-samples Goto Github PK

View Code? Open in Web Editor NEW

This project forked from android/ndk-samples

0.0 0.0 0.0 52.65 MB

Android NDK samples with Android Studio

Home Page: http://developer.android.com/ndk

License: Apache License 2.0

Shell 0.01% C++ 78.03% C 16.91% Java 3.60% Kotlin 0.29% Makefile 0.03% CMake 0.67% GLSL 0.47%

ndk-samples's Introduction

Android NDK Samples

build

This repository contains sample apps that use the Android NDK.

For an explanation of the layout of this repository, see ARCHITECTURE.md.

Build and run

  1. Clone the repository
  2. Open the whole project in Android Studio
  3. Select the sample you want to run in the top bar (you may need to sync gradle first)
  4. Click the play button to run the sample

You can also build the samples from the command line if you prefer. Use ./gradlew build to build everything (if you're on Windows, use .\gradlew.bat instead of ./gradlew). For individual tasks, see ./gradlew tasks. To see the tasks for an individual sample, run the tasks task for that directory. For example, ./gradlew :camera:basic:tasks will show the tasks for the camera/basic app.

I just want something to copy from as a starting point

The samples in this repository are generally not a good starting point for a production quality app. They aim to demonstrate individual NDK APIs, but often make sacrifices to be succinct that make them unsuitable for a production app. This is gradually changing, but for now you should not do this.

Now in Android is an excellent resource for production quality apps in general, but does not touch on NDK- specific issues. https://github.com/DanAlbert/ndk-app-template can help some with that until this repository is able to.

You're most likely best served by using the New Project wizard in Android Studio to create a new app, then using those resources and the samples here as a reference. Android Studio's "Native C++" template is a good starting point for typical applications that need to use some C++ via JNI. The "Game Activity" template is a good starting point for game-like apps (that is, apps that do not use the Android UI, but instead render their own UI using OpenGL or Vulkan).

Additional documentation

Support

If you've found an issue with a sample and you know how to fix it, please send us a PR!.

If you need to report a bug, where it needs to be filed depends on the type of issue:

For questions about using the NDK or the platform APIs, you can ask on:

Additional NDK samples:

License

Copyright 2018 The Android Open Source Project, 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

https://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.

LICENSE

ndk-samples's People

Contributors

ggfan avatar proppy avatar danalbert avatar jfgoog avatar digit-android avatar hak avatar claywilkinson avatar enh-google avatar dturner avatar marcone avatar critsec avatar atneya avatar gkasten avatar ph0b avatar joe-skb7 avatar nisrulz avatar kottsone avatar fmayer avatar miaowang14 avatar brianpl avatar dimitry- avatar adithya321 avatar rcgonzalezf avatar tjohns avatar emrekultursay avatar yaraki avatar qchong avatar devdengchao avatar bradleybauer avatar sistr22 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.