Skip to content

Instantly share code, notes, and snippets.

@jhurlbut
Created August 10, 2015 17:47
Show Gist options
  • Select an option

  • Save jhurlbut/6c2c4dd7eb98ebda1b67 to your computer and use it in GitHub Desktop.

Select an option

Save jhurlbut/6c2c4dd7eb98ebda1b67 to your computer and use it in GitHub Desktop.
Tango permissions
public static final String EXTRA_KEY_PERMISSIONTYPE = "PERMISSIONTYPE";
public static final String EXTRA_VALUE_VIO = "MOTION_TRACKING_PERMISSION";
public static final String EXTRA_VALUE_VIOADF = "ADF_LOAD_SAVE_PERMISSION";
// The unique request code for permission intent.
private static final int PERMISSION_REQUEST_CODE = 0;
protected void onResume(){
super.onResume();
Intent intent1 = new Intent();
intent1.setAction("android.intent.action.REQUEST_TANGO_PERMISSION");
intent1.putExtra(EXTRA_KEY_PERMISSIONTYPE, EXTRA_VALUE_VIO);
startActivityForResult(intent1, 0);
Intent intent2 = new Intent();
intent2.setAction("android.intent.action.REQUEST_TANGO_PERMISSION");
intent2.putExtra(EXTRA_KEY_PERMISSIONTYPE, EXTRA_VALUE_VIOADF);
startActivityForResult(intent2, 0);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment