问题
How to use broadcast receivers in Delphi XE5 Android? The documentation is very poor about the Delphi XE5 and Android integration.
回答1:
Currently there is no support in XE5 for broadcast receivers.
It is needed in order to get the BlueTooth API implemented, for example. Some attempts can be found here.
Update:
Markus Humm filed two QC requests to get this working.
QC 118435 Provide the ability to inherit from a Java class and
QC 118683 Provide Delphi side implementation for Android.BluetoothAdapter.
Vote for them!
回答2:
I've written a BroadcastReceiver plug-in for Delphi XE5 that provides such support. The plug-in does everything required to support BroadcastReceiver development during run-time.
See http://chuacw.ath.cx/blogs/chuacw/archive/2014/02/26/delphi-ide-broadcastreceiver-plug-in-for-android.aspx
来源:https://stackoverflow.com/questions/18891486/broadcast-receivers-in-delphi-xe5-android