rtchagas / pingplacepicker

An almost plug and play replacement for Google's Place Picker
Apache License 2.0
142 stars 55 forks source link

Should update the steps 2020. Because the steps don't work. #75

Open eDR10x opened 4 years ago

eDR10x commented 4 years ago

Hello @rtchagas I follow the steps in kotlin. But don´t work. I have config the API for Android with package name app and SHA-1 debug. Also so i have Apis key for maps, for only the 3 apis: Static, Geocoding, Places.

So in your manifest sample you don´t have permision list like: "uses-permission android:name="android.permission.INTERNET" "uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" "uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" "uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" "uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"

In yor meta tag, the value "key_google_apis_android" is for API key Android. NO FOR API MAPS, like key_google_apis_maps.

//meta-data// android:name="com.google.android.geo.API_KEY" android:value="@string/key_google_apis_android"/> i suppost here should be "key_google_apis_maps" no android API.

///////////////////////////////////////////////////////////////////////////////////////// And in the grade build of your sample. Yo don't put the the dependency

        // PING Place Picker
        implementation 'com.github.rtchagas:pingplacepicker:2.0.+'

there is dependencies { // Places library implementation 'com.google.android.libraries.places:places:2.0.0' but no // PING Place Picker dependency.

And when start the project, This close when i make click in the button Ping!

rtchagas commented 4 years ago

Hello @eDR10x

I should disagree with you. The steps are working fine. I actually run the sample project before each release.

We don't need to manually add the permissions to the sample manifest. The permissions are added automatically by the dependencies that PING currently depends on.

If you check the merged manifest file at _sample/build/intermediates/mergedmanifests/debug/AndroidManifest.xml you can see the permissions there.

The sample is refering to the Android API key in the metadata.

    <meta-data
        android:name="com.google.android.geo.API_KEY"
        android:value="@string/key_google_apis_android"/>

It is up to you, developer, to put the correct key @string/key_google_apis_android. I'm not going to expose an API key on GitHub.

At last, we don't need to add the PING dependency to the sample as we're doing that with

        implementation project(':library')

If the app is closing when you click on PING! please file a new bug with the exception.

But I can tell you that the sample now is working fine. It is just a matter of correctly configuring the API keys.

eDR10x commented 4 years ago

Ok thanks @rtchagas for explain it. But now I continue trying for days and now get numbers like: 3° 45' 54" S, 73° 15' 20" E. and NO GET the Address Name when select the location. But jut one time appeared the nearby places and so i select any Nearby place like location , show the name address of nearby place. Just appeared nearby place, one time.

My API ANDROID is good, restricted with my app (package name, and sha-1 debug) and the API MAPS is good (geocodng, place, maps static) you can check in the screenshot bellow. Also I put config.xml in values folder like that: <?xml version="1.0" encoding="utf-8"?>

true true true false

but How enable it? or this enable automatically? which is the problem? Help me friend I need ping place picker. Thanks in advanced 00_apis 01_manifest 02_my apis 03