Emme Developer Well-Known Member Licensed User Longtime User Oct 28, 2017 #1 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 Code: Copy AddReceiverText(SendNotification, <intent-filter> <action android:name="android.net.wifi.STATE_CHANGE"/> </intent-filter>) Many thanks, i hope i clearly explained
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 Code: Copy AddReceiverText(SendNotification, <intent-filter> <action android:name="android.net.wifi.STATE_CHANGE"/> </intent-filter>) Many thanks, i hope i clearly explained
tigrot Well-Known Member Licensed User Longtime User Oct 28, 2017 #2 In fact connection is changing status frequently. I have a wi-fi router which can log wi-fi events and it writes a lot of them. Upvote 0
In fact connection is changing status frequently. I have a wi-fi router which can log wi-fi events and it writes a lot of them.
Emme Developer Well-Known Member Licensed User Longtime User Oct 28, 2017 #3 tigrot said: In fact connection is changing status frequently. I have a wi-fi router which can log wi-fi events and it writes a lot of them. Click to expand... Yes, there are some status when a connection is established DISCONNECTED/DISCONNECTED with bssid DISCONNECTED/DISCONNECTED CONNECTING/AUTHENTICATING CONNECTING/OBTAINING_IPADDR CONNECTED/CONNECTED Upvote 0
tigrot said: In fact connection is changing status frequently. I have a wi-fi router which can log wi-fi events and it writes a lot of them. Click to expand... Yes, there are some status when a connection is established DISCONNECTED/DISCONNECTED with bssid DISCONNECTED/DISCONNECTED CONNECTING/AUTHENTICATING CONNECTING/OBTAINING_IPADDR CONNECTED/CONNECTED
Emme Developer Well-Known Member Licensed User Longtime User Oct 28, 2017 #4 At this moment i use this solution, but is great if i can filter it in manifest Upvote 0
tigrot Well-Known Member Licensed User Longtime User Oct 30, 2017 #5 We have to write some statement, but at least it's feasible! Upvote 0
Emme Developer Well-Known Member Licensed User Longtime User Oct 30, 2017 #6 tigrot said: We have to write some statement, but at least it's feasible! Click to expand... Yes, but by a filter in manifest is possible to avoid the call of service many times Upvote 0
tigrot said: We have to write some statement, but at least it's feasible! Click to expand... Yes, but by a filter in manifest is possible to avoid the call of service many times