• 15

A PHP Error was encountered

Severity: Notice

Message: Undefined index: userid

Filename: views/question.php

Line Number: 191


File: /home/prodcxja/public_html/questions/application/views/question.php
Line: 191
Function: _error_handler

File: /home/prodcxja/public_html/questions/application/controllers/Questions.php
Line: 433
Function: view

File: /home/prodcxja/public_html/questions/index.php
Line: 315
Function: require_once

I have followed their documentation step by step but it does not function

  • Created an google developer account
  • Created an API KEY(I've used SHA1 and package name/ I also tried without adding restricitons) and enabled PLACES API (picture)
  • Added the following inside application tag

    meta-data android:name="com.google.android.geo.API_KHTYEY" android:value="API_KEY_KEY_HERE"/>

  • Add this code as a clickListener for a button in a simple Activity

    button.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { PlacePicker.IntentBuilder builder = new PlacePicker.IntentBuilder(); try { startActivityForResult(builder.build(activity), PLACE_PICKER_REQUEST); } catch (GooglePlayServicesRepairableException e) { e.printStackTrace(); } catch (GooglePlayServicesNotAvailableException e) { e.printStackTrace(); } } });

Result: The place picker activity start but closes immediately. I tried to find the solution but everybody was talking about putting the api_key in the right place. This is definitely not my problem, so can anyone shed a light on this?

      • 1
    • Google is tracking the interest in having a Place Picker widget here: (Android) issuetracker.google.com/128304810, (iOS) issuetracker.google.com/128304760. Please fill the linked form with your use case and needs if you are interested.

It looks that to use Place Picker through the deprecation period you need to have "Places SDK for Android" service enabled. Since 29.01.2019 google is no longer alowing users to enable that service so if you didn't enable that service before 29.01.2019 you can't use Place Picker. Right now you can only enable "Places API" which doesn't work with Place Picker (only Places SDK for Android does). I have the same problem, look here: Android Place Picker with API KEY created after January 29, 2019

  • 1
Reply Report
      • 1
    • Oh I see. Is there anything else that will do the same job? It's so sad not to find what you want . Let me know
    • I was looking for some alternatives for a couple of hours and didn't find nothing worth to mention yet... If you will find something please also let me know
    • I think this url tells something. At least it works.(Also keep in mind that when you set a billing account you have to give your credit card to ensure that you are not a robot, they will not charge you!as they say) iteritory.com/…