java - How to extend android class with delphi xe5 -


i tried extend class/interface "androidapi.jni.app.pas" (tjservice), need extend class make service. possible? how?

some example of java/android service

i need override method : oncreate, onbind, ondestroy. don't know how.

i tried this:

 type tandroidservice= class(tjservice)   function onbind(intent: jintent): jibinder; override;   procedure oncreate; override;   procedure ondestroy; override;   procedure onstart(intent: jintent; startid: integer); override;  end; 

with error:

[dcc error] unit1.pas(13): e2137 method 'onbind' not found in base class [dcc error] unit1.pas(14): e2137 method 'oncreate' not found in base class [dcc error] unit1.pas(15): e2137 method 'ondestroy' not found in base class [dcc error] unit1.pas(16): e2137 method 'onstart' not found in base class [dcc error] unit1.pas(13): e2065 unsatisfied forward or external declaration: 'tandroidservice.onbind' [dcc error] unit1.pas(14): e2065 unsatisfied forward or external declaration: 'tandroidservice.oncreate' [dcc error] unit1.pas(15): e2065 unsatisfied forward or external declaration: 'tandroidservice.ondestroy' [dcc error] unit1.pas(16): e2065 unsatisfied forward or external declaration: 'tandroidservice.onstart' 

your current option inherit java class , use jni call delphi , thread switch fmx thread.

my coderage 8 session (next week of time of writing) shows how activity. it's same process.

that won't now, other know can't inherit directly in delphi java class in delphi android, although in delphi ios can inherit objective-c class.


Comments

Popular posts from this blog

c++ - CryptStringToBinary API behavior -

c++ - Correct method for redrawing a layered window -

java.util.scanner - How to read and add only numbers to array from a text file -