Seems that this would work, but I am trying to get around the phone
waking up every time it receives a state changed event. Can this be
done, ie create a user defined event that I can listen for? Thanks for
the response.
-Ryan
On Oct 8, 9:39 pm, Roman ( T-Mobile USA) roman.baumgaert...@t-
mobile.com wrote:
Try to implement the following
+ use the NetworkInfo on your connection to find out about your
current connection (whether it's Wifi or Mobile)
+ implement a broadcast receiver and listen to
NETWORK_STATE_CHANGED_ACTION events
When you receive the network state change event and you have a valid
IP address, send an intent to your application.
The function above should be implemented as a service.
--
Roman Baumgaertner
Sr. SW Engineer-OSDC
·T· · ·Mobile· stick together
The views, opinions and statements in this email are those of the
author solely in their individual capacity, and do not necessarily
represent those of T-Mobile USA, Inc.
On Oct 8, 12:13 am,RyanBertiryanbertiw...@gmail.com wrote:
Hello,
I'm very new to the boards, and I have a question about the
connectivity manager but didn't see it discussed in my searches. I am
doing research on the possibility of producing a background
application that is woken up when an ad-hoc wifi network is in range.
I understand how to create a network of this type, but my problem lies
in the acknowledgment of a network of this type without busy waiting.
I have recently discovered that applications have to ability to be
woken up by broadcast intents, where the app is declared as a
received in the manifest file. The one that interests me is the
ConnectiviyManager.CONNECTIVITY_ACTION. From what I understand, this
event is broadcasts when the device switches networks. I am wondering
if this functionality can be modified so that the event is sent out
when new wireless (preferably ad-hoc) networks are in range.
It seems like I could accomplish this by having my phone connect to
these type of networks automatically, but I'm not sure how to go about
this either. I am very interested in what everyone has to say. Thanks!
-RyanBerti
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---