Ooops
May 24, 2020, 11:56:48 PM

Author Topic: Android - LangUtil: What is it for?  (Read 1719 times)

Offline Xaron

  • Sr. Member
  • ****
  • Posts: 293
Android - LangUtil: What is it for?
« on: July 18, 2017, 12:41:05 PM »
As the topic says, what is this strange "LangUtil" in the Android target for? Does anybody know?

Offline dawlane

  • Full Member
  • ***
  • Posts: 148
Re: Android - LangUtil: What is it for?
« Reply #1 on: July 18, 2017, 01:40:55 PM »
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.

Offline Xaron

  • Sr. Member
  • ****
  • Posts: 293
Re: Android - LangUtil: What is it for?
« Reply #2 on: July 18, 2017, 03:44:05 PM »
Hmm... I don't think so. That class has only 2 methods:

Code: [Select]
package com.monkey;

public class LangUtil{

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

public native static int parseInt( String str );

public native static float parseFloat( String str );
}

Offline dawlane

  • Full Member
  • ***
  • Posts: 148
Re: Android - LangUtil: What is it for?
« Reply #3 on: July 18, 2017, 04:59:52 PM »
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.

Offline Xaron

  • Sr. Member
  • ****
  • Posts: 293
Re: Android - LangUtil: What is it for?
« Reply #4 on: July 19, 2017, 11:19:09 AM »
Thanks, will look into this.

Offline Xaron

  • Sr. Member
  • ****
  • Posts: 293
Re: Android - LangUtil: What is it for?
« Reply #5 on: July 19, 2017, 12:44:32 PM »
Ok, got it working.

 

SimplePortal 2.3.6 © 2008-2014, SimplePortal