P persianpowerman1 Active Member Licensed User Longtime User Oct 19, 2013 #1 Guys... i wana make an app that immediately tells me my new IP when an old one has changed due to a possible network lapse... so is there anything that can detect network state or a change in the network state etc???.. like how we have Phone state when its ringing... something like that? ?? it'll help when i need to use the B4A bridge. ... so i dont have to keep checking the phone IP.. and see if it's changed or still the same YO!han
Guys... i wana make an app that immediately tells me my new IP when an old one has changed due to a possible network lapse... so is there anything that can detect network state or a change in the network state etc???.. like how we have Phone state when its ringing... something like that? ?? it'll help when i need to use the B4A bridge. ... so i dont have to keep checking the phone IP.. and see if it's changed or still the same YO!han
NJDude Expert Licensed User Longtime User Oct 19, 2013 #2 You will have to create a service that periodically checks your IP and display a message, notification, etc if the IP changes, read THIS to get an idea. Last edited: Oct 20, 2013 Upvote 0
You will have to create a service that periodically checks your IP and display a message, notification, etc if the IP changes, read THIS to get an idea.
P persianpowerman1 Active Member Licensed User Longtime User Oct 19, 2013 #3 yes buddy... thats exactly what i thought of but.. imagine occupying processor time with continuously having to check when the IP changed. ... when actually all we would need is a raising of an event when the Network has come back.. or re established...??? do u get what im trying to find here... Is if theres any way in b4a for us to get that state_change_in_network? ?? possible? ? any idea??... and yeah obviously use it in a service Upvote 0
yes buddy... thats exactly what i thought of but.. imagine occupying processor time with continuously having to check when the IP changed. ... when actually all we would need is a raising of an event when the Network has come back.. or re established...??? do u get what im trying to find here... Is if theres any way in b4a for us to get that state_change_in_network? ?? possible? ? any idea??... and yeah obviously use it in a service
NJDude Expert Licensed User Longtime User Oct 19, 2013 #4 Well, you still will have to keep checking for a change, besides, you are going to be using that while coding so, just plug your device to your charger or USB to keep the juice flowing and regarding processor time, it will be just one more service running along the tons running in your device, why worry? Last edited: Oct 19, 2013 Upvote 0
Well, you still will have to keep checking for a change, besides, you are going to be using that while coding so, just plug your device to your charger or USB to keep the juice flowing and regarding processor time, it will be just one more service running along the tons running in your device, why worry?
P persianpowerman1 Active Member Licensed User Longtime User Oct 19, 2013 #5 oh ok... then cool.. so will open a service. .. / widget. .. will let u know how that worked out... ok.. so to round up ... you still feel theres no way a new network re established can be detected ?? Upvote 0
oh ok... then cool.. so will open a service. .. / widget. .. will let u know how that worked out... ok.. so to round up ... you still feel theres no way a new network re established can be detected ??
NJDude Expert Licensed User Longtime User Oct 19, 2013 #6 There's a way to detect if you are connected to WiFi or 3G/4G (search the forums if you want more info), but in either case the IP will change, so, checking for a different IP will do the trick. Upvote 0
There's a way to detect if you are connected to WiFi or 3G/4G (search the forums if you want more info), but in either case the IP will change, so, checking for a different IP will do the trick.
P persianpowerman1 Active Member Licensed User Longtime User Oct 19, 2013 #7 ok! .. smart! .. will do some reading and write back... thanx again YO!han Upvote 0
P persianpowerman1 Active Member Licensed User Longtime User Oct 20, 2013 #8 hey NJ... look what i found online. ... but its a bouncer for me..! how could you use this to incorporate a code for an app made with B4A that could do the above (detect network change state) ?? what say possible?? Upvote 0
hey NJ... look what i found online. ... but its a bouncer for me..! how could you use this to incorporate a code for an app made with B4A that could do the above (detect network change state) ?? what say possible??
P persianpowerman1 Active Member Licensed User Longtime User Oct 20, 2013 #9 viralpatel.net/blogs/android-internet-connection-status-network-change/ Upvote 0