android-ndk

SIP to SIP Call recording

▼魔方 西西 提交于 2020-01-25 03:29:29
问题 How can we record SIP to SIP call in android? how to get downlink and uplink access in android using native code? 回答1: Take a look on CSipSimple. It is an open source project that has the features you are looking for. Generally it uses a pjsip SIP stack that runs on native code. You can ask question in their mailing list. It is very active. 回答2: Assuming you wrote your own Android NDK SIP stack, recording SIP calls on Android is pretty simple. Just combine inbound and outbound audio (MUX),

Superpowered NDK Android: returning int succeeds in “extern” block, fails in called function

China☆狼群 提交于 2020-01-25 00:08:05
问题 I'm trying to figure out how to return an int to Java from a C++ function. On the Java side, I have the following in a button. I put it in a button to ensure that the app was completely loaded before attempting to execute returnInt(). int testInt; testInt = returnInt(); Log.i(TAG, "testInt"); Log.i(TAG, String.valueOf(testInt)); And private native int returnInt(); On the C++ side, returning an int in an extern block succeeds: extern "C" JNIEXPORT jint Java_com_superpowered_crossexample

visual c++ cross platform android: Include prebuilt shared library

人走茶凉 提交于 2020-01-24 19:35:47
问题 I'm using the Visual C++ Cross Platform Tools for Android as described here: https://msdn.microsoft.com/en-us/library/dn707591.aspx Everything works fine so far (I can build and run on my phone the templates under File -> New Project -> Cross Platform -> Android). However, I can't find out how to link my app to a prebuilt shared library in the form of an *.so file . So far, I tried the following steps: Step 1 To test the ability of Visual Studio to link to a prebuilt shared library, I created

OpenGL ES texture problem, 4 duplicate columns and horizontal lines (Android)

久未见 提交于 2020-01-24 19:35:09
问题 I have a buffer of RGB (or RGBA) texture image, and I want to display it on my Android device with the following code. I use OpenGL from NDK. glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 256, 256, 0, GL_RGBA, GL_UNSIGNED_BYTE, this->pBuffer); I have also set the PixelFormat from the Java side with: this.getHolder().setFormat(PixelFormat.RGBA_8888); this.setEGLConfigChooser(8, 8, 8, 8, 0, 0); setRenderer(new MyRenderer()); The image is displayed but there are four columns (identical and contains

Android Studio: clang error: unknown argument: '-mandroid'

匆匆过客 提交于 2020-01-24 15:09:06
问题 I am trying to build a project with NDK and cannot get rid of this error. I searched all over the google but a similiar error is only there for Xamarin. I am using Android Studio. The error is all about: FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':chessClass:externalNativeBuildDebug'. > Build command failed. Error while executing process C:\Users\Murat\AppData\Local\Android\sdk\ndk-bundle\ndk-build.cmd with arguments {NDK_PROJECT_PATH=null APP_BUILD

Turn on compiler optimization for Android Studio debug build via Cmake

岁酱吖の 提交于 2020-01-24 13:07:25
问题 I am using Android Studio 3.0 for my NDK based app. For the C++ code, I use CMake as the external builder. This works well, I can create debug and release binaries. However, I would like to turn on compiler optimizations (say -O3) for a part of the C++ code (the physics engine), not just for the release build, but also for the debug build. So create the bulk of the debug build as is, without optimizing, yet, I want one of the static library targets to be built with the compiler optimization

Turn on compiler optimization for Android Studio debug build via Cmake

假装没事ソ 提交于 2020-01-24 13:07:07
问题 I am using Android Studio 3.0 for my NDK based app. For the C++ code, I use CMake as the external builder. This works well, I can create debug and release binaries. However, I would like to turn on compiler optimizations (say -O3) for a part of the C++ code (the physics engine), not just for the release build, but also for the debug build. So create the bulk of the debug build as is, without optimizing, yet, I want one of the static library targets to be built with the compiler optimization

java.lang.UnsatisfiedLinkError: dlopen failed:

巧了我就是萌 提交于 2020-01-24 11:53:47
问题 I am facing the issue while I am adding the .so file in my project, from the other ans, I have tried with different solutions but not any solution help me out. case: 1 I had tried to put my .so in src/main/jniLibs and in the gradle file I had added below lines, but getting the same error. android { sourceSets.main.jni.srcDirs = [] } case:2 I had added cpp folder with native-lib.cpp and in gradle added below code: defaultConfig { ndk { abiFilters "armeabi", "armeabi-v7a", "x86", "mips" } }

No Implementation found for native in ndk

若如初见. 提交于 2020-01-24 11:29:05
问题 I am struck with an error, using the jni ... I have a simple native method in android activity class and created header for that and implemented the c file for that...unable to find the mistake pls help Here are the files that I have Activity static{ System.loadLibrary("fluidsynth"); } private native String textOverjni(); Header file /* DO NOT EDIT THIS FILE - it is machine generated */ #include <jni.h> /* Header for class com_example_fluidsynthtest_MyFluidSynthO */ #ifndef _Included_com

Using Pre-built Shared Library in Android Studio

让人想犯罪 __ 提交于 2020-01-24 00:44:12
问题 I need to use a custom prebuilt shared library (built on standalone ndk as libdynamic.so) in my android project. I created a folder "jniLibs" in path src/main and then 4 folders inside that namely "armeabi" "armeabi-v7a" "x86" "x86_64". I have put the prebuilt library inside all these 4 folders. Now from my native code I want to call a function of this library. In the following way (included header in cmakelists.txt): extern "C" JNIEXPORT jstring JNICALL Java_demo_co_ru_jnilibtest