Joke Collection Website - Public benefit messages - How to develop android sdk

How to develop android sdk

See the android sdk development guide on APICloud. Their platform is called functional module. Please summarize some of them and see if they are of reference value:

1. Development environment:

PC:Windows XP/win 7/8/Mac OS;

Eclipse3.7 and above;

ADT2 1 and above;

Android SDK 2 1(5.0) and above;

JDK 1.6 or 1.7. Try not to use 1.8, there are various potential problems;

Among them, the Android environment recommends using the Google integrated version of Eclipse:SDK ADT bundle;

2. Develop Help Reference

Android online API documentation:

Javascript specification and introduction:

JSON data online viewer:

3. Frame design

The APICloud engine encapsulates and expands the underlying capabilities of the operating system, and opens the API to Javascript calls through the Webkit browser engine of the system, thus realizing the bridge between the HTML+CSS+Javascript development language and the native development languages such as Object-C/Java/C/C++, greatly enriching and enhancing the capabilities of standard Javascript. Front-end developers can call the underlying functions of mobile devices through JS, such as telephone, SMS, location, multimedia, cross-domain http request, etc. , and can easily integrate the SDK of third-party vendors such as Baidu Map and Alipay into the App.

This SDK has opened the bridge mechanism, which is convenient for developers with a certain Android foundation to freely develop and define native extension modules, enrich the capabilities of JS and enhance the user experience of App. The bridge layer design of APICloud engine framework is shown in Figure (2):

4. Develop and design local modules.

Create a new class for binding mapping to JS objects. Create a new Java class in the project (take Uzmodedemo class as an example, and the mapped JS object is moduleDemo), inherit the APIModule or UZModule class in the engine Jar package, and rewrite related functions. As shown in the figure below:

Define and declare Java functions that will be mapped to JS classes. If you want to map a function in a Java class to a JS object for JS to call, you need to declare a function starting with "jsmethod_" and declare it as public, and you can only accept one parameter: UZModuleContext.

Function declaration format: public void jsmethod _ show alert (final uzmodulecontextmodulecontext) {}