开发者

Can I get the source code for Android's Google Maps app? [closed]

开发者 https://www.devze.com 2023-04-04 04:17 出处:网络
Closed. This question is seeking recommendations for books, 开发者_开发百科tools, software libraries, and more. It does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed. This question is seeking recommendations for books, 开发者_开发百科tools, software libraries, and more. It does not meet Stack Overflow guidelines. It is not currently accepting answers.

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 question

I 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消