It appears that when using Delphi 10.3 and targeting the latest Android API (26) the following call no longer works: MainActivity.registerIntentAction(TJIntent.JavaClass.ACTION_VIEW);
The exception is raise 'java.lang.UnsupportedOperationException'.
This was required when facilitating the handling the opening of an associated file using an <intent-filter> within the AndroidManifest.template.xml. The full code sequence is as follows:
// Register the type of intent action that we want to be able to receive.
// Note: A corresponding <action> tag must also exist in the <intent-filter> section of AndroidManifest.template.xml.
MainActivity.registerIntentAction(TJIntent.JavaClass.ACTION_VIEW);
TMessageManager.DefaultManager.SubscribeToMessage(TMessageReceivedNotification, HandleActivityMessage);
I've had the same challenge when running the AndroidIntents project from the supplied Samples.
Has anyone else encountered this and managed to solve for it?