How to use getApplicationContext in android ffi when it is being used in my ffi function

This thread was migrated from an old forum. It may contain information that are no longer valid. For further assistance, please post a new question or open a support ticket from the Customer Support portal.

So I am creating an android ffi in which I am using a function xyz where getapplicationContext is being used , but it is throwing an eror when i am invoking this function from client side , so how to use getApplication context correctly in Kony

public string xyz()

{

TextRecognizer textRecognizer = new TextRecognizer.Builder(getApplicationContext()).build();

}

@Shovix Ali​ ,

Use "KonyMain.getActivityContext();" API to get context.