Search This Blog

Showing posts with label Google. Show all posts
Showing posts with label Google. Show all posts

Thursday, 26 July 2012

Google Place APIs



Google Place APIs



Google Place API is a service which provides the search system for places. The search with the google place API can be perform by two ways.


1) Text String Search - a normal search specify the search string as text
2) User location based search - a search specified based on the location parameters (latitude,longitude)


You can integrate the places search based on the location in your android application. See the previous example to determine the location of a user and draw a overlay icon pointed to that location of the user.


This post is explaining the implementation of place search by google place API.


The HTTP URL for the place search is as follows

https://maps.googleapis.com/maps/api/place/search/output?parameters

The output could be json or xml and the required parameters are as follows


key - Your application key.
location - latitude,longitude of the place to search
radius - search area in which the search should perform for location
sensor - true or false based on the request is initiated by a devices having a location sensor (GPS) enabled or disabled


The following is the list of optional parameters to refine your search


Keyword — A term to be matched against all content that Google has indexed for the place
Language — The language code, indicating in which language the results should be returned.
Name — A term to be matched against the names of Places. Results will be restricted to those containing the values passed here.
Rankby — Specifies the order in which results are listed. Possible values are:

· Prominence - This option sorts results based on their importance.
· Distance - This option sorts results in ascending order by their distance from the specified location.
· Types — Restricts the results to places matching at least one of the specified types. Types must be separated with a pipe symbol (type1|type2|etc).
· Pagetoken — Returns the next 20 results from a previously run search.



   Code : The following few line of code explain how can you call google web    service in your application.

    String result = "";
    HttpClient httpclient = new DefaultHttpClient();
    HttpGet request = new HttpGet(url);
    ResponseHandler<String> handler = new BasicResponseHandler();
    try {
        result = httpclient.execute(request, handler);
    } catch (ClientProtocolException e) {
        e.printStackTrace();
    } catch (IOException e) {
        e.printStackTrace();
    }
    httpclient.getConnectionManager().shutdown();

The Google Place APIs provide a quick way to integrate the context aware search to your application. 


If you like the post please provide your feedback. 


Thanks
Creative Android Apps






Thursday, 19 July 2012

Android Jelly Bean released to play on Open Source


Excitement Over - Google Released Jelly Bean Source Code in AOSP


After a lot of excitement for Jelly Bean (Android 4.1) Google recently released its version to the open source community to develop and release the future versions and releases.


Very soon we can see more and more devices running the Jelly Bean (Android 4.1). Currently Google released the native binaries for Nexus 7 tablet and Galaxy Nexus. Google's Jean Baptiste Queru recently announced the release of Android 4.1 on AOSP (Android Open Source Project). The name of the tagged release is android-4.1.1_r1 as JBQ stated in the Android Building Group. The name of the development branch is jb-dev. We recommended that you create new clients, even if you're working in the master branch.It'll make your clients smaller and faster to sync.


Now the developers can create there customized builds of Jelly Bean and create new applications with new android power of Jelly Bean. Jelly Bean is released with lots of exciting features and APIs for developers providing new means to sharing the applications and connecting the devices.


See more about the android 4.1 Jelly Bean Features here


http://creativeandroidapps.blogspot.in/2012/06/whats-new-in-jelly-belly-android-41.html


You can download the latest source code from https://android.googlesource.com/.

If you like the post please share to your friends and feedback us with your valuable comments.


Thanks
Creative Android Apps