HI Robert...
Below is the code....
**************************************
ConnectivityManager CM;
CM = (ConnectivityManager)mContext.getSystemService(Context.
CONNECTIVITY_SERVICE);
CM.reportInetCondition(CM.TYPE_MOBILE, 100);
NetworkInfo ni;
//CM.setNetworkPreference(0);
//CM.setMobileDataEnabled(true);
//CM.setRadio(0, true);
SystemClock.sleep(3000);
Intent broadcastIntent = new Intent();
broadcastIntent.setAction("ConnectivityManager.
CONNECTIVITY_ACTION");
if(broadcastIntent != null)
mContext.sendBroadcast(broadcastIntent);
ni = CM.getActiveNetworkInfo();
if (ni != null && ni.isConnectedOrConnecting())
Slog.e(TAG, "Network Connected .........................");
else
Slog.e(TAG, "Network Not Connected
.......................");
***************************************
Is the above code right way of doing?
I want apps to know that there is network.
I am able to connect to internet through browser but the network icons are
not up...
Using Android version gingerbread..
Any help in this regard will be grateful...
--------------
Regards
Vikas KM
http://arowboat.org
On Mon, Apr 30, 2012 at 9:22 PM, Robert Greenwalt <[email protected]>wrote:
> Can you explain yourself a bit more? How are you updating the
> connectiivtyManager? How is it returning null?
>
> On Wed, Apr 25, 2012 at 11:51 PM, Vikas KM <[email protected]> wrote:
>
>> Hi All,
>>
>> I am trying to update the connectivity Manager saying that internet is
>> available.. but its returning null.
>>
>> Any Help?
>>
>> --------------
>> Regards
>>
>>
>> Vikas KM
>>
>> --
>> unsubscribe: [email protected]
>> website: http://groups.google.com/group/android-porting
>>
>
>
--
unsubscribe: [email protected]
website: http://groups.google.com/group/android-porting