Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ buildscript {
google()
}
dependencies {
classpath "com.android.tools.build:gradle:8.0.1"
classpath "com.android.tools.build:gradle:8.11.1"
}
}

Expand Down
1 change: 1 addition & 0 deletions examples/sample/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ plugins {
}

android {
namespace "com.cryptlex.sample"
compileSdkVersion 30
buildToolsVersion "30.0.3"

Expand Down
11 changes: 3 additions & 8 deletions examples/sample/build.gradle
Original file line number Diff line number Diff line change
@@ -1,23 +1,18 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
mavenLocal()
google()
jcenter()
mavenCentral()
}
dependencies {
classpath "com.android.tools.build:gradle:4.1.3"
classpath "com.android.tools.build:gradle:8.11.1"

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

allprojects {
repositories {
google()
jcenter()
}
}

task clean(type: Delete) {
delete rootProject.buildDir
Expand Down
8 changes: 8 additions & 0 deletions examples/sample/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,2 +1,10 @@
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenLocal()
google()
mavenCentral()
}
}
include ':app'
rootProject.name = "sample"
2 changes: 1 addition & 1 deletion lexfloatclient/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ android {
}

dependencies {
implementation 'net.java.dev.jna:jna:5.8.0'
implementation 'net.java.dev.jna:jna:5.13.0@aar'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.14.2'
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,24 @@ public static HostFeatureEntitlement GetHostFeatureEntitlement(String name) thro
throw new LexFloatClientException(status);
}

/**
* Gets the value of the product metadata.
*
* @param key key of the metadata field whose value you want to get
* @return Returns the metadata key value
* @throws LexFloatClientException
* @throws UnsupportedEncodingException
*/
public static String GetHostProductMetadata(String key) throws LexFloatClientException, UnsupportedEncodingException {
int status;
ByteBuffer buffer = ByteBuffer.allocate(4096);
status = LexFloatClientNative.GetHostProductMetadata(key, buffer, 4096);
if (LF_OK == status) {
return new String(buffer.array(), "UTF-8");
}
throw new LexFloatClientException(status);
}

/**
* Get the value of the license metadata field associated with the
* LexFloatServer license key
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
public class LexFloatClientNative implements Library {

static {
System.setProperty("jna.nosys", "true");
Native.register(LexFloatClientNative.class,"LexFloatClient");
}

Expand Down Expand Up @@ -52,6 +53,8 @@ public interface CallbackType extends Callback {

public static native int GetHostFeatureEntitlementInternal(String featureName, ByteBuffer featureEntitlementJson, int length);

public static native int GetHostProductMetadata(String key, ByteBuffer value, int length);

public static native int GetHostLicenseMetadata(String key, ByteBuffer value, int length);

public static native int GetHostLicenseMeterAttribute(String name, LongByReference allowedUses, LongByReference totalUses, LongByReference grossUses);
Expand Down