Important Files to understand the question:
VpnService Translated to Delphi
My goal is to call the public static Intent prepare(Context context)
method from VpnService.java
and receive the Intent
.
I tried several ways to access it, for example:
var
Intent: JIntent;
JVC: JVpnService;
begin
JVC := TJVpnService.JavaClass.init;
Intent := JVC.prepare(Context); // No Method prepare
or
var
Intent: JIntent;
JVC: JVpnServiceClass;
begin
JVC := JVpnServiceClass.javaClass.init; // Record, Objekt oder Klassentyp erforderlich
or
var
Intent: JIntent;
JVC: JVpnServiceClass;
begin
JVC := JVC.javaClass.init; //Inkompatible Typen JVpnServiceClass und JVpnService
I really have no clue how to access this static method.