Hi all!
Is there a way to get an intent only when wifi connect/disconnect event is handled?
I tried
android.net.conn.CONNECTIVITY_CHANGE action intent, and this works, but it is handled also when mobile data is actived/disactived
I tried also
android.net.wifi.supplicant.CONNECTION_CHANGE, but is handled two times when wifi disconnect and is not handled when wifi is connected..
Last action i tried is
android.net.wifi.STATE_CHANGE, but using the following code in manifest service is called many times. I have intent extra that send the state, so i can filter the state, but i want to know if is possibile to filter in manifest, in order to avoid call of service
AddReceiverText(SendNotification,
<intent-filter>
<action android:name="android.net.wifi.STATE_CHANGE"/>
</intent-filter>)
Many thanks, i hope i clearly explained