I must be completely ignorant, I can't seem to implement a android broadcastreceiver "OnReceive" event in Delphi. Either there is a big hole in it, or much more likely, That feature just isn't demonstrated/documented anywhere. I can instantiate all android classes, I cant attach to any events.

Comments

  1. Ярослав Бровин Yeah, I know about injecting some Java in. I was referring to Delphi code and the limitation of the Java Bridge stuff, as compared to the Objective-C Bridge, say.
    I haven't checked, but assuming your suggeston to deploy the dex file means ship it, say, in the assets directory, will the manifest accept it? I can't recall right now if the receiver class would need to be present from the off or not.
    When I loaded a custom dex file in a deployed .jar, writing Bridge classes as per the SDK imports in the RTL wouldn't work - you need to take additional steps to load the thing and map onto the loaded classes.

    ReplyDelete
  2. CHUA Chee Wee It is neither. My comment was in the context of activity results which, for the main activity, requires inheriting from the FMX activity. To inherit from the Java class you need to reference the class - i.e. link against its .jar, which we don't have available to us.
    So this required me to de-compile classes.dex, which I took to be a likely transgression of the license agreement. Until they say it's fine, I therefore can't distribute the example. All I can do is enjoy the fact that it "works for me"

    ReplyDelete

Post a Comment