tags:

views:

100

answers:

1

Is there a way to enable or disable tethering (USB or wifi) on an android phone programmatically? Perhaps an API in android SDK or NDK or any even non-UI command to do that.

Thanks in advance.

+1  A: 

Take a look at this question.

Basically there are no public API's to do it. Take a look at the settings app to see how internal apps do it though. Might have some luck with that:

http://android.git.kernel.org/?p=platform/packages/apps/Settings.git;a=blob;f=src/com/android/settings/TetherSettings.java;h=b9245711306b90ff969385650da1287f9b7500b2;hb=HEAD

matto1990