Skip to content

Instantly share code, notes, and snippets.

@lucacesari
Created August 7, 2015 14:53
Show Gist options
  • Save lucacesari/854254aeed41ccad79b1 to your computer and use it in GitHub Desktop.
Save lucacesari/854254aeed41ccad79b1 to your computer and use it in GitHub Desktop.
Open Android USB Tethering Configuration
/*
* This content is released under the MIT License (http://opensource.org/licenses/MIT).
* Copyright (c) 2015 Luca Cesari <luc@cesari.me>
*/
package lucacesari.gists;
import android.app.Activity;
import android.content.Intent;
public class UsbTetheringUtil {
private UsbTetheringUtil(){}
public static void showUsbTetheringConfiguration(final Activity activity, final int code) {
final Intent intent = new Intent();
intent.setClassName("com.android.settings", "com.android.settings.TetherSettings");
activity.startActivityForResult(intent, code);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment