Skip to content

fdoumet/urx-sdk-android

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

URX Android SDK

This is the SDK interface for the URX App Search API.

This installation tutorial will show you how to add URXSearch to an existing project, and how to keep it up-to-date.

You will learn how to:

  • Insert the SDK into your Android app
  • Set your API Key
  • Query the URX Search API for card content

Installation

Gradle

compile 'com.urx:sdk-android:0.1-SNAPSHOT'

Maven

<dependency>
  <groupId>com.urx</groupId>
  <artifactId>sdk-android</artifactId>
  <version>0.1-SNAPSHOT</version>
</dependency>

Building from source

mvn clean install

Usage

Setting up a client

ClientConfig config = new ClientConfig("INSERT-API-KEY-HERE");
AndroidClient client = new AndroidClient(config);

Making a search query

// Build the query: "ellie goulding" AND lights AND action:ListenAction
Query q = phrase("ellie goulding").and(term("lights")).and(action(Listen));

// Execute the query asynchronously
client.query(q, new ResponseHandler<SearchResults>() {
    @Override
    public void onSuccess(SearchResults results) {
        // Handle the search results here
    }

	@Override
	public void onFailure(ApiException failure) {
		// Handle any API failures here
	}
});

Resolving a deeplink

// Will open the app if it is installed, otherwise will default to the mobile website
client.resolve(searchResult, installedApps(appContext));

See this SDK fully integrated into an example Android app.

Contributing

Coming soon...

License

Copyright 2014 URX

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Documentation, Features and Examples

Full details and documentation can be found on the project page here:

http://developers.urx.com/

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages