I am trying to make calls to the google maps api. That's not really a problem in itself. In my Android app, I would like to make api calls to google to get location data for nearby restaurants.
From my own research, I have found that this is not too difficult when using my own api key. However, this would mean that any user of my app will cause me to use my monthly maps api call limit.
Is there a way for users of my app to "sign in with google" and somehow get their own api key so that each user has their own and I don't have to spend my api limit on my app users? There does not seem to be documentation on the matter when I did some research (maybe because it is not possible?). Maybe its just a matter of me using wrong search terms.
I started my journey with Android and I would like to make a simple feature that would convert one currency to another. I don't know anything about web services really, I saw some tutorials but none for Android Studio for this.
Could someone explain how this could be done? Or give a link to a beginner-friendly tutorial that would hep understand how to perform such an operation?
You can use this API provided by google codes.
It fetches and uses bank web-services to fetch the rate dynamically for java-based application.
My goal is to have a GPS Track displayed in a local Java Application with Google Maps. And I am pretty sure I am not the first one to try this, so there should be a way.
The Problem is that I found the Google Maps Engine API (Deprecated) which is stated as deprecated. But I didn't find any replacement. Only this page, which then links to the deprecated version again.
I also did some search, but all results seem to point to future deprecated API, and also are pretty old.
Can anyone point me a version or tooling that I will be able to still use in 2016? Or does anyone know an alternative to using Google Maps for displaying GPS tracks in a local java app.
Thanks
In case anyone has the same problem:
I used mapsforge https://github.com/mapsforge/mapsforge
JxMaps library provides possibility to add Google Maps to java swing application. Using this library you can draw GPS track either as polyline or set of markers on the map.
I need to get address from lon lat location. I was trying with geodecoder but it doesn't work (throws Service Not Available). Is there any other solution to that problem?
The geocoder is not guaranteed to exist on all devices. Couple of things to try:
The documentation is not exactly clear, but it seems that if you have the Google add-ons, you should have a geocoder backend implementation. Try linking against the Google APIs for your target API level (see below)
https://stackoverflow.com/a/2255592/483708
In your implementation, prevent erroneous results by explicitly checking for geocoding functionality with Geocoder.isPresent()
http://developer.android.com/reference/android/location/Geocoder.html#isPresent()
If the above points are insufficient, you will need to use the Google Maps Web APIs to perform reverse geocoding via the web:
http://code.google.com/apis/maps/documentation/geocoding/index.html#ReverseGeocoding
Also take a look at the GeoCoderPlus library referenced in this blog post
http://bricolsoftconsulting.com/perfect-geocoding-zoom-part-1/
It uses Google Maps Web APIs, but for 'forward' geocoding. You may be able to use the blog post and the included code as guidance to build your own implementation of reverse geocoding via the web.
It seems to be a bug in the emulator running SDK 2.2. I have had the same problem.
Create a 2.1 or 2.3 emulator and try your code.
Does anybody know if via the google api in java
I can create google accounts programmatically.
Yes
(ish)
The Admin SDK Directory API allows you to create accounts which work with Google tools (Gmail, Calendar, etc.) but are not #gmail.com / #googlemail.com accounts.
This is used by companies to automate creation of accounts for online google tools when new users are added to networks and similar scenarios.
User management is documented here.
This replaces the provisioning API which was deprecated in 2013.
NO
The only possible way to do this would be to use a web automation framework. Python is great for web automation using tools such as mechanize. I've never done it in Java, but you should do a google search for java programmatic web browser or java web automation.
On top of that you would have to incorporate an OCR package to beat the captcha.
There is a reason that google, nor anyone else, allows the programmatic creation of accounts. Spammers would have a field day. Within days there would be no valid accounts left for any new users to use. In short, it would be a disaster.
As others have pointed out, you cannot create Google consumer accounts (ie, #gmail accounts) via any sort of API. It would create a field day for Spammers. To make it difficult for Spammers, Google uses tactics such as CAPTCHAs to prevent abuse.
But, you can create Google Apps accounts via their Provisioning APIs. A Google Apps account is basically a white labeled version of Google Apps (Gmail, Calendar, Docs, etc) that is under your own domain name.
For the same Spam concerns, your Google Apps account would have to be either a Premier domain (where you pay for every account you provision) or an Educational institution (I assume some sort of verification process for that). So, since you have to pay for each account, it's not a huge risk for spammers (unless they want to pay big $$$ for each account.. very unlikely).
It depends on your definition of create account...
it is possible to create an account inside a google group, or domain. By using the code below you can create accounts for your google group/domain. For this scenario YES you CAN create a google account.
However, if you want to create a google account as in #gmail.com... I really have not found a way to do it programatically.
Here is the link of where to download the google api, and the Documentation.
https://developers.google.com/google-apps/provisioning/#creating_a_user_account
Good Luck.
import sample.appsforyourdomain.AppsForYourDomainClient;
AppsForYourDomainClient client = new AppsForYourDomainClient(email, password, domain);
client.createUser(String username, String givenName, String familyName, String password)
The real answer is YES.
The fact is that we don't know (yet) how.
The proof is that an account can be created from any android device without any captcha, without a phone number and without an email.
So the secret is inside android codebase.
MAYBE?
I am going to write an answer that has not been written so far, but which could actually break the EULA (if that's the case, can someone point out the specific paragraph of it that prevents this?).
The solution is: redirect Google's CAPTCHA to your user.
Assuming your software has a user, you could present them Google's captcha so the account is created by them, for your system, without them knowing.
Would this work for you?
You can do that theoretically, but Google's account creation - like other services - uses image recognition for confirmation that you're a user (aka CAPTCHA) and you need to be able to write image recognition program that can do that.
AFAIK there's no programmatic API from Google to create accounts, since doing so would open them up to spammers/scammers/etc... which the CAPTCA was meant to prevent.
Why would you do that? I am not sure Google allows that in the first place as far as EULA.
I am going to assume that you aren't telling us your use case which is really to have a convenient way to use google logins on your site (because that's the closest you'll get and be legit). I would check out using OpenID in the same way SO does.
Actually, you can create if by google account you mean your own domain (those business ones using google).
You can check it here
YES...
Actually you can do that. You can write CUrl scripts and can use different APIs available to break the captcha.
Breaking a captcha is key thing here.
The fact that Google's account creation UI requires a CAPTCHA is your first hint that the answer is NO.