Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Catalog · How the catalog works

Random project

CustomActivityAndListener

FMX: Custom Activity And Listener

View on GitHub

Anyone may press Interesting, signed in or not. It helps others find this project.

Member rating

No ratings yet.

Sign in to rate this project.

README

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