How to use an API on an Android Studio project?

Asked

Viewed 2,309 times

-1

Does anyone have any ideas about this, or can they explain it to me by giving an example? I looked on the net but everything was kind of clueless, so I came here to find out more. someone is able to answer please?

worth people..

  • Which API you use?

  • Each API is a case. "How to use" is also very generic. Ask a more specific question so we can help.

  • Well Pablo, is that I am new in android, so I have doubts about what is an api and how to use... that’s why I came here...

  • @Legolas How do you know you need an API? We need to know what you want to do to help.

1 answer

2

Google offers several Apis, for example:

If your application will work with maps, in your project (left side in android studio) go to Gradle Scripts and open the build.Radle file ("Modulo seu app"). At the end of this file has a dependences clause, within this clause you add the Apis you want to use, in our example would be

dependencies {
  ...
  compile 'com.google.android.gms:play-services-maps:9.4.0'
  ...
}

has other map Apis

com.google.android.gms:play-services-Location - to work with GPS

com.google.maps.android:android-maps-utils - to convert geographical coordinates into addresses and vice versa

Take a look at: https://developers.google.com/android/guides/setup

  • Thanks Edson...so an api is this? Thanks...now I know what it is and how to use it..

  • @Legolas First of all, welcome to Stack Overflow, glad you had a light on your problem, you just need to take a look at Tour from the site to see how the questions should be asked, so that they are always clear and someone can help you without asking any more questions

Browser other questions tagged

You are not signed in. Login or sign up in order to post.