How to use addressing and validation PostCodeAnywhere on Android? - android

I'm building an application that takes the departure and destination address from the user. The company purchased Capture+ from PostCode anyWhere to be used on our website, I now need to build it on Android.
I'm trying to build a layout that would have something like this demo
http://www.postcodeanywhere.co.uk/address-capture-software/try-it-now/
I tried to look for an Android API for that, but didn't find a Java API http://www.postcodeanywhere.co.uk/support/sample-code.aspx
This link shows how to get started with Capture+ , but again only javascript and some html form
https://www.postcodeanywhere.co.uk/address-capture-software/guide/default.aspx?reg=1
I've tried reading about the search dialog http://developer.android.com/guide/topics/search/search-dialog.html
But i'm not sure if it's the right thing, I'm really lost, can anyone help me please ?

I'm on the technical support team here at Postcode Anywhere. With the Capture+ function at the moment it can only be done with the JavaScript snippet provided in the integration process.
We do however have JAVA code samples for all our API calls which you can use to implement the more traditional 'Click to Find' method. All the APIs can be found here:
http://www.postcodeanywhere.co.uk/address-validation/api/
For the UK the APIs that you require are the 'Find' and the 'Retrieve By ID'.

No problem, good to hear you got it working.
The service is intended to be used in this two part method (Find and retrieve). The retrieve by ID is the call where the charge is made. There are restriction on how many 'Finds' that can be used when no 'Retrieves' are made.
If you want to drop me an email of your requirements I can have a look into the best way of doing it?
My email is tomm#postcodeanywhere.com
Cheers

Related

Android - find image link API

Hey !
I have an Android app where the user can search on a specific subject, let's take the word "Cats" for example. When the user submits the search I want to find an image similar or on the subjects the searched for. A search engine for images more or less. I want something "easy" to deal with, so I thought about integrating the Google Search API into my app. Let the user search Google, and take the first image that comes up.
However, I haven't found any example and I just need a push in the right direction. If you could give me an example API for my needs, that'd be great.
Apparently the Google Search API never was fully deprecated it's still up and running. It provides JSON data and is easily parsed with Android.
If anyone else needs an image API here's a test search: https://ajax.googleapis.com/ajax/services/search/images?v=1.0&q=searchquery&rsz=8&start=1&imgsz=small|medium
And the JSON reference: https://developers.google.com/image-search/v1/jsondevguide

Android Login/Sign Up Example

I am trying to create an application which would require a Registration+Login system.
I want the Registration part to use the user's photo, their email id and their full name as inputs.
I have tried playing around with several existing examples over the internet such as :
http://www.tutorialspoint.com/android/android_sqlite_database.html
however none seem to work in my favour.
Based on my custom requirements for the Login+Registration page, could you please suggest some good tutorials/examples for me to look at?
Thank you,
Abhi

How to do a Google Image Search in an android app

I'm developing an Android app that will do a Google Image Search and return the images to the user in a list. I've looked around on StackOverflow and have run into some problems. First off, I'm a total newbie programmer with only 4 months' worth of programming experience, so I appreciate you guys being patient with me.
I looked through Google Image Search API and I know it's being depreciated and will get shut down someday. Because of this, I don't want to use it. After extensive research on the topic, I don't want to use Bing or another image search service, and I don't want to do a "reverse image search. I just want to use a simple image search via string. I've used this app (https://github.com/tonytamsf/Android-Image-Search) to look at the code, but in all honesty, it's just not helping and it's confusing me more on how to exactly search for an image on Google. Plus, the app won't compile in Eclipse :(
I've also looked around at Google Developer APIs, and I'm not sure if I need to turn on an API key for myself? Still, a bit confused about that. I thought I needed to do a custom search engine, but just by looking at that, I don't think it's exactly what I'm looking for.
Can anyone point me to some resources for this? I would really appreciate it. Thank you!
Just a heads up, but what you're asking is pretty challenging and it sounds like you're just getting started. Here's what I can suggest though:
To get that demo code working in eclipse, I had to right-click the project, click properties, click Android, then check the box for the version of android installed. (I had android 19 installed, and the code was expecting 16, so it was giving up. Tell it to use what you have, which probably is 19). This worked for me after using the git plugin in eclipse to import the project. If you are importing a different way, you may have different issues. * Using git and importing the project is a good skill to have, so if that's unfamiliar territory, take the time to look at that.
Ok, that's the end of what I am sure of. The rest is an educated guess, but I'm sure others can correct me.
Next, if tinkering with that project isn't enough, getting real google image search working will take several skills, especially since the old API is gone. In total you'll need to know:
Java
Android programming
google cloud services
google custom search API
REST
some other libraries to glue the custom search to your app
It's a big chunk there. Currently, it seems the only way to use google's image search is to run a google app engine (you basically set up an online account for google to run a server for you. It does computation and sends messages back and forth for you. You only get a little bit for free each day and then if you want more you have to pay. This is one-way Google earns money. It's not something they let you run on your own computer anymore.). Then you make your android app talk to that server using your new login ID, and the server will take the search term and send back the answers to your android app.
You can get the app engine running and use it in chrome without dealing with android to save yourself time, then add the android part later in the future. Good luck!

How to make an app submit info into a webform

I was trying to write an android app to help people do easier searches on multiple websites like craiglist, ebay ..etc
I am not sure where really to start from, or the name of the technology I would be using. To make it more accurate question, these websites are all forms based that you either post stuffs or retreive stuffs through searching. How can I make my android app actually in which it will ask the user for a item name (that part I know) and then send item name to say craiglist so it gets the results back?
I was thinking of copying the url that is displayed on my broswer when I click search on any of the website and using the same link with string manipulation to include whats needed.
Is this correct? Any other ideas are I know? I am kinda all over the place, but I need a starting point.
Some sites might expose a public API for you to connect with, but that's site specific.
Sites that do not expose such a system can be "scraped", which means you're using string manipulation (as you mentioned) to parse our the data you're after.
Both ways require basic knowledge on how to perform HTTP operations, there are several ways to do this but the easiest way it to use the HttpURLConnection class as described in various tutorials on the web.
Googling for "android http GET POST tutorial" should point you in the right way to get started with your adventure :)

Querying the time using Google Search Results

This one is puzzling me...
For my Android application I want to be able to return the current time in any location the user requests (right down to city level). The request itself comes from a voice command, so I cannot use alternative methods.
The most obvious way (so I thought) was to query Google, but I need your brains to help me solve how to extract the data I want please!
In Google, query:
"What's the time in China"
You should see a 'widget' at the top displaying the answer nicely. View the page source and search on 'China' and it's there - I thought great, this is going to be easy!
But...
"What's the time in London"
Although the display in Google appears the same, there is no result for 'London' when searching the source HTML...?
Using Google Chrome, I inspect the element of the 'widget' and can then view the contents I wish to extract in all cases.
So, my questions is firstly, am I missing something obvious (Google don't want us to be able to do this for example)? Or is there a way to 'force' the result to be in the HTML by structuring the query perhaps?
Secondly, is there a way to access the specific 'element container' and return the results to my Android Application?
I thank you in advance...
You should really use an API instead of parsing html.
I guess there are many many API which will give you the time in a given city.
http://www.worldweatheronline.com/time-zone-api.aspx for example (havnt tried it myself)
If you still want to extract data from the google result (which is html), check for html parsers like in this post : Parse HTML in Android

Categories

Resources