Joke Collection Website - Public benefit messages - How to develop android sdk
How to develop android sdk
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) {}
- Previous article:Send a birthday greeting message to my father-in-law
- Next article:How to write a thank-you note after receiving a love donation?
- Related articles
- Why can an agent in 58 cities make an appointment to see any house?
- What is the best tone?
- How to set the family number in Anhui Mobile M-Zone SMS?
- Weird psychological test
- How to get Tibetan poems through Apple's mobile phone shortcut instructions
- My Lenovo p700 received spam text messages from people chatting about the Spring Festival Gala on Weibo. How do I fix the screen?
- How is the repayment date of Xiaomi loan determined?
- Is it illegal to forward others' chat records at will?
- What can you do for your father besides giving gifts on Father's Day?
- How to charge for lawyer’s demand letter