How to add a google business search to android app. New programmer - java

Hi there I have managed to make a basic android app with all sort of puppy information for new owners. It has all the categories you expect like training etc. However I want to add a more advanced feature that as a new programmer I have no idea how to do!
I want to make an activity in the app so when they click it, or maybe just enter their postcode it shows up the local dog groomers within 10 miles, or maybe the local vet practices within 10 miles etc.
I have no idea where to start with this. I am not looking for it to be handed to me on a plate but does anyone have any basic guidance as to where to start etc.

If you are looking to use Google search, you can use the Google Places Android SDK. You will need to set up an API key. It's free for non-enterprise usage.
Other companies also offer similar services, such asMapbox, though from personal experience, the search results are not nearly as accurate as the Google ones.

Related

Square APIs - How to order on the go Android app

I know this is really vague but I'm looking for any sort of assistance you can offer. Basically, the vendor I am working with currently has a Point of Sale app on their iPad tablet, customers already go there and order goods on a daily basis. I am currently developing an Android app for the customers so that they can order their goods on the go, and have it ready for pick up when they arrive. Some of the documentation is a little confusing to follow, and the answer that Square customer support gave us wasn't very clear either, so I am calling on the help of fellow developers who perhaps have experience working with Square. Right now I'm having a lot of trouble understanding how users of our app would even see the menu through Square API calls, which APIs to start out with. They have lots of different ones and I'm not sure which ones are actually relevant to my task.
Here are some links I tried to look at for your reference, maybe it can help you as well:
https://docs.connect.squareup.com/
https://github.com/square/connect-java-sdk
https://github.com/square/connect-api-examples
https://github.com/square/point-of-sale-android-sdk
https://github.com/square/active_merchant_square

Getting user behavior on the Android Phone (App History, Browse History etc)

Is it possible to get the user behavior on the phone (for example Alpesh has an Android phone and he uses multiple apps, browser YouTube etc). Whatever he is doing on the phone I want to get all those things from behind (which apps he has installed, which app he opens and what he search on the phone, All these data I want to get programmatically so what all can be get in android).
For now I am aware that installed apps list can be get easily but I want to get usage history and what he do all on mobile.
This is not a code solution, but an answer to your question, so you can get start some where.
In my opinion your question title are asking about two things.
(part 1) Getting User Behavior on the Android Phone (part 2)(App History, Browse
History etc)
1- First part Getting User Behavior on the Android Phone:
There is a concept called context awareness. Short described; it is about gathering different information from the phone, like light sensor, motion sensor, sound, location or even user behavior etc. and depending on your app requirement and the gathered information:
You could send these information over cloud data store for statically usage
You could make your phone doing (behavior) different things depending on location, motion or what ever.
etc.
For context awareness it is an open area for pervasive computing research. And it is not just few lines of code to write, it is typically a complete solution depending on requirement. Example I have built a context awareness application to gather noise collected by phones from different locations for research purpose inspired from this framework, but I am pretty sure you can find other frameworks or even build your own, as I did in my case.
The mentioned framework has some examples.
2- The second part is about App History, Browse History etc.:
This is possible, but you still need to build a peace of software (App) to collect all these information (logs) from the phone. Hereafter you can make phone act on different conditions and/or again send it over a RESTful API over cloud service data store, there is no limit for it.
The problem is, there is no thing out of the box for your requirement. Even if you find frameworks you still need to research it and further work on it.
You can find different examples for your requirement, like to collect browser history, you can find SO question here:
Get browser history and search result in android
Or get list of installed application:
How to get a list of installed android applications and pick one to run
My point here is you need to solve small goals at a time and put your knowledge together at the end.
Both 1 and 2 can also be related to each other, depending on your achievement.
Conclusion
Make a goal to your project.
Define the main requirements and tasks of your project.
Research your options (Technology, Cost, Target Audience, What data I can or I should not collect, what is possible to collect, what is the limits, Privacy issues etc.).
Split your project in small assets and try to solve small problems/goals.
Finally you would be able to put the puzzles together and build your final application
but i want to get usage history and what he do all on mobile
This is not possible and shouldn't ever be possible. Each app is sandboxed by Android so apps cannot inspect what other apps are doing. Think about it, you wouldn't want apps to be able to intercept private information such as banking details.
Every app is isolated from the other ones. Unless you develop a system signed app, you will not be able to gather all that data.
What you could do is to develop your own Android Rom where you then develop your data collection the exact way you want. Then you need to distribute your rom, which is another story...

How to give your app to certain users free of charge?

I just added an in-app purchase to my app which unlocks extra features and I have a few questions.
I have a friend who helped me a lot in the development process, I want to give him the extra features for free, how would I go about doing that?
I use my own app and since I can not purchase my own IAP, how would I go about unlocking said features without making a custom build for myself?
Thanks everyone!
In the past I have seen developers implement a Coupon Code feature, which allows the user to enter a code within the app that, when gotten correct, will unlock certain features. Implementation of a like feature will allow you to distribute a code to yourself and others to be used to unlock features without payment.
One simple solution to the first problem: send your friend money (cash) equivalent to what they would pay to get your app from the appstore.
Apparently there is no solution to the second problem ... apart from using two distinct Google identities.

What do I have to use in China to replace Google maps in my app?

Currently living in Beijing, I'm developing an app and since China is an important market, I would like to use another API than google map to make the maps features in my app work there as well ( for the rest of the world, the users will use Google map ).
Since the user has to be able to navigate worldwide on the map, and not only being limited to China when the user is there without a VPN, I heard that baidu map could be too restricting ( some people say that it's limited to China in term of search, or that it's not working properly when looking outside ), I was thinking about using gaode (http://ditu.amap.com/), but the doc is difficult to find as I don't speak Chinese...
Do you guys know where I can find some examples or simple implementations I could use to get started, or if I should look for something else?
Thanks in advance!

Can I create a Google account programmatically?

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.

Categories

Resources