Android Question Get new IP after network lapse automatically

persianpowerman1

Active Member
Licensed User
Longtime User
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
 

persianpowerman1

Active Member
Licensed User
Longtime User
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

NJDude

Expert
Licensed User
Longtime User
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:
Upvote 0

persianpowerman1

Active Member
Licensed User
Longtime User
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

persianpowerman1

Active Member
Licensed User
Longtime User
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
Cookies are required to use this site. You must accept them to continue using the site. Learn more…