Adding a new network bearer to Android

AndroidWifiNetwork Protocols3gAndroid Source

Android Problem Overview


I'd like to add new bearer(s) to Android (rooted/custom build), to be a peer with Wifi and GPRS.

I have done some Android development and I am aware that (in Android 2.2) there are constants for WIFI and GPRS. Does this mean that I will need to be adding constants in all over the place, as well as providing the network stack?

The first bearer I want to add is USBNet (for Androids with USB host).

Another will be a 3G USB dongle as a second GPRS bearer.

I have started by downloading the source.

Android Solutions


Solution 1 - Android

WIFI add network will be you can take hints from this code..

how do we get the access point name from an Android Phone.

WifiManager mWiFiManager = (WifiManager) getSystemService(Context.WIFI_SERVICE);
WifiInfo w = mWiFiManager.getConnectionInfo();
Toast.makeText(this, "APN Name = "+w.getSSID(), Toast.LENGTH_SHORT).show();

The above code snippet is for current active APN name.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionfadedbeeView Question on Stackoverflow
Solution 1 - AndroidVarun kumarView Answer on Stackoverflow