android-ndk

Is there any local notification in Android?

别来无恙 提交于 2020-01-03 04:25:12
问题 In my application I want to use the Local Notification. I don't know is there any local notification available in Android or not. If yes then please give me any sample example to implement it. Thanks. 回答1: Android doesn't really have a distinction between remote (push in Apple terms) and local notifications. You don't get a box pop up or any UI at all for free with Android's C2DM. I think you just want to look at: http://developer.android.com/guide/topics/ui/notifiers/notifications.html http:

android load library failed

荒凉一梦 提交于 2020-01-03 04:25:08
问题 When I use System.loadLibrary() to load my so file, rarely, it fails and the Logcat says Cannot load library: reloc_library[1286]: 121 cannot locate '__cxa_atexit' java.lang.UnsatisfiedLinkError: Cannot load library: reloc_library[1285]: 169 cannot locate '__cxa_atexit'... at java.lang.Runtime.loadLibrary(Runtime.java:370) at java.lang.System.loadLibrary(System.java:535) After searching the Internet, I don't find any infomation about cannot locate '__cxa_atexit' (especially the key word __cxa

Access the current android activity

时光毁灭记忆、已成空白 提交于 2020-01-03 04:09:06
问题 How can I access the current Android activity class? I am using the necessitas framework (QT in Android). Basically, using the Android NDK an activity calls a QT application (.so). All runs fine. Now I am working on some bindings to access the GPS from the QT application. From some java examples that access the GPS I saw that the most vital part is to allow access to the GPS service: LocationManager lm; lm = (LocationManager) getSystemService(LOCATION_SERVICE); Here getSystemService is a

Execute a command with superuser permission in JNI method in Android

Deadly 提交于 2020-01-03 03:28:43
问题 In Java, I can have something like this: Process p = Runtime.getRuntime().exec("su"); DataOutputStream pOut = new DataOutputStream(p.getOutputStream()); pOut.writeBytes("find / -perm -2000 -o -perm -4000\n"); pOut.writeBytes("ps\n"); pOut.writeBytes("ls\n"); pOut.writeBytes("exit\n"); pOut.flush(); p.waitFor(); I know that to execute the find command in JNI method, we can use system or popen function. But I don't know how to execute it with su privilege? PS: Since the system function forks a

opencv implementation with with custom layout (on SurfaceView)

早过忘川 提交于 2020-01-03 03:14:09
问题 I have an openCV application program working, but need to add buttons etc. to the layout. So basically I want to display the opencv camera view on a surfaceView and the add the other stuff underneath. I've been searching the internet and forums for a while, only seeing the guy with a opencv facial detection application also wanting to add a custom layout... no solution. I am really desperate for a solution so would hugely appreciate help. For this purpose I used the OpenCV sample 3

Android 6.0 USB Mass Storage

限于喜欢 提交于 2020-01-03 03:03:17
问题 USB mass storage is now officially supported by Android, exclusively through the Storage Access Framework. It does not seem to mount the storage in a typical sense, as far as I can tell the only way to access the data is through the Document API and ContentResolver . 1) Is there no longer a simple File way to access the storage after going through the SAF? 2) If not, what's the best way to interact with 'files' on USB storage in NDK if we don't have access to paths. 回答1: There are a lot of

Define a symbol for an assembly (.s) source file in Android.mk?

半世苍凉 提交于 2020-01-03 01:51:09
问题 Is there a simple way to define a symbol for the Android NDK toolchain's assembler from the Android.mk file? My objective is to be able to build a native library made up from several .C and .s (assembler) files compiled and tuned for either ARMV6 or ARMV7A EABIS, with all the required conditional compilation driven by simply modifying the APP_ABI value on the Application.mk file. First I have succesfully used the ifeq() directives available in Android.mk to query the value of the APP_ABI

Beginner help with NDK, java.lang.UnsatisfiedLinkError

牧云@^-^@ 提交于 2020-01-02 23:08:12
问题 I am trying to create my first Android app that uses the NDK. I am trying to use the live555.com sources to build an app that streams a MP4 file from the phone to somewhere else. I am using Windows 7 32 bit with JDK 1.6.0_24, MOTODev 2.1 and latest Android SDK and NDK toolkits. So far I have setup a new project and created the jni directory. Inside JNI I have placed the source files and Android.mk files. If I execute ndk-build I see: $ $NDK/ndk-build SharedLibrary : libtestProgs.so Install :

Compiling FFmpeg : libx264 not found

一曲冷凌霜 提交于 2020-01-02 23:04:37
问题 I hope some one helps me the solve this problems. I was trying to compile FFmpeg 2.2.3 library under ubuntu 12.04LTS for android using android ndk r10e by following this tutorials: Tutorial1 Tutorial2 here is my build_android.sh file: #!/bin/bash NDK=/home/rango/Desktop/android-ndk-r10e SYSROOT=$NDK/platforms/android-19/arch-arm/ TOOLCHAIN=$NDK/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86 #ADDI_LDFLAGS="-L /usr/local/lib" #ADDI_CFLAGS="-I /usr/include" function build_one { .

Is it possible in Android Studio to build a native module with .so as output

╄→尐↘猪︶ㄣ 提交于 2020-01-02 20:11:10
问题 I have several c++ projects which I currently build using Android.mk files and ndk-build. Since this is not really great to debug I want to include this c++ projects as modules inside my android studio project. This android studio project is currently an android java library which uses the .so from the ndk-build. I got debugging to work by creating a new android library module and importing the c++ code, setting header and library paths. This module looks like this: apply plugin: 'com.android