please, how to use broadcastReceiver correctly with Intent filters. In my android_manifest.xml file, I have the following lines:
<activity android:name=".DataDisplayActivity" android:theme="@android:style/Theme.Holo.NoActionBar" android:icon="@drawable/icon_3d" android:label="AdvancedHyperXPositiveSuperFluousApp"> <intent-filter> <action android:name="com.simekadam.blindassistant.UPDATE_GPS_UI"/> <action android:name="com.simekadam.blindassistant.UPDATE_CONTEXT_UI"/> </intent-filter> <intent-filter > <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity>
And in this exercise, I installed the receiver using this function
registerReceiver(broadcastReceiver, null);
It does not work in null, obvi needs to set IntentFilter, and I can add it as a function parameter, but I ask how to use it with XML intent filters. Thanks for your help.
Teaser: I really got it working with a built-in intent, but I ask how to get it to work with the intent set in XML.
source share