Android - LangUtil: What is it for?

Started by Xaron, July 18, 2017, 12:41:05

Previous topic - Next topic

Xaron

As the topic says, what is this strange "LangUtil" in the Android target for? Does anybody know?

dawlane

#1
The only thing a can think of is that its part of the Apache http components and had something to do with consistent hash tables.

Should be a good place to start.
And what looks like some examples.

Xaron

Hmm... I don't think so. That class has only 2 methods:


package com.monkey;

public class LangUtil{

static{
System.loadLibrary( "langutil" );
    }

public native static int parseInt( String str );

public native static float parseFloat( String str );
}

dawlane

#3
OK this looks like one of Marks little custom jni wrapper files in the android new template directory.

At a glance it looks like it's for converting a unicode string of int's and floats to numerical int's and floats.
https://github.com/blitz-research/monkey/tree/develop/targets/android/template/langutil

Edit:
You may also want to have a look at this as well. It mentions using NDK with gradle.

Xaron


Xaron