Android 实时定位追踪器应用程序(使用 Firebase:fire:、Google Maps 和 Location Api):地球:
Android 实时定位追踪器应用程序(使用 Firebase:fire:、Google Maps 和 Location Api):地球:
This is a simple android app where you can brodcast your location and everyone who has your dynamically generated unique key can track you in near real-time.
I created this project just for learning puposes particularly about firebase (firestore db), google maps api and google location api.
To use google maps in an android app you can use SupportMapFragment or MapView
Add permisions for coase and fine location also add meta-data tag for API key
Add this gradle plugin 'com.google.gms:google-services:3.1.1' into dependencies block of the top-level gradle build file
Apply the google play services plugin in the app level gradle build file (app project)
Then you can add google play services library for maps, location, places etc. (firebase needs google play services to operate)
You need to download and add google-services.json file to your project_name/app/ directory from firebase console when you add an android app to your firebase project
Here are the complete figure
enter the app package name & SHA-1 key (optional for firebase auth)
Go to the google cloud console page and click credentials submenu (or Get API Key )
Then create a new credential
New API key has been created, you can copy the key and paste in the manifest file. To restrict access of the key click the restrict button
You can restrict api key usage by selecting the platform or IP address by which the api call would be requested (Application restrictions)
- To get SHA-1 key you can use your android studo by opening your particular project -> select signingReport gradle task -> copy & paste the SHA-1 key into the android app restriction form
暂无开放 Issues,或尚未同步最近议题。