Skip to content

Error on build #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
DorAlter opened this issue Dec 8, 2024 · 1 comment
Open

Error on build #2

DorAlter opened this issue Dec 8, 2024 · 1 comment

Comments

@DorAlter
Copy link

DorAlter commented Dec 8, 2024

I am getting the following error on build:
Android_HCE_Emulate_A_CreditCard/app/src/main/java/de/androidcrypto/android_hce_emulate_a_creditcard/HceCcEmulationServiceBasic.java:45: Error: The intent action HceCcEmulatorService (used to send a broadcast) matches the intent filter of a non-exported receiver, registered via a call to Context.registerReceiver, or similar. If you are trying to invoke this specific receiver via the action then you should use Intent.setPackage(<APPLICATION_ID>). [UnsafeImplicitIntentLaunch]
Intent intent = new Intent("HceCcEmulatorService");
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

@DorAlter
Copy link
Author

DorAlter commented Dec 8, 2024

It can be fixed by adding this line under Intent intent = new Intent("HceCcEmulatorService"):
intent.setPackage(getPackageName());

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant