android-ndk

Low-level USB API on Android at NDK level to use on Qt Android

不问归期 提交于 2021-02-06 06:26:19
问题 I need to interact with an HID device on Android. The problem is that i'm using Qt Android, and i'm not using Java UsbManager classes. Is there any C lib which I can link against in order to communicate with an HID device on Android without having to work with the Java API? I have found this: http://source.android.com/devices/reference/bt__hh_8h_source.html Which seems to be an header that defines HID communication but I can't find the associated lib. Any ideas? Thanks in advance 回答1: I have

Type 'JNICALL' could not be resolved ,?

人走茶凉 提交于 2021-02-04 15:55:39
问题 i am trying to use the NDK in eclipse but when following a tutorial this error pops up and i do not understand where it comes from this is my .h file /* DO NOT EDIT THIS FILE - it is machine generated */ #include <jni.h> /* Header for class com_example_myproject_MainActivity */ #ifndef _Included_com_example_myproject_MainActivity #define _Included_com_example_myproject_MainActivity #ifdef __cplusplus extern "C" { #endif /* * Class: com_example_myproject_MainActivity * Method: getMyData *

Type 'JNICALL' could not be resolved ,?

夙愿已清 提交于 2021-02-04 15:55:08
问题 i am trying to use the NDK in eclipse but when following a tutorial this error pops up and i do not understand where it comes from this is my .h file /* DO NOT EDIT THIS FILE - it is machine generated */ #include <jni.h> /* Header for class com_example_myproject_MainActivity */ #ifndef _Included_com_example_myproject_MainActivity #define _Included_com_example_myproject_MainActivity #ifdef __cplusplus extern "C" { #endif /* * Class: com_example_myproject_MainActivity * Method: getMyData *

Android NDK - armeabi vs armeabi-v7a folder

倾然丶 夕夏残阳落幕 提交于 2021-01-29 19:12:23
问题 There are some questions like mine. why I need put *.so files in both armeabi-v7a and armeabi folders? Why armeabi-v7a conflicts with armeabi of another module? Why use armeabi-v7a code over armeabi code? But I am not clear yet. I have many .so files for armeabi and armeabi-v7a. // binaries armeabi/libarmeabi-v7a-module1.so armeabi/libarmeabi-v7a-module2.so // Application.mk file APP_ABI := armeabi APP_PLATFORM := android-19 APP_STL := gnustl_shared // Android.mk file include $(CLEAR_VARS)

Android NDK + Two Shared Libraries + RTTI + Dynamic cast = Impossible

心不动则不痛 提交于 2021-01-29 14:26:28
问题 I've been at this for 4 hours so far on a Sunday. I'm about to give up. I've tried literally every post I've found on the internet and this simply will..not..work! Any instance of dynamic_cast with references or pointers either returns null or flat-out crashes my program. This is absolutely 100% critical to my entire application architecture, and I may just have to go to 200 MB static libs if I can't get this going. I'm building with -frtti (there's no -fno-rtti), and linking with -Wl,-export

How to integrate libcurl in native android project and build using ndk on windows?

那年仲夏 提交于 2021-01-29 07:02:33
问题 I want to use libcurl in my native project. How can I integrate this library and build using ndk? Is there any post available that can guide me through the process? I tried the docs from official site, but that's not working. FYI I am on windows platform. 回答1: Create a JNI folder within your project and add a folder for each architecture(arm, armv7,x86 etc). Place the corresponding libcurl.so files in the respective folders. Since this is a rebuilt shared binary you need to add this to your

Mac build ffmpeg for Android

我怕爱的太早我们不能终老 提交于 2021-01-29 05:58:11
问题 I want to compile ffmpeg on my Mac. The ndk version is r19c and the FFmpeg version is 4.1.3. The build script is copied from this article. But there are some problems when compiling, as follows: Thanks!!! 回答1: Starting with NDK r19 everything you need can be found in the <NDK>/toolchains/llvm/prebuilt/<host> directory. Stripped down example for arm64-v8a targeting API 28: export ANDROID_NDK_ROOT=/path/to/android-ndk-r19c export PATH=$ANDROID_NDK_ROOT/toolchains/llvm/prebuilt/darwin-x86_64/bin

Calling java method from different thread in ndk

倖福魔咒の 提交于 2021-01-28 07:08:35
问题 I'm trying to call a java static method from a detached thread in c++ with android's NDK. So far I've : JNIEnv *env =AttachJava(); jclass cls2 = env->FindClass("com/actvt/showdown/pluggin/Utils"); // try to find the class //jmethodID mid2 = env->GetStaticMethodID(cls2, "AddSound", "(Landroid/app/Activity;Ljava/lang/String;I)V"); // find method jmethodID mid = env->GetStaticMethodID(cls2, "addFrame", "(Landroid/app/Activity;JIIII)V"); // find method jclass dataClass = env->FindClass("android

How to include/use latest version of Opus codec in Android NDK

怎甘沉沦 提交于 2021-01-28 06:24:40
问题 A complete novice question here. I am pretty familiar with programming in C/C++ on Linux environments. However, I have no experience whatsoever with Android environment, let alone when it comes to making an application with C for Android platforms. I need to use opus codec in my application but it is not present in the default libraries of Android NDK. How can I add it? Some sources on internet talk about Android.mk files. I am using the most recent version of Android Studio and there is no

Telegram can not compile with different package name

早过忘川 提交于 2021-01-28 05:23:00
问题 I have succeed compile telegram using default package. But when I rename and refactor all the package with my own package name, update jni sub module and create jni .so by following this link https://stackoverflow.com/a/34323758/7531970, use ndk 14b and put all details needed. But I still keep getting this error, please help me 08-25 23:39:55.027 26920-26959/com.sipo.messenger E/FA: Uploading is not possible. App measurement disabled 08-25 23:39:55.027 26920-26920/com.sipo.messenger D