当前位置: 首页>>代码示例>>Java>>正文


Java GooglePlayServicesNotAvailableException.printStackTrace方法代码示例

本文整理汇总了Java中com.google.android.gms.common.GooglePlayServicesNotAvailableException.printStackTrace方法的典型用法代码示例。如果您正苦于以下问题:Java GooglePlayServicesNotAvailableException.printStackTrace方法的具体用法?Java GooglePlayServicesNotAvailableException.printStackTrace怎么用?Java GooglePlayServicesNotAvailableException.printStackTrace使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.google.android.gms.common.GooglePlayServicesNotAvailableException的用法示例。


在下文中一共展示了GooglePlayServicesNotAvailableException.printStackTrace方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onCreate

import com.google.android.gms.common.GooglePlayServicesNotAvailableException; //导入方法依赖的package包/类
protected void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	
	// Log event
	Log.d(LOG_MAP_TAG, "MapActivity : onCreate() called.");
	
	// Set the content view with a google map fragment
	setContentView(R.layout.map_activity_main);
	
	// Create the fragments for the UI
	MapActivityEventListener eventListener = new MapActivityEventListener(this);
	gmapFragment = ((GoogleMapFragment) getFragmentManager().findFragmentById(R.id.map_fragment_googlemapfragment));
	gmapFragment.setGMapFragmentLoadedListener(eventListener);
	buildingFragment = new BuildingListDialog();
	buildingFragment.setOnBuildingSelectedListener(eventListener);
	
	// Prepare MapData
	mpd = new MapData(this);
	
	// Initialize the gms maps services
	try {
		MapsInitializer.initialize(this);
	} catch (GooglePlayServicesNotAvailableException e) {
		e.printStackTrace();
	}
}
 
开发者ID:Purdue-ACM-SIGAPP,项目名称:Purdue-App-Old,代码行数:27,代码来源:MapActivity.java

示例2: showMap

import com.google.android.gms.common.GooglePlayServicesNotAvailableException; //导入方法依赖的package包/类
private void showMap(Bundle savedInstanceState) {
  try {
    MapsInitializer.initialize(getBaseContext());
  } catch (GooglePlayServicesNotAvailableException e) {
    e.printStackTrace();
  }
  GoogleMapOptions options = new GoogleMapOptions();
  options.mapType(GoogleMap.MAP_TYPE_NORMAL);
  options.zoomControlsEnabled(true);
  mapView = new MapView(this, options);
  mapView.onCreate(savedInstanceState);
  mapView.onResume();
  mapView.setEnabled(true);
  googleMap = mapView.getMap();
  if (googleMap != null) {
    googleMap.setMyLocationEnabled(true);
  }
  mapLayout.addView(mapView);
}
 
开发者ID:eggheadcreative,项目名称:GeoFencingDemo,代码行数:20,代码来源:LocationActivity.java

示例3: onActivityCreated

import com.google.android.gms.common.GooglePlayServicesNotAvailableException; //导入方法依赖的package包/类
@Override
public void onActivityCreated(Bundle savedInstanceState) {
	super.onActivityCreated(savedInstanceState);
	try {
		initializeMap();
	} catch (GooglePlayServicesNotAvailableException e) {
		e.printStackTrace();
	}
	setTitle();

}
 
开发者ID:himanshuagarwal77225,项目名称:BookMySkills,代码行数:12,代码来源:MyHomeFragment.java

示例4: onCreateView

import com.google.android.gms.common.GooglePlayServicesNotAvailableException; //导入方法依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
		Bundle savedInstanceState) {
	// Inflate the layout containing a title and body text.
	ViewGroup rootView = (ViewGroup) inflater.inflate(R.layout.view_report,
			container, false);
	mView = new ViewReportView(rootView, getActivity());

	mReports = new ListReportModel();
	mView.mMapView.onCreate(savedInstanceState);
	if (mCategoryId > 0) {
		mReports.loadReportByCategory(mCategoryId);
	} else {
		mReports.load();
	}

	// Get GoogleMap from MapView
	mMap = mView.mMapView.getMap();

	try {
		MapsInitializer.initialize(getActivity());
	} catch (GooglePlayServicesNotAvailableException e) {
		e.printStackTrace();
	}

	// Initialize views with report data. This also handles map
	// initialization
	initReport(mPageNumber);
	fetchComments();

	// Set the title view to show the page number.

	mView.setPageIndicator(getString(R.string.title_template_step,
			mPageNumber + 1, mReports.getReports().size()));

	return rootView;
}
 
开发者ID:ais-albania,项目名称:ZalartAndroid,代码行数:38,代码来源:ViewReportFragment.java

示例5: onMapReady

import com.google.android.gms.common.GooglePlayServicesNotAvailableException; //导入方法依赖的package包/类
public void onMapReady() {
	
	initPosition=new LatLng(-4.257399,15.283935);
	
	gmap=mapv.getMap();
	gmap.setMapType(GoogleMap.MAP_TYPE_NORMAL);
	gmap.getUiSettings().setCompassEnabled(true);
	try{
		MapsInitializer.initialize(this.getSherlockActivity());
	}catch(GooglePlayServicesNotAvailableException e){
		e.printStackTrace();
	}
	//Move the camera instantly to initial position with a zoom of 17.
	gmap.moveCamera(CameraUpdateFactory.newLatLngZoom(initPosition, 30));
	// Zoom in, animating the camera.

	gmap.animateCamera(CameraUpdateFactory.zoomTo(30), 200, null); 
	//Initialize the marker
	marker=gmap
			.addMarker(new MarkerOptions()
			.title("Brazzaville")
			.visible(true).position(initPosition)
			.icon(BitmapDescriptorFactory.fromResource(R.drawable.ic_action_location)));

	gmap.animateCamera(CameraUpdateFactory.zoomTo(12), 2000, null); 

	setUpMap();

}
 
开发者ID:JCERTIFLab,项目名称:jcertif-android-2013,代码行数:30,代码来源:MapEventFragment.java


注:本文中的com.google.android.gms.common.GooglePlayServicesNotAvailableException.printStackTrace方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。