Menu
  • HOME
  • TAGS

Android Bitmap - What is nativeBitmap?

android,bitmap,native

In the Android frameworks, a long member called native anything is usually a platform pointer (a C/C++ pointer) stored in an integer. The bitmap object is allocated in native (C/C++) code, and the pointer to that object is stored on the Java object as a long. They use a long...

Several AppDomains and native code

c#,.net,multithreading,native,appdomain

Yes it can be done but you should seriously measure if effort is repaid by benefits. Windows won't load multiple copies of an unmanaged DLL and unmanaged DLLs are loaded per-process (not per AppDomain). What you can do is to create multiple temporary copies of same DLL then load them...

How to Map Native Query result to java Class

java,mysql,hibernate,jpa,native

@Entity(name = "tb_practice") public class Practice { @Id @GeneratedValue(strategy = GenerationType.AUTO) private long id; private String address; private String city; private String distance; } Because Native Query can be Map to only @Entity....

More heaps found in each dump, where do they come from?

c++,heap,native,windbg

If you are able to do live debugging, you can try to set a break: bp ntdll!RtlCreateHeap "kc;gc" will display the call stack and continue. Maybe you see the culprit. Do also the same with ntdll!RtlDebugCreateHeap...

iOS - Return to Safari from Native App without Opening New Tab

ios,tabs,safari,native

There is a way to accomplish what you want using standard iOS APIs. No need to use external components. You control your webpage and your app, so you know the exact URL that has the link to your app. These are the steps: 1) In your app, define a custom...

Hibernate: How does native identifier generation strategy work

mysql,hibernate,primary-key,generator,native

Hibernate when selecting the key generation mechanism in native mode, will try to choose the best mechanism available in the database. In the case of MySQL, auto increment is available and Hibernate uses it instead of a sequence, because the auto increment mechanism is slightly better altough sequences also work...

Should if(a&&b) take more time than if(a) if(b)?

java,c#,native

There are two methods to answer such a question precisely: 1.) Look at the IL code (and/or) aassembly code produce and count the CPU cycles needed to execute this code (Hint: this is not for beginners) 2.) Build a small test programm which executes both variants a large number of...

libnet.h no such file or directory when building dsploit

android,ubuntu,native

From the source repository, it seems that the arpspoof Makefile does not look for libnet from the system. Instead, the dSploit repository includes libnet as a Git submodule. Did you clone recursively? (git clone --recursive ...). If you did not, change to the dSploit directory and run: git submodule update...

Append String to native Java array

java,arrays,string,append,native

You can do it in three lines, but the overall efficiency is going to be the same: String[] a = new String[] {"quick", "brown", "fox"}; List<String> s = new ArrayList<String>(Arrays.asList(a)); s.add("jumps"); a = s.toArray(new String[s.size()]); System.out.println(Arrays.toString(a)); Demo. However, the best approach when you need expandability of your container is to...

In Android Native app failed to create a client socket. Error code:14 Unable to create socket: Permission denied

java,android,sockets,jni,native

should have added "android.permission.INTERNET" and "android.permission.ACCESS_NETWORK_STATE" android permissions in the AndroidManifest.xml. <uses-permission android:name="android.permission.INTERNET"></uses-permission> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"></uses-permission> ...

Golang custom sort is faster than native sort

sorting,go,native,qsort

The difference seems to largely be due to the fact that your Quicksort uses builtins. It slices and uses len. Keep in mind that sort.Sort takes in a sort.Interface. So every time you call len it calls slice.Len and every time you do array[i],array[j] = array[j],array[i] it has to call...

Sliding accordion with pure JS and for loop

javascript,css,css3,accordion,native

There are a couple of issues at play here. As previous commenters noted, you are not properly looping over each of the sections within your accordion. After fixing that, you will also need to address the fact that your onClick handler will not work correctly. The problem with looping over...

How to add an exe path to the windows registry, to get executed on the native mode?

windows,registry,native

