How to use 3G in an android app

Hello,

Current developping a game on android that requires connectivity.

The chat (server/client) examples work fine when connected to WIFI but not in 3-4G mode.

To make this work, I need to access the WifiManager class in Android and the only way to do that is to have access to the Android “Activity” class that should be used when starting an android app.

I cant find that.

Looking at this code:

wifiManager = (WifiManager) this.getSystemService(Context.WIFI_SERVICE);

The “this.getSystemService” is a method in the Activity class (Use for a whole bunch of Android device related stufff).

My question is, can I access the underlying Android harness/activity.

P.S.

I know this sacrifices multi-platform-ness so if you also have a way to access the Iphone harness I am also interested.

Thank you!

Edit: Added usefull link