Tag: android-ndk

Fractal Applications on Android

What is the best way to generate fractal curves on android? Should I use NDK? and if not What is the right class to extend View or SurfaceView I’ve generated two fractals extending View and overriding onDraw(), when the iteration count is big and curve ratio is too small, generation is too slow

How to apply video filtering in android?

I am working on app like instagram where i have to apply filters on already created video and stored it in SDCard. I have searched a lot but at the end of day i find one library named FFMPEG but didn’t get any help. I am newbie in video filtering. and I have setup NDK […]

Which Android devices support jni?

I have developed an Android application which uses JNI (java native interface) for Archos 43. Had no problems and i was able to run the application smoothly. Later I tried to run the same application on Samsung I9100G Galaxy S II as well as Samsung I9100 Galaxy S II. I was able to run the […]

Android: Getting random number from JNI method

I am creating a demo of math operation like addition, subtraction, multiplication and division using NDK. I am able to make the library and getting the response from the native code but result is not proper I mean it is random static value. Calculator.c class #include <stdio.h> #include <jni.h> jint Java_com_example_jni_calculator_Calculator_add(JNIEnv* env, jint a, jint […]

Replacing the standard Android H264 software encoder with an ffmpeg based one

In Android ICS and later, a new OpenMax IL API version is in use, making old binary blobs useless/unused. This leads to older devices that otherwise run ICS just fine and dandy to have broken video playback (YouTube HQ and IMBD, for example) because Androids fallback software decoder sucks when compared to what ffmpeg can […]

NDK build error on android studio

I am new to NDK so i am getting error while building the project below : Error:Execution failed for task ‘:app:transformNativeLibsWithStripDebugSymbolForDebug’. java.io.IOException: Failed to delete E:\startUpCode\OpenCvDemo\NDKTest\app\build\intermediates\transforms\stripDebugSymbol\debug\folders\2000\1f\main\lib\mips this is my cpp code #include <com_nickworld_ndktest_NativeClass.h> JNIEXPORT jstring JNICALL Java_com_nickworld_ndktest_NativeClass_getMessageFromJNI (JNIEnv *env, jclass obj){ return env->NewStringUTF(“This is the message from JNI”); android.mk file LOCAL_PATH := $(call my-dir) include […]

Using libusb on Android without rooting

I am trying to communicate with USB device from Android-based smartphone via OTG. I was able to communicate with my device using Android USB Host API. The problem of USB Host API solution is performance (single bulk transfer bounded by 16384 bytes). The libusb can perform larger requests and now I am trying to integrate […]

How to set ANDROID_NDK_HOME so that Android Studio does not ask for ndk location?

My ndk is located at C:\Users\X\AppData\Local\Android\ndk. Now each time I create a new native android project and try to import into Android Studio, it asks me for the location of ndk. I can manually set the ndk in local.properties also. But I am looking for a way to set this ndk path, so that Android […]

How to write an Android application to do sysfs read/write.?

I want to write an Android application with UI Button Read/Write that does sysfs read or sysfs write. I found the below example code for java.io.RandomAccessFile. package com.tutorialspoint; import java.io.*; public class RandomAccessFileDemo { public static void main(String[] args) { try { // create a new RandomAccessFile with filename test RandomAccessFile raf = new RandomAccessFile(“c:/test.txt”, […]

Running ffmpeg as library in android

I’ve got a simple task to do. I need to merge set of pictures into a video using ffmpeg working in android environment. After over a week fighting with different tutorials and examples explaining how to run compile ffmpeg I have, let’s say, middle success. I’ve finally compiled ffmpeg for android. I followed this example: […]

Android Babe is a Google Android Fan, All about Android Phones, Android Wear, Android Dev and Android Games Apps and so on.