We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this questionI read somewhere that all default android applications where opensource.
If this is true, I am trying to find the Google Maps code. Can anyone tell me how I might find it?
Nope
You might want to use Maps API in your application.
Although Android itself is open-source Googles propritary apps are closed source for obvious security and intellectual property reasons.
These proprietary apps include the following:
- Maps
- Navigation
- YouTube
- GMail
If you want to utilize these apps in their provided state you can trigger them using intents.
Each application will require parameters in the intent uri or extra parameters, however examples of these are easy to find.
check in github may be you find a solution there
https://github.com/googlemaps
and you should install these two packages first Google Play Services Google Repository then try to add this fragment in your layout
<fragment
android:id="@+id/mapView"
android:name="com.google.android.gms.maps.MapFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
and then you should add this method to initialise the map
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());
}
}
https://github.com/glennsayers/AndroidMapsTutorial
If you work in Eclipse, use the download manager to download these plugins:
- http://adt-addons.googlecode.com/svn/trunk/source/com.android.ide.eclipse.source.update
- http://adt-addons.googlecode.com/svn/trunk/binedit/com.android.ide.eclipse.binedit.update
They give you access to Android source platform and many applications.
精彩评论