I have two Android applications A1 and A2.
Both applications are started and presenting respectively an activity B1 and B2 on the screen.
Application A1 is in foreground. Application A2 is in background.
Both are using the device's barcode reader.
Activities B1 and B2 are capable of receiving broadcast messages from the barcode reader.
The applications use the Java package android.content.BroadcastReceiver.
Here is what I do:
- In the first application
A1, I scan a barcode. - The barcode value is printed in a view on the screen
B1in applicationA1. - My problem is that it is also printed in a view on the screen
B2in the second applicationA2.
When I scanned the barcode in the application A1, it also entered the "onReceive()" method in the application A2. The second application received the broadcast messages from the first application.
My question is: how can I make the second application A2 ignore the broadcast messages from other applications?
Please ask for more details if needed.
Thanks.