1

I'm trying get the custom intent from the java part of my software. In java part, I have an broadcastreciever, it make an intent and send it as broadcast:

  Intent i = new Intent();
    i.setAction(CUSTOM_INTENT);
    context.sendBroadcast(i);

In delphi app(I use Delphi RIO 10.3.3) in manifest file i have:

<intent-filter>
     <action android:name="com.cynicrus.custom.intent.action.TEST"></action>
     <category android:name="android.intent.category.DEFAULT" />
</intent-filter>

On create application form i have:

  MainActivity.registerIntentAction(StringToJString(TEST_INTENT));
  TMessageManager.DefaultManager.SubscribeToMessage(TMessageReceivedNotification, HandleActivityMessage);

TEST_INTENT in Delphi = Custom_Intent in java and = com.cynicrus.custom.intent.action.TEST. But, whatever I try, the handler HandleActivityMessage isn't call. How I can send the custom intent action from the java to delphi and get it in delphi? Thank you!

  • 1
    Please don't redundantly repeat the tags in the title. Tags work extremently well here and don't need any help, and they add useless clutter to the title. It's also much better to be more clear in the title, as it both gets you an answer faster and provides more information to future readers scanning a list of search results looking for a solution to their problem. Using meaningless phrases like *Handle* is unclear, for instance; what does *handle* mean? – Ken White Apr 25 '20 at 20:33
  • Thanks for the advice, I will definitely use them. – user1314464 Apr 25 '20 at 21:04

0 Answers0