我在某处读到了所有默认的android应用程序,其中包含opensource。
如果是这样,我正在尝试查找Google地图代码。谁能告诉我怎么会找到它?
答案 0 :(得分:35)
答案 1 :(得分:2)
虽然Android本身是开源的Googles propritary应用程序是明显的安全和知识产权原因的封闭源。
这些专有应用程序包括以下内容:
如果您想在提供的状态下使用这些应用,可以使用意图触发它们。
每个应用程序都需要intent uri或extra参数中的参数,但是这些参数的例子很容易找到。
答案 2 :(得分:-2)
如果您在Eclipse中工作,请使用下载管理器下载这些插件:
它们可让您访问Android源平台和许多应用程序。
答案 3 :(得分:-2)
签入github可能是你找到了解决方案
你应该先安装这两个包 Google Play服务 Google Repository 然后尝试在布局中添加此片段
<fragment
android:id="@+id/mapView"
android:name="com.google.android.gms.maps.MapFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
然后你应该添加这个方法来初始化地图
private void createMapView(){
try {
if(null == googleMap){
googleMap = ((MapFragment) getFragmentManager().findFragmentById(
R.id.mapView)).getMap();
/**
* If the map is still null after attempted initialisation,
* show an error to the user
*/
if(null == googleMap) {
Toast.makeText(getApplicationContext(),
"Error creating map",Toast.LENGTH_SHORT).show();
}
}
} catch (NullPointerException exception){
Log.e("mapApp", exception.toString());
}
}