How to accept only intents from a particular app on Android

Hi,
It has been confirmed that when some apps send a malicious intent to my app, the string is saved in a local file.
As a countermeasure, I want to control to receive only intents from a specific application.
Do you know any solution?

example: sending an intent

private void sendBroadcast(){
    Intent intent = new Intent();
    intent.setAction("com.android.vending.INSTALL_REFERRER");
    intent.setClassName("net.myapp.test","host.exp.exponent.referrer.InstallReferrerReceiver");
    intent.putExtra("referrer","TEST"); sendBroadcast(intent);
}

saved local file
/shared_prefs/host.exp.exponent.SharedPreferences.xml
<string name="referrer">TEST</string>

SDK Version: 38 or 39
Platform: Android

thanks.