By Muzammil Esmail, Product Manager, Google for Work
The Admin SDK provides a comprehensive directory experience for Google for Work customers to help them meet specific business needs around data storage for customers. Here are some important updates to this SDK.
Custom attributes in the users profile
Now available is a new feature in the Directory API which allows you to add custom attributes for your users. For instance, you could store the projects your users work on, their desk number, job level, hiring date whatever makes sense for your business.
Once the custom attributes for your domain have been defined, they behave just like regular fields in the user profile. You can get and set them for your users and also perform searches on custom fields (e.g. all employees that work on the shinyNewApp in Hyderabad).
Custom attributes can be of different data types; they can be single- or multi-valued. You can configure whether they are public i.e. visible to everyone on the domain, or private i.e. visible only to admins and the users themselves.
Read access to all domain users
Historically, only admins have been able to access the data in the Admin SDK. Beginning today, any user (not just admins) will now be able to call the Directory API to read the profile of any user on the domain (of course, we will respect ACLing settings and profile sharing settings).
We hope that you will be able to use this new feature to build business applications (e.g. corporate yellow pages, expense approval, vacation management, workflow applications, etc.) that can be used by all your users.
Please feel free to go through our documentation to go learn more about the Admin SDK, and specifically the Directory API. Happy hacking!
Power User Menu of Windows 10 (and Windows 8) is a pop-up menu with shortcuts tosome usedful "Power User" Windows tools. You can easy access the "Old Control Panel" here.
To Open Power User Menu,
Right click the Start button, or
WIN+X: Pressing the WIN (Windows) key and the X key together.
Example modify from last example "Detect user click on InfoWindow, by implementing GoogleMap.OnInfoWindowClickListener()", to open DialogFragment with StreetViewPanoramaView when user click on InfoWindow.
public class MapsActivity extends AppCompatActivity implements OnMapReadyCallback, GoogleMap.OnMapClickListener, GoogleMap.OnMapLongClickListener, GoogleMap.OnMarkerDragListener, GoogleMap.InfoWindowAdapter {
private GoogleMap mMap;
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_maps); // Obtain the SupportMapFragment and get notified when the map is ready to be used. SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager() .findFragmentById(R.id.map); mapFragment.getMapAsync(this);
}
/** * Manipulates the map once available. * This callback is triggered when the map is ready to be used. * This is where we can add markers or lines, add listeners or move the camera. In this case, * we just add a marker near Sydney, Australia. * If Google Play services is not installed on the device, the user will be prompted to install * it inside the SupportMapFragment. This method will only be triggered once the user has * installed Google Play services and returned to the app. */ @Override public void onMapReady(GoogleMap googleMap) { mMap = googleMap; mMap.setOnMapClickListener(this); mMap.setOnMapLongClickListener(this); mMap.setOnMarkerDragListener(this); mMap.setInfoWindowAdapter(this); mMap.setOnInfoWindowClickListener(MyOnInfoWindowClickListener); }
@Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case R.id.menu_addmarkers: addMarker(); return true; case R.id.maptypeHYBRID: if(mMap != null){ mMap.setMapType(GoogleMap.MAP_TYPE_HYBRID); return true; } case R.id.maptypeNONE: if(mMap != null){ mMap.setMapType(GoogleMap.MAP_TYPE_NONE); return true; } case R.id.maptypeNORMAL: if(mMap != null){ mMap.setMapType(GoogleMap.MAP_TYPE_NORMAL); return true; } case R.id.maptypeSATELLITE: if(mMap != null){ mMap.setMapType(GoogleMap.MAP_TYPE_SATELLITE); return true; } case R.id.maptypeTERRAIN: if(mMap != null){ mMap.setMapType(GoogleMap.MAP_TYPE_TERRAIN); return true; } case R.id.menu_legalnotices: String LicenseInfo = GoogleApiAvailability .getInstance() .getOpenSourceSoftwareLicenseInfo(MapsActivity.this); AlertDialog.Builder LicenseDialog = new AlertDialog.Builder(MapsActivity.this); LicenseDialog.setTitle("Legal Notices"); LicenseDialog.setMessage(LicenseInfo); LicenseDialog.show(); return true; case R.id.menu_about: AlertDialog.Builder aboutDialogBuilder = new AlertDialog.Builder(MapsActivity.this); aboutDialogBuilder.setTitle("About Me") .setMessage("http://android-er.blogspot.com");
aboutDialogBuilder.setPositiveButton("visit", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { String url = "http://android-er.blogspot.com"; Intent i = new Intent(Intent.ACTION_VIEW); i.setData(Uri.parse(url)); startActivity(i); } });
aboutDialogBuilder.setNegativeButton("Dismiss", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { dialog.cancel(); } });
try{ lat = Double.parseDouble(strLat); }catch (NumberFormatException ex){ parsable = false; Toast.makeText(MapsActivity.this, "Latitude does not contain a parsable double", Toast.LENGTH_LONG).show(); }
try{ lon = Double.parseDouble(strLon); }catch (NumberFormatException ex){ parsable = false; Toast.makeText(MapsActivity.this, "Longitude does not contain a parsable double", Toast.LENGTH_LONG).show(); }
if(parsable){
LatLng targetLatLng = new LatLng(lat, lon); MarkerOptions markerOptions = new MarkerOptions().position(targetLatLng).title(strTitle);
//Add marker on LongClick position MarkerOptions markerOptions = new MarkerOptions().position(latLng).title(latLng.toString()); markerOptions.draggable(true);
mMap.addMarker(markerOptions); }
@Override public void onMarkerDragStart(Marker marker) { marker.setTitle(marker.getPosition().toString()); marker.showInfoWindow(); marker.setAlpha(0.5f); }
@Override public void onMarkerDrag(Marker marker) { marker.setTitle(marker.getPosition().toString()); marker.showInfoWindow(); marker.setAlpha(0.5f); }
@Override public void onMarkerDragEnd(Marker marker) { marker.setTitle(marker.getPosition().toString()); marker.showInfoWindow(); marker.setAlpha(1.0f); }