FMX: Custom Activity And Listener
Pascal
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
Library
TestApp
README.md

README.md

CustomActivityAndListener

Android runtime permissions (API23)

The activity contains the onRequestPermissionsResult event.

  1. Add the "Custom.jar" library to your project through "Project Manager".
  2. Connect the unit "CustomActivityEvent.pas" to the project.
  3. Implement the method "procedure onReceivePermissionsResult(const ASender: TObject; const AMessage: TMessage);" In the form class.
  4. Register method "TMessageManager.DefaultManager.SubscribeToMessage(TMessageResultPermissions, onReceivePermissionsResult);"
  5. Open the file "AndroidManifest.template.xml", find "com.embarcadero.firemonkey.FMXNativeActivity", replace with "com.embarcadero.firemonkey.CustomActivity".
  6. Done.

Tested: Delphi 10.1 Berlin +

FMX: Custom Activity And Listener for Android