Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
eDR10x opened this issue Jun 6, 2020 · 2 comments
Open

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

eDR10x opened this issue Jun 6, 2020 · 2 comments
Assignees
Labels
invalid This doesn't seem right

Comments

@eDR10x
Copy link

eDR10x commented Jun 6, 2020

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
Copy link
Owner

rtchagas commented Jun 7, 2020

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/merged_manifests/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.

@rtchagas rtchagas self-assigned this Jun 7, 2020
@rtchagas rtchagas added the invalid This doesn't seem right label Jun 7, 2020
@eDR10x
Copy link
Author

eDR10x commented Jun 8, 2020

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:

<bool name="enable_nearby_search">true</bool>

<!-- 0.002 USD per each (2.00 USD per 1000) -->
<bool name="show_confirmation_photo">true</bool>

<!-- 0.007 USD per each (7.00 USD per 1000) -->
<bool name="show_confirmation_map">true</bool>

<!-- If true, the map will automatically center (pan) to
     the selected marker -->
<bool name="auto_center_on_marker_click">false</bool>

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants