[android-beginners] Re: How to detect the availability of networks programatically in andriod emulator?

2009-09-08 Thread Roman ( T-Mobile USA)

I would recommend to play around with the service which Android
currently supports for data connectivity.


private String mWifiService= Context.WIFI_SERVICE;
private String mTelephonyService   = Context.TELEPHONY_SERVICE;
private String mConnectionService  = Context.CONNECTIVITY_SERVICE;


Try to write an application which implements a broadcast receiver to
get familiar with the events for the different radios. You find many
blogs and tutorials about how to write a broadcast receiver.

Make sure that you update your manifest file with the permissions and
the broadcast receiver.

Permissions:

   uses-permission android:name=android.permission.CALL_PHONE /
   uses-permission
android:name=android.permission.PROCESS_OUTGOING_CALLS/
   uses-permission android:name=android.permission.READ_PHONE_STATE/

   uses-permission
android:name=android.permission.ACCESS_NETWORK_STATE/
   uses-permission
android:name=android.permission.CHANGE_NETWORK_STATE/
   uses-permission
android:name=android.permission.ACCESS_WIFI_STATE/
   uses-permission
android:name=android.permission.CHANGE_WIFI_STATE/

Dependent on the functionality you want to support you might have to
add some more permissions.

In general Android can only be connected with one network at the same
time, which makes your application pretty easy. If you want to display
the available networks, this is a different story.


--
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 Sep 7, 8:08 pm, andymoris andymori...@gmail.com wrote:
 I am trying to implement the application which listens the
 availability of networks in emulator or real T mobile device later on.
 For example, the application shows all availabe network such as wifi,
 LAN and public networks
 According to the connection/disconnections, it only have to show
 current connected networks available at all time.

 I have found wifiManager in SDK but i can't find for 3G.

 plese, give me some suggestions/ sample prg to start up writing above
 program as I am quite new to this platform.

 your reply would be much appreciated.

 Thanks all in advance.

 Andy
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Beginners group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: How to detect the availability of networks programatically in andriod emulator?

2009-09-08 Thread andriod learner
Hi yes,

I would like to correct prior questions for it only have to show
current connected
networks available at all time.

The correction is as follows:

It is just to show current available networks which user can have right to
disable/enable the networks.
if User disable/enable networks, the application itself have to show only
visible networks available in the current place.

So, i think, do i have to use thread to listen always for networks available
in case the user shift from one place to another, there will be another
network avaible and the network in previous places cant be seen in the
network list in current place.

Many Thanks again.


Regards,
Andy



On Wed, Sep 9, 2009 at 10:26 AM, andriod learner andymori...@gmail.comwrote:

 Hi Roman,

 Thanks for your useful information.
 I will try 1st.

 Andy


 On Wed, Sep 9, 2009 at 7:22 AM, Roman ( T-Mobile USA) 
 roman.baumgaert...@t-mobile.com wrote:


 I would recommend to play around with the service which Android
 currently supports for data connectivity.


private String mWifiService= Context.WIFI_SERVICE;
private String mTelephonyService   = Context.TELEPHONY_SERVICE;
private String mConnectionService  = Context.CONNECTIVITY_SERVICE;


 Try to write an application which implements a broadcast receiver to
 get familiar with the events for the different radios. You find many
 blogs and tutorials about how to write a broadcast receiver.

 Make sure that you update your manifest file with the permissions and
 the broadcast receiver.

 Permissions:

   uses-permission android:name=android.permission.CALL_PHONE /
   uses-permission
 android:name=android.permission.PROCESS_OUTGOING_CALLS/
   uses-permission android:name=android.permission.READ_PHONE_STATE/
 
   uses-permission
 android:name=android.permission.ACCESS_NETWORK_STATE/
   uses-permission
 android:name=android.permission.CHANGE_NETWORK_STATE/
   uses-permission
 android:name=android.permission.ACCESS_WIFI_STATE/
   uses-permission
 android:name=android.permission.CHANGE_WIFI_STATE/

 Dependent on the functionality you want to support you might have to
 add some more permissions.

 In general Android can only be connected with one network at the same
 time, which makes your application pretty easy. If you want to display
 the available networks, this is a different story.


 --
 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 Sep 7, 8:08 pm, andymoris andymori...@gmail.com wrote:
  I am trying to implement the application which listens the
  availability of networks in emulator or real T mobile device later on.
  For example, the application shows all availabe network such as wifi,
  LAN and public networks
  According to the connection/disconnections, it only have to show
  current connected networks available at all time.
 
  I have found wifiManager in SDK but i can't find for 3G.
 
  plese, give me some suggestions/ sample prg to start up writing above
  program as I am quite new to this platform.
 
  your reply would be much appreciated.
 
  Thanks all in advance.
 
  Andy
 



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Beginners group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: How to detect the availability of networks programatically in andriod emulator?

2009-09-08 Thread andriod learner
Hi Roman,

Thanks for your useful information.
I will try 1st.

Andy

On Wed, Sep 9, 2009 at 7:22 AM, Roman ( T-Mobile USA) 
roman.baumgaert...@t-mobile.com wrote:


 I would recommend to play around with the service which Android
 currently supports for data connectivity.


private String mWifiService= Context.WIFI_SERVICE;
private String mTelephonyService   = Context.TELEPHONY_SERVICE;
private String mConnectionService  = Context.CONNECTIVITY_SERVICE;


 Try to write an application which implements a broadcast receiver to
 get familiar with the events for the different radios. You find many
 blogs and tutorials about how to write a broadcast receiver.

 Make sure that you update your manifest file with the permissions and
 the broadcast receiver.

 Permissions:

   uses-permission android:name=android.permission.CALL_PHONE /
   uses-permission
 android:name=android.permission.PROCESS_OUTGOING_CALLS/
   uses-permission android:name=android.permission.READ_PHONE_STATE/
 
   uses-permission
 android:name=android.permission.ACCESS_NETWORK_STATE/
   uses-permission
 android:name=android.permission.CHANGE_NETWORK_STATE/
   uses-permission
 android:name=android.permission.ACCESS_WIFI_STATE/
   uses-permission
 android:name=android.permission.CHANGE_WIFI_STATE/

 Dependent on the functionality you want to support you might have to
 add some more permissions.

 In general Android can only be connected with one network at the same
 time, which makes your application pretty easy. If you want to display
 the available networks, this is a different story.


 --
 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 Sep 7, 8:08 pm, andymoris andymori...@gmail.com wrote:
  I am trying to implement the application which listens the
  availability of networks in emulator or real T mobile device later on.
  For example, the application shows all availabe network such as wifi,
  LAN and public networks
  According to the connection/disconnections, it only have to show
  current connected networks available at all time.
 
  I have found wifiManager in SDK but i can't find for 3G.
 
  plese, give me some suggestions/ sample prg to start up writing above
  program as I am quite new to this platform.
 
  your reply would be much appreciated.
 
  Thanks all in advance.
 
  Andy
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Beginners group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---