Is it possible to listen for other apps intents?

158 Views Asked by At

I'm trying to understand if it is possible to listen or catch other apps intents? I have two apps. App A and App B. I would like to transmit information using nfc/android beam from app A to app B and to app A on other phone. User can have both A and B apps installed or just one B app installed. Currently I have semi nfc solution working with simple manifest intent filter:

    <intent-filter>
        <action android:name="android.nfc.action.NDEF_DISCOVERED" />
        <category android:name="android.intent.category.DEFAULT" />
        <data android:mimeType="text/plain" />
    </intent-filter>

Only problem with this approach emulated NFC tag on other phone works 1 out of 50 times. Not very reliable, I don't know why it does not get NFC tag every time I put together two phones.

Right now I'm trying android beam solution, which reacts every time I put phones together. But the problem is that android beam nfc intent opens only Application A and if there is not application A installed it tries to open Play store. I found out that android beam sends tag with two record:

  1. Record 1 - http:// play.google.com/store/apps/details?id=com.whatsapp
  2. Record 2 com.whatsapp

Main main question is, how to filter for in my application B for application A intents? Can I just write in different application packages names?

0

There are 0 best solutions below