Git Product home page Git Product logo

api's Introduction

api

The api consists of all the C# classes that implement both the Android API classes (such as Android.Opengl.GLSurfaceView that corresponds to Java class android.opengl.GLSurfaceView) and .NET API classes (such as System.Linq.Enumerable.)

Android API

The Android classes are generated from the binary Android distribution (android.jar). For this reason, dot42 supports the entire Android API. The Android API classes can be found in the api\Generated\v4.0.3 folder. You will see that these classes are actually proxies. These proxy classes allow you to code against the Android API in C#. They bind to the actual implementation in android.jar using attributes. See for example Android.Bluetooth.cs. The dot42 compiler replaces calls to these classes with the proper DEX code that invokes android.jar. You should not modify any code in the Generated folder.

.NET API

The .NET classes are handcrafted on top of the Android classes. For this reason, dot42 supports only part of the .NET API. This repository allows you to contribute to the supported set. Take a look at how for example System.Collections.Stack is implemented on top of java.util.ArrayList in api\System\Collections\Stack.cs.

Build the api

  1. clone this repository
  2. open api\Framework.sln in Visual Studio 2010, 2012 or 2013
  3. make any changes you want
  4. build the solution
  5. copy api\Build\Application\Frameworks\v4.0.3\dot42.dll to Program Files\dot42\Android\Frameworks\v4.0.3

Test your api changes

  1. create a new dot42 project and select 4.0.3 as the target framework
  2. code against the new or modified parts of the .NET API
  3. compile and run on your device

Note

The versions of the API and Dot42 must match for this to work. Therefore the repository is labeled in the same way as the release numbers of Dot42. So make sure you have the correct combination of Dot42 and the API. Of course we advise you to use the latest version of DOT42 with the matching version of the API from the master branch. If you are using a version of DOT42 older than 1.0.1.78, you need to update first for this to work.

api's People

Contributors

frankrem avatar olafpettersson avatar

Watchers

 avatar  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.