I believe you're thinking of the BootExecute value, located in this key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager This is a REG_MULTI_SZ value, i.e., it contains multiple strings. Each string contains an arbitrary identifier, the name of the executable to run, and the arguments to pass to the executable. For example, the default setting...

Gradle C/Native Plugin: Directory Structure, Platforms and Flavors

c,gradle,native

The convention for native binaries in Gradle is to put headers in src/{componentName}/headers and C source files in src/{componentName}/c, where componentName would be whatever you name the component (given the question, I'm guessing that would be helloworld, but it depends on how you declare it). Flavors are for different variants...

Simple convert C++/CLI int^ to unmanaged int*

c++-cli,native,managed

Here is how you implement an output parameter in C++/CLI, like C#'s void func(out int x). Note that there is no int^. void Open([OutAttribute] int% retval) { int result; if (!UnmanagedOpen(&result)) throw gcnew Exception("Open failed!"); retval = result; } Note that it is probably even better to simply return the...

Is indexeddb native supported on safari 7.1?

javascript,safari,native,indexeddb

According to the current update in http://caniuse.com/indexeddb the IndexedDB should be supported in Safari 8.0, so it is definitive a good choice to go with IndexedDB instead of WebSQL, currently i am using https://github.com/axemclion/IndexedDBShim to fill the gap for Safari and Android Browsers.

Network connectivity check in blackberry cascades 10

c++,networking,blackberry,native,blackberry-cascades

You can use QNetworkConfigurationManager.isOnline(). QNetworkConfigurationManager mgr; mgr.isOnline(); If you want to get notified about changes of the online state then you also can connect to the QNetworkConfigurationManager::onlineStateChanged(bool isOnline) signal. connect(mgr, SIGNAL(onlineStateChanged(bool)), this, SLOT(onOnlineStateChanged(bool))); ...

How can I make a carousel?

java,android,native,carousel

You are looking for ViewPager. I don't know where you found these tutorials that lead you to believe that the interactions would appear that the pages are not interconnected. You can find a good tutorial and demo transitions on the official documentation: http://developer.android.com/training/animation/screen-slide.html Additionally, if you also want the indicators...

My Android Game is Crashing (Unfortunately stopped)

android,eclipse,exception,native

launcher activity declare like this in ur manifest.xml. (launcher acticity is a starting activity of application) <activity android:name="packagename.LauncherActivityName" android:label="@string/app_name"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> other classes declare like this <activity android:name="packagename.OtherActivityName" android:label="@string/app_name" >...

How do I understand and fix error while compiling Linux kernel for embedded system

c,linux-kernel,make,arm,native

As requested: This was a known problem. A patch exists (see for example here)...

Compiling java source code to native exe

java,c++,object,native

The only to-native-code Java compiler that I'm aware of is The GNU Compiler for the Javatm Programming Language. But it's extremely unlikely you really need a to-native-code compiler. Packers like the ones you've dismissed can make your program entirely self contained, including installing a private JVM, seamlessly. I strongly recommend...

Wrap 32-bit native DLL in .NET DLL to use in 64-bit .NET application

c#,.net,dll,64bit,native

No, this will not work. If you compile an AnyCPU assembly that depends on a 32-bit native DLL then it will throw an exception if you attempt to load it in x64 mode. This is no different to the case where you compile your own application as AnyCPU and attempt...

Pros/cons of Kendo UI Mobile vs PhoneGap vs Native for a corporate mobile app

web-applications,cordova,kendo-ui,native,mobile-application

Kendo is a great framework to go with for your mobile or web application.The support provided is great and you can achive native like feel with kendo UI.I'll leave you a link to the mobile app developed using kendo https://play.google.com/store/apps/details?id=com.payoda.Insurance this app has been released in IOS,android and windows store....

native GWT : calling java method from native js

java,javascript,gwt,native

Its working fine for me after doing some of the changes. remove all children[0].children[0] remove $entry() complete code: public static native String initiateFilesInput(Element fileUpload, UploadItemWidget imagesPanel)/*-{ fileUpload.addEventListener("change", fileUpload.addEventListener( "change", function(e) { showThumbnail(fileUpload.files, imagesPanel); }, false)); function showThumbnail(files, imagesPanel) { for ( var i = 0; i < files.length; i++) {...

Why is Object.clone() native in Java?

java,object,clone,native

Basically, because the clone() method does something that you cannot do in the Java language: it clones the state the of the object, including its actual class designation. The cloning mechanism in Java is based on each class calling the superclass's clone method, all the way up to Object. Object...

What does those android syntax mean in android development? [closed]

java,android,xml,native

1 and 4 fill_parent is just a deprecated version of match_parent. match_parent is the new way so you should always use match_parent instead of fill_parent. 2 and 3 layout_weight is used in addition to something like layout_width="0dp". For example, say you have 3 items in a horizontal linearlayout, if you...

keyboard is not responding at boot time?

c++,keyboard,native,boot,defragmentation

Finally , i got the solution.Problem was regarding type of keyboard you are using i.e, PS2 or USB. you need to get all of the instances of the keyboard interface and read from all the keyboards simultaneously.As there exists port for the PS2 keyboard on motherboard,it gets priority at the...

Run Php website native on Ipad

php,ipad,website,native

Though you could use Kodiak (http://www.becomekodiak.com/kodiak-php.html), I would still go with an HTML5 / javascript app because you get the advantage of being able to run both in the browser and on the iPad. You could have a manifest file which would let the browser know what to cache, you...

What's the best practice when populating a sqlite database with default data?

java,android,database,sqlite,native

The simplest solution is to use SQLiteAssetHelper. You basically drop your SQLite database into your project's assets/ directory, and use SQLiteAssetHelper in lieu of SQLiteOpenHelper. In addition to the sample code up on Jeff Gilfelt's GitHub repo for the library, I have a sample app demonstrating it as well.

Android backbutton override issue in 4.4.2

android,override,native,back-button

hi why dont you use onBackPressed() @Override public void onBackPressed() { super.onBackPressed(); } Try this. and let me know the feedback's....

Updating AIR application with embedded runtime?

actionscript-3,flash,air,native

Try this: https://code.google.com/p/nativeapplicationupdater/ Or, if you only need to update some content that is used by the app, you can just have your app download it using URLLoader and store it using File, say to File.applicationStorageDirectory. ...

Deploying ARMv7 compiled code gets INSTALL_FAILED_CPU_ABI_INCOMPATIBLE

android,jni,arm,native

So, by looking trough the NDK documentation I found this interesting hint (look inside the NDK folder in docs/Programmers_Guide/html/md_3__key__topics__c_p_u__support__chapter_1-section_8__a_b_is.html): put your library inside assets folder at runtime detect the cpu architecture using this java call: String arch = System.getProperty("os.arch"); If the result is something like "armv71" copy the lib from...

Multiple JNI Layer in the same SO File.

jni,native

I am not sure exactly what you mean by multiple JNI layers. It sounds like you are asking if you can run javah against two distinct java files and create a single JNI library based on native methods contained in those two files? Absolutely. Simply compile and link each file...

Native Interface for J2Me device Codename One

java-me,native,codenameone

Don't add the jar, it will get packaged into the final build. Try setting the build argument j2me.ashaNative=true. ...

Gradle C (native) task output file/files (to be used in other tasks/projects)

c++,c,gradle,native

It seems that the libraries are always created under the same location - see here for the details - You need to hardcode only part of the path. Unfortunately I haven't tested it - don't know how, to be honest. EDIT Below you can find a sample script (created after...

Use JS appendChild on a GWT Element

javascript,gwt,native,jsni

The problem is a simple typo: div.innerHtml = "hey do you see me"; should be div.innerHTML = "hey do you see me"; See here...

Android 5.0 ART native DeleteGlobalReference(jobject) is failing

java,android,android-ndk,native,android-runtime

You shouldn't call DeleteGlobalRef on a local ref - only on the actual jobject pointers that you've got returned from NewGlobalRef. So in this case, as long as you aren't calling NewGlobalRef, you don't need to call DeleteGlobalRef either. You only need to use NewGlobalRef if you store a reference...

Android OpenGL ES 2.0 w/ Native Code Outputs Black Screen

android,c,opengl-es,native

I was multiplying a matrix with another in the wrong order, as is tradition

use Pointer address in Java using Bridj and JNAerator

java,c,native,jna,jnaerator

I finnaly found a fix this way, and still don't know why the first one doesn't work: val data2 = Pointer.pointerToPointer(data); ret = Netfilter_queueLibrary.nfq_get_payload(tb, data2) if (ret >= 0) { println(String.format(" payload_len=%d ", ret)); println("data: "); for (i <- 0 until ret) { printf("%02x", (data2.get().getBytes(ret)(i))); } hope it will help...

Why doesn't java's -verbose:class argument include jre inherent native classes?

java,class,jvm,classloader,native

These clasess are pre-loaded using an optimized code path which circumvents almost all the standard classloading mechanisms and verifications. That's why you don't see them. Basically, one cannot distinguish the loading of such a class as a separate event; they are loaded in bulk from a pre-cached image.

Unsatisfied Link Error: native method not found : kdu_jni

java,android,native

The problem is that the jar you included has a dependency to a Java method that is not available in Android SDK. You should understand that even though Android programs are written in Java, they are not run by JVM....

Does the internal browser phonegap uses update whenever the native browser updates on android?

android,mobile,cordova,browser,native

As it turns out, my inital guess is correct. Phonegap is using the Webview Class, which starting with Android 4.4 is now using the Chromium Engine instead of Webkit. This change is the root of my issue. For those interested, my keyup and keydown events were not receiving the proper...

Test for std::thread native handle implementation

multithreading,c++11,pthreads,native,handle

Introduction There's nothing saying that a certain MACRO, or equivalent, will be available for the preprocessor (that would yield what thread-implementation a certain implementation is using). If we instead were to inspect the returned value (more specifically the returned type) of std::thread::native_handler (std::thread::native_handle_type) one might think that it would yield...

How can i call java methods from objective-c?

java,objective-c,native

Why do you use objective-c then? You could just start a java program and write anything you need in a file. Or you just use c# ^^

Configuring IntelliJ IDEA Ultimate to add JAR to Classpath instead of Native location

java,intellij-idea,jar,classpath,native

I don't have my copy of Ultimate available currently, so I'm not sure about solving this in the UI. But one workaround would be to just edit the library config file directly. If you're using the directory-based project format, it'll be in .idea/libraries/MyLibrary.xml. Find your entry under NATIVES (or whatever...

How to change windows desktop background

java,windows,native

Can I change my Windows desktop wallpaper programmatically in Java/Groovy? So the correct way is with JNA if you are not familiar with JNA or if you haven't used JNA the link above is for you. Otherwise you are right about using natives but you never stated how you are...

Open standard for native RTC with no plugins

native,webrtc,rtc

webrtc definition. webrtc is stuck into two parts, complementary but separated. the W3C consortium is standardizing a JS API for browsers named webRTC. The IETF is standardizing the underlying protocols and what happen on the wire for interoperability, it is named rtcweb. the IETF's rtcweb group defines everything you...

C++ error C2440 when getting native pointer

c++,pointers,native,local,command-line-interface

someclass instance() is a function pointer as you can see from the error message. Change it to someclass instance.

Style Attribute Manipulation wiht native Javascript on FF

javascript,css,firefox,styles,native

Because objects are passed around by reference, you don't need return source; and you don't need testEl.style = either. Try removing these two things and see if that fixes the problem in Firefox - it probably doesn't like you doing a complete re-assign of the style object ;)

Multiple dependent native projects in visual studio

c++,visual-studio-2012,native,project-management

My personal solution to the problem is as follows. Every project generating a binary builds to: $(SolutionDir)build\$(Configuration)\` Every project generating a static library builds to: $(SolutionDir)build\$(Configuration)\Libraries\ The intermediate directory for all projects is: $(SolutionDir)build\$(ProjectName)\$(Configuration)\ And runs the following pre-build command: Copy /Y "$(ProjectDir)*.h" + "$(ProjectDir)*.hpp" "$(SolutionDir)build\$(Configuration)\Libraries\" Advantages of this system...

Android emulator native player on Eclipse

android,eclipse,native,music,player

Of course, there is. Go to the DDMS pane, select the emulator. Select the /mnt/sdcard. Copy (there's an icon with a red arrow pointing to a phone) the file/s you want in it. ...

What features IBM Worklight can and can not provide in native mobile app developing?

frameworks,worklight,native,mobile-application,tradeoff

The essence of native development differs greatly than that of hybrid development. In native development Worklight provides a set of APIs that allow you to work with the Worklight Server and the features that surround it (as listed in the question you've linked to), Whereas in hybrid development you also...

How can I package a binary in Maven so that other projects can depend on it at compile time?

maven,native

The maven-assembly-plugin should be sufficient to package your native binaries into an archive. Clients can the use the unpack goal of the maven-dependency-plugin to unpack this archive into a given directory, e.g. the current target. Then all you need is a Maven plugin that knows how to run your native...

Getting the native word size from Java VM

java,native,sizeof

A comment suggested a system property so I looked at the list of those - it turns out there is one that gives this value: System.getProperty("sun.arch.data.model") ...

Is it possible to call nested native functions in android?

android,jni,native

For calling the method of the C++ class in the JNI, the object of this class must be created already(if it's not a static method). You need to create the JNI wrappers only for the methods that can be called from the Java code. Example: C++ class: class Controller...

SFML.Net can't locate native library on Linux

c#,ubuntu,mono,native,sfml

Your problem may be caused by insufficient access rights (please add output of ls -la /usr/local/lib/ command) or missing native library dependencies (please add output of ldd /usr/local/lib/libcsfml-window.so.2.1 command).

Android jni broadcast to java

java,android,jni,native,broadcast

The easiest way is probably to do it in Java and write a JNI callback to call that Java function. If you do need to do it in C, you'll need to use JNI to create an Intent, then to set the action and extras of the intent, then use...

Create a native bundle for a JavaFX application that has a preloader

java,javafx,native,preloader

This example will work with installers exe/msi/image only (have no Mac to test dmg). This step by step assumes, that you already installed the needed tools like InnoSetup, Wix Toolset, etc. It also assumes, that you have configured the tools to run with netbeans (setting paths, edit config files, etc.)....

mongodb - capped collections with nodejs

javascript,node.js,mongodb,native,capped-collections

Regarding your questions 1 - 4 about capped collections and creating them automatically, there are several ways to do this. On the one hand, you could run a script to initialise your database so that it has the capped collections available to your client when you run it for the...

How to free memory allocated by native method on Java side?

java,c++,memory-leaks,jni,native

The Java GC should clean up any objects you allocate. See this answer for more details....

Best option for converting a JSP website to Android app?

android,cordova,webkit,native,hybrid-mobile-app

It would be a lot easier (as well as interesting) to write simple mobile clients in native Java/Objective-C for Android & iOS. For an experienced web developer, it would not be hard to create simple apps using articles on Google/StackOverflow. Not to mention that using the native mobile SDKs' is...

Android NDK Callbacks to Java Activity

java,android,callback,android-ndk,native

If your code is not invoked from a Java method it will use the system classloader in FindClass() which only knows about the Android system classes. I suggest using getting a reference to the class in JNI_OnLoad, creating a global reference to that via NewGlobalRef and passing that to your...

C# / C++ Asynchronous reverse pinvoke?

c++,c,asynchronous,pinvoke,native

No, this is a universal bug and not specific to asynchronous code. It is just a bit more likely to byte in your case since you never have the machinery behind [DllImport] to keep you out of trouble. I'll explain why this goes wrong, maybe that helps. A delegate declaration...

Tomcat crashes because of native C code - Possible workarounds?

java,tomcat,crash,native,rmi

We ended up by doing the following: Moved and exposed the C specific code to a URL endpoint, i.e. RPC style web service (basically a remote call): @WebService @SOAPBinding(style = Style.RPC) And subsequently exposing its interface endpoint: @WebService(endpointInterface.. During web server init published this endpoint Endpoint.publish(...) in a new java...

C# native Image template match (FIXED)

c#,performance,image-processing,native,template-matching

Did you try locking bits or using FastBitmap implementation? You should be able to find tons of implementations like this one. It should speed up getting pixels multiple times. You just need to take care of properly disposing it.

Getting Access on the Android VideoView received packets when Streaming a URL

java,android,video-streaming,native,videoview

Short answer is no, not that I know of. Long answer is that you haven't given enough detail. What data exactly do you need access to? Are you writing an application, or modifying your OS to do this to other applications? The code that actually fetches a remote video is...

How much memory does Nothing take?

.net,memory-management,null,native,nothing

Generally speaking: A reference to Null takes only the space of the reference itself on the stack. Which should be 8 byte on a 64 bit system. In your particular case: Note the difference between boxed and unboxed values! A boxed integer is a reference to an instance of the...

getImageWritersByFormatName doesn't give proper values

java,native,ocr,tesseract,jai

Thanks! I figured out the mistake myself.. i had to set the classpath to the jai_imageio.jar file in tomcat/bin/setenv.sh

Android NDK OpenCV - No implementation found for native

android,c++,opencv,android-ndk,native

After few days of hopelessness :D I solve my problem. The issue was that $(OPENCV_INSTALL_MODULES) should be equal. At the line OPENCV_INSTALL_MODULES:=on in my Android.mk file. I overrided OPENCV_INSTALL_MODULES:=on to OPENCV_INSTALL_MODULES=on and now it works.... Perhaps it might help to someone else too :)...

Desktop.getDesktop().browse Hangs

java,awt,native

You are not alone. This is a bug that appears to happen in some versions of JDK 1.6 and 1.7. I haven't seen it occuring in JDK 1.8. It can occur on Windows too and all you can do is either update the JVM or not use the Desktop class...

Difference Native and Non-Native iOS apps

ios,native,hybrid-mobile-app

In fact, answer depends on framework which was used for building app. The are two kinds of frameworks that I've seen so far: Based on C/C++ languages (Marmalade SDK, e.g.) Based on JavaScript (Appcelerator Titanium, PhoneGap, etc.) In first case the only way to recognize that app is not native...

How to create iOS- & OSX- library from Haxe and use it in native application?

ios,osx,native,haxe,hxcpp

How to create iOS- / OSX- library from Haxe and use it in native application Actuality: 12.2014; HXCPP-ver.: 3.1.39~git. Dependency: hxcpp 1. Haxe -> Library Create a new Haxe-project with main class named HxModule. src/HxModule.hx class HxModule { public static function main() { Sys.println('Hello from HxModule: "${test()}"'); } @:headerCode public...

Sending push notifications to a list of friends in an Android Native App

android,notifications,push,native

Actually Push Notification mainly sends from server, from application side you must need to create one Browser Key on Google Api Console, after creating your app there and need to activate GCM from there. Then, you need to give GCM Registration Id to your server and then whatever push you...

Build native 64bit and 32bit exe with JXCore

node.js,native,jxcore

To build a native 32bit app on 64bit platform, you should use jx compiled for ia32 processor. If this is on Windows, you can either use the Windows Setup (x32/x64/SM/V8) (on x64 Windows you will have an option to install x32 JXcore binaries as well) or download the exact binary...

AMR codec Native Support in Windows phone 8.1

c++,windows-phone-8.1,native,codec,amr

I posted this question in Microsoft forum and i got the answer, the answer is Microsoft doesn't support in-build AMR codec, to support AMR codec in windows phone we need to use Third Party Codec Library. refer this link anybody has same question: https://social.msdn.microsoft.com/Forums/windowsapps/en-US/28e2bc65-e938-4256-b8ee-43affe556666/is-it-possible-to-use-media-extension-for-encoding-raw-audio-pcm-data-to-amr-data?forum=wpdevelop...

Odd return from WlanEnumInterfaces (Windows Native WiFi) in Java

java,wifi,native,jna,wlan

The WlanEnumInterfaces populates the field you provide it with the address of a struct. You are passing in the address of a struct rather than the address of an address. Use PointerByReference to get the address of the struct, e.g. PointerByReference pref = new PointerByReference(); Wlanapi.INSTANCE.WlanEnumInterfaces(handle, null, pref); WLAN_INTERFACE_INFO_LIST list...

Xamarin Unified API: Native library binding: NSUInteger vs. enum

ios,binding,enums,xamarin,native

Yes, there is. Use a 64-bit type (long or ulong) for the enum, and decorate it with the [Native] attribute: [Native] public enum MyEnum : long { // ... } And then you can use the enum in your ApiDefinition.cs, and the binding code will automatically generate the right thing....

Android: Best way to populate ListView from native data source

android,listview,arraylist,jni,native

As you have mentioned that the data available in SQLite database, you can access this SQLite database from Android app layer using the SQLite related classes available in Android. It helps you the extra processing of data through JNI layer. Also modification of list items will be directly done on...

Can Xamarin Studio export Native LIbarys

android,ios,windows-phone-8,xamarin,native

You can generate a .NET DLL that can be used in WP8, or any .NET platform. You cannot create libraries for native Android/iOS use.

APK size exceed 50MB due to large amount of native libraries

java,android,jni,apk,native

I don't think it is possible to call loadLibrary on a .so that is not in the app's apk or on the device (expansions included). What you can do, though, is include your .so libraries inside an expansion file, create a Starter activity that extracts these SO to a system...

How to load and use native c code in a lein project?

clojure,native,leiningen

The problem was due to an naming error in my method in the C header and source files per the jni standard. The correct way to use jni with clojure is to create a Java wrapper class as I have done and load the dynamic library with the method clojure.lang.RT.loadLibrarySince...

I receive error message when run JNI android app A/libc﹕ Fatal signal 11 (SIGSEGV) at 0xdeadd00d (code=1), thread 17729

java,android,c++,jni,native

The JNI side of this code is C, not C++, and C's laxer handling of pointer punning is part of the problem. Your code breaks on these two lines: jstring plainText = (*env)->NewStringUTF(env, "Hello from JNI ! Compiled with ABI 2222 "); return (*env)->NewStringUTF(env, plainText); because NewStringUTF has the signature...

Mobile - Codename - How can it be faster than native language?

java,ios,objective-c,mobile,native

A quote right from the page you have linked to: A small disclaimer is that the Objective-C benchmark is a bit heavy on the method/message calls which biases the benchmark in our favor. Method invocations in Codename One are naturally much faster than the equivalent Objective-C code due to the...

does NewDirectByteBuffer create a copy in native code

java,c++,jni,native

Your use of DirectByteBuffer will almost certainly fail in spectacular, core-dumping, and unpredictable ways. And its behavior may vary between JVM implementations and operating systems. The problem is that your direct memory must remain valid for the lifetime of the DirectByteBuffer. Since your string is on the stack, it will...

How can i see native code for java? [closed]

android,android-ndk,native

If your goal is only to inform yourself, go ahead, Android AOSP is available at this address https://android.googlesource.com If you decide to modify something to fit your needs, you will need to rebuild Android and flash your device. For your case, the read() method comes from java.io.InputStream (check your imports)...