Giter VIP home page Giter VIP logo

xamarin.android.skobbler's Introduction

Xamarin.Android.Skobbler v3.0.2

C# bindings for the Skobbler Android SDK

I am not associated with either Skobbler or Xamarin .inc. All rights belong to their respective owners.

This repository includes a C# translation of the demo included with the Skobbler SDK. This currently has a few small bugs which are probably a result of my [mis]translation. Raise an issue or send a pull request if you would like these fixed ASAP. (You'll need to paste your API key into the android manifest before running the SDK demo)

Installation

  1. Clone the repo.
  2. Build the Skobbler.Binding project. You'll need to set your jdk to jdk1.8.0_102 or above & have SDK build-tools v24.0.1 or above installed via the Android SDK manager.
  3. Reference "Skobbler.dll" from your project; found under "Xamarin.Android.Skobbler\src\Skobbler\bin\[Debug|Release][-$ABI]\Skobbler.dll"

There are platform configurations for each native library ABI (x86, armeabi-v7a & armeabi). The AnyCPU platform configuration includes all 3 ABIs at the cost of a larger assembly (~5MB for specific platforms and ~12MB for AnyCPU). If you don't know which platform to select just use AnyCPU.

The Skobbler sdk requires you to have a string resource called "app_name", which your manifest's application label points at. If you do not add this your app will crash on initialization.

ie. in Resources\values\Strings.xml

<resources>
	...
  <string name="app_name">AndroidOpenSourceDemo</string>
	...
</resources>

and in Properties\AndroidManifest.xml

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" ... >
	<application android:label="@string/app_name" ... ></application>
  ...
</manifest>

Documentation

Fantastic documentation is available from Skobbler. The main difference you will find is that get/set method pairs in Java have been changed to C# properties. The automatic binding generation process will also add events that correspond to callback interfaces.

Assets

You will need to manually copy the SKMaps.zip file to your assets folder, with a build configuration of an Android asset. The zip is available in the Android SDK from Skobbler. See the demo app for an example.

Additions & Alterations

I have added async/await methods to make things cleaner and more .NET friendly should you wish to use them. Here's an example using NearbySearchAsync() instead of NearbySearch():

try
{
	var searchManager = new SKSearchManager(); //No listener needed in the constructor for async calls;
	IList<SKSearchResult> results = await searchManager.NearbySearchAsync(searchObj);
}
catch(SKSearchStatusException)
{
	//Catch invalid search status here.
}

Namespaces should be the same as their respective Java packages, except the com prefix and are PascalCased.

Demo App Screenshots

Map Activity Map Styles Simulated Navigation Real Reach Heat Map Map Overlays

Contributing

If you would like to add a feature or fix a known issue, please add any contributions to a feature branch from develop and raise a pull request.

License

The Bindings, SDKTools and SDKDemo are provided under the MIT license. See LICENSE for details.

Thanks

Skobbler

Open Street Maps

Xamarin inc.

xamarin.android.skobbler's People

Contributors

trekdev avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.