Delphi Android SDK EPSON - Invoke error method not found











up vote
0
down vote

favorite












I am getting the following error EJNIFatal Exception : Method not found when implementing EPSON Printer SDK for TM M30 (Bluetooth)
com.epson.epos2.discovery.Discovery



Interface



unit com.epson.epos2.discovery.Discovery;

interface

uses
AndroidAPI.JNIBridge,
Androidapi.JNI.JavaTypes,
com.epson.epos2.discovery.DiscoveryListener,
com.epson.epos2.discovery.FilterOption,
Androidapi.JNI.GraphicsContentViewText,
com.epson.epos2.discovery.DeviceInfo;

type
JDiscovery = interface;

JDiscoveryClass = interface(JObjectClass)
['{D8B21BB2-D0C7-4654-AAFB-61B39334F3F1}']
function GetFILTER_NAME : Integer; cdecl; // A: $19
function GetFILTER_NONE : Integer; cdecl; // A: $19
function GetMODEL_ALL : Integer; cdecl; // A: $19
function GetPORTTYPE_ALL : Integer; cdecl; // A: $19
function GetPORTTYPE_BLUETOOTH : Integer; cdecl; // A: $19
function GetPORTTYPE_TCP : Integer; cdecl; // A: $19
function GetPORTTYPE_USB : Integer; cdecl; // A: $19
function GetTYPE_ALL : Integer; cdecl; // A: $19
function GetTYPE_CAT : Integer; cdecl; // A: $19
function GetTYPE_CCHANGER : Integer; cdecl; // A: $19
function GetTYPE_DISPLAY : Integer; cdecl; // A: $19
function GetTYPE_HYBRID_PRINTER : Integer; cdecl; // A: $19
function GetTYPE_KEYBOARD : Integer; cdecl; // A: $19
function GetTYPE_MSR : Integer; cdecl; // A: $19
function GetTYPE_OTHER_PERIPHERAL : Integer; cdecl; // A: $19
function GetTYPE_POS_KEYBOARD : Integer; cdecl; // A: $19
function GetTYPE_PRINTER : Integer; cdecl; // A: $19
function GetTYPE_SCANNER : Integer; cdecl; // A: $19
function GetTYPE_SERIAL : Integer; cdecl; // A: $19
function init : JDiscovery; cdecl; // ()V A: $1
procedure start(context : JContext; filterOption : JFilterOption; listener : JDiscoveryListener) ; cdecl;// (Landroid/content/Context;Lcom/epson/epos2/discovery/FilterOption;Lcom/epson/epos2/discovery/DiscoveryListener;)V A: $29
procedure stop ; cdecl; // ()V A: $29
property FILTER_NAME : Integer read GetFILTER_NAME; // I A: $19
property FILTER_NONE : Integer read GetFILTER_NONE; // I A: $19
property MODEL_ALL : Integer read GetMODEL_ALL; // I A: $19
property PORTTYPE_ALL : Integer read GetPORTTYPE_ALL; // I A: $19
property PORTTYPE_BLUETOOTH : Integer read GetPORTTYPE_BLUETOOTH; // I A: $19
property PORTTYPE_TCP : Integer read GetPORTTYPE_TCP; // I A: $19
property PORTTYPE_USB : Integer read GetPORTTYPE_USB; // I A: $19
property TYPE_ALL : Integer read GetTYPE_ALL; // I A: $19
property TYPE_CAT : Integer read GetTYPE_CAT; // I A: $19
property TYPE_CCHANGER : Integer read GetTYPE_CCHANGER; // I A: $19
property TYPE_DISPLAY : Integer read GetTYPE_DISPLAY; // I A: $19
property TYPE_HYBRID_PRINTER : Integer read GetTYPE_HYBRID_PRINTER; // I A: $19
property TYPE_KEYBOARD : Integer read GetTYPE_KEYBOARD; // I A: $19
property TYPE_MSR : Integer read GetTYPE_MSR; // I A: $19
property TYPE_OTHER_PERIPHERAL : Integer read GetTYPE_OTHER_PERIPHERAL; // I A: $19
property TYPE_POS_KEYBOARD : Integer read GetTYPE_POS_KEYBOARD; // I A: $19
property TYPE_PRINTER : Integer read GetTYPE_PRINTER; // I A: $19
property TYPE_SCANNER : Integer read GetTYPE_SCANNER; // I A: $19
property TYPE_SERIAL : Integer read GetTYPE_SERIAL; // I A: $19
end;

[JavaSignature('com/epson/epos2/discovery/Discovery')]
JDiscovery = interface(JObject)
['{1CA6140A-C36C-454F-81D9-81DD7B66281B}']
procedure start(context : JContext; filterOption : JFilterOption; listener : JDiscoveryListener) ; cdecl;// (Landroid/content/Context;Lcom/epson/epos2/discovery/FilterOption;Lcom/epson/epos2/discovery/DiscoveryListener;)V A: $29
procedure stop ; cdecl;
end;

TJDiscovery = class(TJavaGenericImport<JDiscoveryClass, JDiscovery>)
end;


My Code looks like this



procedure TForm1.Button1Click(Sender: TObject);
var
ldiscover : TJDiscovery;
ldis : JDiscovery;
begin
ldis := TJDiscovery.JavaClass.init; //<----- Error here

end;


Can someone help with why; Method not found? (is there something wrong with how delphi/android handles API's, Method not found issue is all over, but no solutions )



Using Tokyo 10.2










share|improve this question


























    up vote
    0
    down vote

    favorite












    I am getting the following error EJNIFatal Exception : Method not found when implementing EPSON Printer SDK for TM M30 (Bluetooth)
    com.epson.epos2.discovery.Discovery



    Interface



    unit com.epson.epos2.discovery.Discovery;

    interface

    uses
    AndroidAPI.JNIBridge,
    Androidapi.JNI.JavaTypes,
    com.epson.epos2.discovery.DiscoveryListener,
    com.epson.epos2.discovery.FilterOption,
    Androidapi.JNI.GraphicsContentViewText,
    com.epson.epos2.discovery.DeviceInfo;

    type
    JDiscovery = interface;

    JDiscoveryClass = interface(JObjectClass)
    ['{D8B21BB2-D0C7-4654-AAFB-61B39334F3F1}']
    function GetFILTER_NAME : Integer; cdecl; // A: $19
    function GetFILTER_NONE : Integer; cdecl; // A: $19
    function GetMODEL_ALL : Integer; cdecl; // A: $19
    function GetPORTTYPE_ALL : Integer; cdecl; // A: $19
    function GetPORTTYPE_BLUETOOTH : Integer; cdecl; // A: $19
    function GetPORTTYPE_TCP : Integer; cdecl; // A: $19
    function GetPORTTYPE_USB : Integer; cdecl; // A: $19
    function GetTYPE_ALL : Integer; cdecl; // A: $19
    function GetTYPE_CAT : Integer; cdecl; // A: $19
    function GetTYPE_CCHANGER : Integer; cdecl; // A: $19
    function GetTYPE_DISPLAY : Integer; cdecl; // A: $19
    function GetTYPE_HYBRID_PRINTER : Integer; cdecl; // A: $19
    function GetTYPE_KEYBOARD : Integer; cdecl; // A: $19
    function GetTYPE_MSR : Integer; cdecl; // A: $19
    function GetTYPE_OTHER_PERIPHERAL : Integer; cdecl; // A: $19
    function GetTYPE_POS_KEYBOARD : Integer; cdecl; // A: $19
    function GetTYPE_PRINTER : Integer; cdecl; // A: $19
    function GetTYPE_SCANNER : Integer; cdecl; // A: $19
    function GetTYPE_SERIAL : Integer; cdecl; // A: $19
    function init : JDiscovery; cdecl; // ()V A: $1
    procedure start(context : JContext; filterOption : JFilterOption; listener : JDiscoveryListener) ; cdecl;// (Landroid/content/Context;Lcom/epson/epos2/discovery/FilterOption;Lcom/epson/epos2/discovery/DiscoveryListener;)V A: $29
    procedure stop ; cdecl; // ()V A: $29
    property FILTER_NAME : Integer read GetFILTER_NAME; // I A: $19
    property FILTER_NONE : Integer read GetFILTER_NONE; // I A: $19
    property MODEL_ALL : Integer read GetMODEL_ALL; // I A: $19
    property PORTTYPE_ALL : Integer read GetPORTTYPE_ALL; // I A: $19
    property PORTTYPE_BLUETOOTH : Integer read GetPORTTYPE_BLUETOOTH; // I A: $19
    property PORTTYPE_TCP : Integer read GetPORTTYPE_TCP; // I A: $19
    property PORTTYPE_USB : Integer read GetPORTTYPE_USB; // I A: $19
    property TYPE_ALL : Integer read GetTYPE_ALL; // I A: $19
    property TYPE_CAT : Integer read GetTYPE_CAT; // I A: $19
    property TYPE_CCHANGER : Integer read GetTYPE_CCHANGER; // I A: $19
    property TYPE_DISPLAY : Integer read GetTYPE_DISPLAY; // I A: $19
    property TYPE_HYBRID_PRINTER : Integer read GetTYPE_HYBRID_PRINTER; // I A: $19
    property TYPE_KEYBOARD : Integer read GetTYPE_KEYBOARD; // I A: $19
    property TYPE_MSR : Integer read GetTYPE_MSR; // I A: $19
    property TYPE_OTHER_PERIPHERAL : Integer read GetTYPE_OTHER_PERIPHERAL; // I A: $19
    property TYPE_POS_KEYBOARD : Integer read GetTYPE_POS_KEYBOARD; // I A: $19
    property TYPE_PRINTER : Integer read GetTYPE_PRINTER; // I A: $19
    property TYPE_SCANNER : Integer read GetTYPE_SCANNER; // I A: $19
    property TYPE_SERIAL : Integer read GetTYPE_SERIAL; // I A: $19
    end;

    [JavaSignature('com/epson/epos2/discovery/Discovery')]
    JDiscovery = interface(JObject)
    ['{1CA6140A-C36C-454F-81D9-81DD7B66281B}']
    procedure start(context : JContext; filterOption : JFilterOption; listener : JDiscoveryListener) ; cdecl;// (Landroid/content/Context;Lcom/epson/epos2/discovery/FilterOption;Lcom/epson/epos2/discovery/DiscoveryListener;)V A: $29
    procedure stop ; cdecl;
    end;

    TJDiscovery = class(TJavaGenericImport<JDiscoveryClass, JDiscovery>)
    end;


    My Code looks like this



    procedure TForm1.Button1Click(Sender: TObject);
    var
    ldiscover : TJDiscovery;
    ldis : JDiscovery;
    begin
    ldis := TJDiscovery.JavaClass.init; //<----- Error here

    end;


    Can someone help with why; Method not found? (is there something wrong with how delphi/android handles API's, Method not found issue is all over, but no solutions )



    Using Tokyo 10.2










    share|improve this question
























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I am getting the following error EJNIFatal Exception : Method not found when implementing EPSON Printer SDK for TM M30 (Bluetooth)
      com.epson.epos2.discovery.Discovery



      Interface



      unit com.epson.epos2.discovery.Discovery;

      interface

      uses
      AndroidAPI.JNIBridge,
      Androidapi.JNI.JavaTypes,
      com.epson.epos2.discovery.DiscoveryListener,
      com.epson.epos2.discovery.FilterOption,
      Androidapi.JNI.GraphicsContentViewText,
      com.epson.epos2.discovery.DeviceInfo;

      type
      JDiscovery = interface;

      JDiscoveryClass = interface(JObjectClass)
      ['{D8B21BB2-D0C7-4654-AAFB-61B39334F3F1}']
      function GetFILTER_NAME : Integer; cdecl; // A: $19
      function GetFILTER_NONE : Integer; cdecl; // A: $19
      function GetMODEL_ALL : Integer; cdecl; // A: $19
      function GetPORTTYPE_ALL : Integer; cdecl; // A: $19
      function GetPORTTYPE_BLUETOOTH : Integer; cdecl; // A: $19
      function GetPORTTYPE_TCP : Integer; cdecl; // A: $19
      function GetPORTTYPE_USB : Integer; cdecl; // A: $19
      function GetTYPE_ALL : Integer; cdecl; // A: $19
      function GetTYPE_CAT : Integer; cdecl; // A: $19
      function GetTYPE_CCHANGER : Integer; cdecl; // A: $19
      function GetTYPE_DISPLAY : Integer; cdecl; // A: $19
      function GetTYPE_HYBRID_PRINTER : Integer; cdecl; // A: $19
      function GetTYPE_KEYBOARD : Integer; cdecl; // A: $19
      function GetTYPE_MSR : Integer; cdecl; // A: $19
      function GetTYPE_OTHER_PERIPHERAL : Integer; cdecl; // A: $19
      function GetTYPE_POS_KEYBOARD : Integer; cdecl; // A: $19
      function GetTYPE_PRINTER : Integer; cdecl; // A: $19
      function GetTYPE_SCANNER : Integer; cdecl; // A: $19
      function GetTYPE_SERIAL : Integer; cdecl; // A: $19
      function init : JDiscovery; cdecl; // ()V A: $1
      procedure start(context : JContext; filterOption : JFilterOption; listener : JDiscoveryListener) ; cdecl;// (Landroid/content/Context;Lcom/epson/epos2/discovery/FilterOption;Lcom/epson/epos2/discovery/DiscoveryListener;)V A: $29
      procedure stop ; cdecl; // ()V A: $29
      property FILTER_NAME : Integer read GetFILTER_NAME; // I A: $19
      property FILTER_NONE : Integer read GetFILTER_NONE; // I A: $19
      property MODEL_ALL : Integer read GetMODEL_ALL; // I A: $19
      property PORTTYPE_ALL : Integer read GetPORTTYPE_ALL; // I A: $19
      property PORTTYPE_BLUETOOTH : Integer read GetPORTTYPE_BLUETOOTH; // I A: $19
      property PORTTYPE_TCP : Integer read GetPORTTYPE_TCP; // I A: $19
      property PORTTYPE_USB : Integer read GetPORTTYPE_USB; // I A: $19
      property TYPE_ALL : Integer read GetTYPE_ALL; // I A: $19
      property TYPE_CAT : Integer read GetTYPE_CAT; // I A: $19
      property TYPE_CCHANGER : Integer read GetTYPE_CCHANGER; // I A: $19
      property TYPE_DISPLAY : Integer read GetTYPE_DISPLAY; // I A: $19
      property TYPE_HYBRID_PRINTER : Integer read GetTYPE_HYBRID_PRINTER; // I A: $19
      property TYPE_KEYBOARD : Integer read GetTYPE_KEYBOARD; // I A: $19
      property TYPE_MSR : Integer read GetTYPE_MSR; // I A: $19
      property TYPE_OTHER_PERIPHERAL : Integer read GetTYPE_OTHER_PERIPHERAL; // I A: $19
      property TYPE_POS_KEYBOARD : Integer read GetTYPE_POS_KEYBOARD; // I A: $19
      property TYPE_PRINTER : Integer read GetTYPE_PRINTER; // I A: $19
      property TYPE_SCANNER : Integer read GetTYPE_SCANNER; // I A: $19
      property TYPE_SERIAL : Integer read GetTYPE_SERIAL; // I A: $19
      end;

      [JavaSignature('com/epson/epos2/discovery/Discovery')]
      JDiscovery = interface(JObject)
      ['{1CA6140A-C36C-454F-81D9-81DD7B66281B}']
      procedure start(context : JContext; filterOption : JFilterOption; listener : JDiscoveryListener) ; cdecl;// (Landroid/content/Context;Lcom/epson/epos2/discovery/FilterOption;Lcom/epson/epos2/discovery/DiscoveryListener;)V A: $29
      procedure stop ; cdecl;
      end;

      TJDiscovery = class(TJavaGenericImport<JDiscoveryClass, JDiscovery>)
      end;


      My Code looks like this



      procedure TForm1.Button1Click(Sender: TObject);
      var
      ldiscover : TJDiscovery;
      ldis : JDiscovery;
      begin
      ldis := TJDiscovery.JavaClass.init; //<----- Error here

      end;


      Can someone help with why; Method not found? (is there something wrong with how delphi/android handles API's, Method not found issue is all over, but no solutions )



      Using Tokyo 10.2










      share|improve this question













      I am getting the following error EJNIFatal Exception : Method not found when implementing EPSON Printer SDK for TM M30 (Bluetooth)
      com.epson.epos2.discovery.Discovery



      Interface



      unit com.epson.epos2.discovery.Discovery;

      interface

      uses
      AndroidAPI.JNIBridge,
      Androidapi.JNI.JavaTypes,
      com.epson.epos2.discovery.DiscoveryListener,
      com.epson.epos2.discovery.FilterOption,
      Androidapi.JNI.GraphicsContentViewText,
      com.epson.epos2.discovery.DeviceInfo;

      type
      JDiscovery = interface;

      JDiscoveryClass = interface(JObjectClass)
      ['{D8B21BB2-D0C7-4654-AAFB-61B39334F3F1}']
      function GetFILTER_NAME : Integer; cdecl; // A: $19
      function GetFILTER_NONE : Integer; cdecl; // A: $19
      function GetMODEL_ALL : Integer; cdecl; // A: $19
      function GetPORTTYPE_ALL : Integer; cdecl; // A: $19
      function GetPORTTYPE_BLUETOOTH : Integer; cdecl; // A: $19
      function GetPORTTYPE_TCP : Integer; cdecl; // A: $19
      function GetPORTTYPE_USB : Integer; cdecl; // A: $19
      function GetTYPE_ALL : Integer; cdecl; // A: $19
      function GetTYPE_CAT : Integer; cdecl; // A: $19
      function GetTYPE_CCHANGER : Integer; cdecl; // A: $19
      function GetTYPE_DISPLAY : Integer; cdecl; // A: $19
      function GetTYPE_HYBRID_PRINTER : Integer; cdecl; // A: $19
      function GetTYPE_KEYBOARD : Integer; cdecl; // A: $19
      function GetTYPE_MSR : Integer; cdecl; // A: $19
      function GetTYPE_OTHER_PERIPHERAL : Integer; cdecl; // A: $19
      function GetTYPE_POS_KEYBOARD : Integer; cdecl; // A: $19
      function GetTYPE_PRINTER : Integer; cdecl; // A: $19
      function GetTYPE_SCANNER : Integer; cdecl; // A: $19
      function GetTYPE_SERIAL : Integer; cdecl; // A: $19
      function init : JDiscovery; cdecl; // ()V A: $1
      procedure start(context : JContext; filterOption : JFilterOption; listener : JDiscoveryListener) ; cdecl;// (Landroid/content/Context;Lcom/epson/epos2/discovery/FilterOption;Lcom/epson/epos2/discovery/DiscoveryListener;)V A: $29
      procedure stop ; cdecl; // ()V A: $29
      property FILTER_NAME : Integer read GetFILTER_NAME; // I A: $19
      property FILTER_NONE : Integer read GetFILTER_NONE; // I A: $19
      property MODEL_ALL : Integer read GetMODEL_ALL; // I A: $19
      property PORTTYPE_ALL : Integer read GetPORTTYPE_ALL; // I A: $19
      property PORTTYPE_BLUETOOTH : Integer read GetPORTTYPE_BLUETOOTH; // I A: $19
      property PORTTYPE_TCP : Integer read GetPORTTYPE_TCP; // I A: $19
      property PORTTYPE_USB : Integer read GetPORTTYPE_USB; // I A: $19
      property TYPE_ALL : Integer read GetTYPE_ALL; // I A: $19
      property TYPE_CAT : Integer read GetTYPE_CAT; // I A: $19
      property TYPE_CCHANGER : Integer read GetTYPE_CCHANGER; // I A: $19
      property TYPE_DISPLAY : Integer read GetTYPE_DISPLAY; // I A: $19
      property TYPE_HYBRID_PRINTER : Integer read GetTYPE_HYBRID_PRINTER; // I A: $19
      property TYPE_KEYBOARD : Integer read GetTYPE_KEYBOARD; // I A: $19
      property TYPE_MSR : Integer read GetTYPE_MSR; // I A: $19
      property TYPE_OTHER_PERIPHERAL : Integer read GetTYPE_OTHER_PERIPHERAL; // I A: $19
      property TYPE_POS_KEYBOARD : Integer read GetTYPE_POS_KEYBOARD; // I A: $19
      property TYPE_PRINTER : Integer read GetTYPE_PRINTER; // I A: $19
      property TYPE_SCANNER : Integer read GetTYPE_SCANNER; // I A: $19
      property TYPE_SERIAL : Integer read GetTYPE_SERIAL; // I A: $19
      end;

      [JavaSignature('com/epson/epos2/discovery/Discovery')]
      JDiscovery = interface(JObject)
      ['{1CA6140A-C36C-454F-81D9-81DD7B66281B}']
      procedure start(context : JContext; filterOption : JFilterOption; listener : JDiscoveryListener) ; cdecl;// (Landroid/content/Context;Lcom/epson/epos2/discovery/FilterOption;Lcom/epson/epos2/discovery/DiscoveryListener;)V A: $29
      procedure stop ; cdecl;
      end;

      TJDiscovery = class(TJavaGenericImport<JDiscoveryClass, JDiscovery>)
      end;


      My Code looks like this



      procedure TForm1.Button1Click(Sender: TObject);
      var
      ldiscover : TJDiscovery;
      ldis : JDiscovery;
      begin
      ldis := TJDiscovery.JavaClass.init; //<----- Error here

      end;


      Can someone help with why; Method not found? (is there something wrong with how delphi/android handles API's, Method not found issue is all over, but no solutions )



      Using Tokyo 10.2







      android delphi sdk






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 44 mins ago









      Happy

      1




      1





























          active

          oldest

          votes











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














           

          draft saved


          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53371582%2fdelphi-android-sdk-epson-invoke-error-method-not-found%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown






























          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















           

          draft saved


          draft discarded



















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53371582%2fdelphi-android-sdk-epson-invoke-error-method-not-found%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          MongoDB - Not Authorized To Execute Command

          How to fix TextFormField cause rebuild widget in Flutter

          Npm cannot find a required file even through it is in the searched directory