Guest Posted September 16, 2019 Hi, I have converted jar file with Java2OP, but my .jar have init method and I can not use this. same problem here (more descriptive) https://stackoverflow.com/questions/53141813/delphi-android-java-class-init-function so how can i call the init function from delphi ? Thank you. Share this post Link to post
Dave Nottage 557 Posted September 16, 2019 You cannot, until this is fixed: https://quality.embarcadero.com/browse/RSP-10150 As per Loki's comment, one solution is to write Java code to wrap the class. Alternatively, you might be able to decompile the Java, modify the method name and recompile the jar in question. Share this post Link to post
Guest Posted September 16, 2019 Thank you for answer, I dont know java to much, guess I will forget this This issues from 03/Mar/15, another disappointment from delphi Share this post Link to post
Dave Nottage 557 Posted September 17, 2019 What library are you using? Perhaps I can find a solution for you Share this post Link to post
Guest Posted September 17, 2019 (edited) Thank you so much. Trying IronSource (https://developers.ironsrc.com/ironsource-mobile/android/android-sdk/#step-5) Attached my test project "DelphiIronSourceAndroid" ( jar and converted pas inside, other methods working good only init method have problem ). I'm developing game and need rewarded video advertise, there is alternatives for IronSource but Java2OP can not convert others jar (also IronSource easy to use than others) Alternatives; https://developers.heyzap.com/docs/android_sdk_setup_and_requirements https://www.tapdaq.com/docs/tapdaq-android-sdk/Quickstart Game DelphiIronSourceAndroid.rar Edited September 17, 2019 by Guest Share this post Link to post
eg1 0 Posted December 15, 2020 Lol 5 year and this bug still live https://stackoverflow.com/questions/53141813/delphi-android-java-class-init-function you can't use most .jar library because of that "init" logic Share this post Link to post