Android Tutorial-Step into the SDK from scratch

Source: Internet
Author: User

Step into the SDK from scratch


This blog want to summarize the author in the Access Channel SDK some experience, for want to pick up the channel or want to learn how to access the SDK of children's shoes to provide a reference. This blog is based on the Android platform, on the iOS Access SDK method, I will have the opportunity to organize later.

First of all to explain the SDK, what is the SDK? Its full name is, software Develop kit, which means the software development Kit, which is a collection of relevant documentation, examples and tools that can assist us in developing certain types of software. For the SDK, a service store called Devstore (http://www.devstore.cn/), which gathers various service providers and provides professional and detailed reviews for each channel SDK, I am honored to become Devstore's special evaluator This honor, in Devstore also can see the author of some channels to do the evaluation report.

Once you have a basic concept of the SDK, you can learn how to access the SDK from scratch, each channel or service provider facing the developer will provide the corresponding SDK, which contains the corresponding development documentation, development of the demo and the jar package or the resources required for the project.

Here I provide an example of how to access the SDK, the following outline:

1. Get the SDK we need from the Channel service website

2. Unzip SDK package, get development documentation, DEMO, jar package

3. Review the development documentation and import the demo into eclipse

4. New project, refer to Demo Integration SDK

5. Run the test target project


first, to the channel website to get the SDK we need

The author here with 91 mobile open Platform for example, our channel official website sdk:http://dev.91.com/documentcenter/sdkdownload, download our required SDK, here i download is the Android version of the SDK.


After you click Download, you will see a compressed package:



unzip the SDK package and get the development documentation, DEMO, jar package

91 Open platform is also a more audience of a channel, its SDK provides the content is relatively complete:


We can see that the 91SDK is very clear for us to separate the different folders, from the development of documentation, client interface paradigm to the operational specifications have provided complete information. When we connect to other channels, we may need to understand what the SDK has to offer us and what we need to develop.

Here, we mainly look at 01, 02, 04 of these three, which we need to access the SDK to use

Access Process Documentation:


Examples and Development documentation:


Configuration notes and development packages



third, review the development documentation, import the demo into Eclipse

We developers naturally want to quickly access the SDK, and do not want to waste too much time, the quickest way is to first browse through the SDK to provide the development documentation, and then test the sample it provides, understand the entire integration process, we will understand how to configure the relevant files, However, the use of specific APIs requires a detailed view of the development documentation and examples.

If you have viewed the 91 access document, you will find that it is written in very detailed, do not need to say, you can try to integrate the SDK.

To view a document:


Import Demo and development package to eclipse




Here I would like to mention the two ways to integrate the SDK, 91 this is through the introduction of library project files in the form of integration, another way is integrated in the form of jar package, but may also need to copy the corresponding assert resources to the target project, mainly depends on the channel SDK is provided.


Iv. New Project, refer to Demo Integration SDK

We can get a lot of information from the demo, one is the configuration of the project, one is the API interface usage, we can simply view the demo to understand the entire channel access process. So how to see the demo, the author summarizes the following experience:

Review the Androidmanifest.xml file for the configuration required for the project, such as permissions configuration, Activity, service, or meta-data configuration.

For example, 91 requires these permissions:

   <!--91 Community--<uses-permission android:name= "Android.permission.WRITE_EXTERNAL_STORAGE"/> <uses-p Ermission android:name= "Android.permission.ACCESS_NETWORK_STATE"/> <uses-permission android:name= " Android.permission.READ_PHONE_STATE "/> <uses-permission android:name=" Android.permission.SEND_SMS "/> &lt ; uses-permission android:name= "Android.permission.INTERNET"/> <uses-permission android:name= " Android.permission.ACCESS_WIFI_STATE "/> <uses-permission android:name=" android.permission.MOUNT_UNMOUNT_ Filesystems "/> <uses-permission android:name=" Android.permission.CALL_PHONE "/> <uses-permission androi D:name= "Android.permission.GET_TASKS"/> <uses-permission android:name= "android.permission.SYSTEM_ALERT_ Window "/> <uses-permission android:name=" Com.android.launcher.permission.INSTALL_SHORTCUT "/> <uses-p Ermission android:name= "Com.android.launcher.permission.UNINSTALL_SHORTCUT" /> <!--91 Community-- 

Components that need to be configured:

        <!--91 Community--<activity android:name= "Com.nd.commplatform.activity.SNSControlCenterActi Vity "android:configchanges=" Orientation|keyboardhidden|navigation|screensize "android:launchmode=" s Ingletask "Android:theme=" @android: Style/theme.notitlebar.fullscreen "android:windowbackground=" @nul L "android:windowsoftinputmode=" Adjustpan "> </activity> <activity Android : Name= "com.nd.commplatform.activity.SNSLoginActivity" android:configchanges= "Orientation|keyboardhidden|navigat Ion|screensize "Android:theme=" @android: Style/theme.notitlebar.fullscreen "android:windowbackground= "@null" android:windowsoftinputmode= "Adjustpan"/> <receiver android:name= "com.nd.commp Latform.versionupdate.ND2VersionUpdateNotify "android:exported=" false "android:process=" Android.inte Nt.nd.sns.commplatform.vErsionupdate "/> <service android:name=" Com.nd.commplatform.versionupdate.ND2VersionUpdateService "        Android:exported= "false" android:process= "Android.intent.nd.sns.commplatform.versionupdate"/> <service android:name= "Com.nd.commplatform.service.NdNewMessageNotification" android:enable D= "true" android:exported= "false"/> <activity android:name= "Com.nd.commplatform.activi Ty. Snsapppromotionactivity "android:configchanges=" Orientation|keyboardhidden|navigation "Android:launc            Hmode= "Singletask" Android:theme= "@android: Style/theme.notitlebar" android:windowbackground= "@null" Android:windowsoftinputmode= "Adjustpan"/> <service android:name= "COM.ND.COMMPLATFORM.S Ervice. Nddownloadservice "android:enabled=" true "android:exported=" false "android:process=": com. Nd.commplatforM.download "/> <activity android:name=" Com.nd.commplatform.gc.activity.ForumActivity "a Ndroid:configchanges= "Orientation|keyboardhidden|navigation|screensize" Android:theme= "@android: Style/Theme.NoT Itlebar.fullscreen "android:windowsoftinputmode=" Adjustpan "/> <!--91 Community--<activit Y android:name= "com.nd.complatform.stardemo.StartActivity" android:configchanges= "Orientation|naviga Tion|screensize "android:label=" @string/app_name "android:screenorientation=" Landscape "a Ndroid:theme= "@android: Style/theme.notitlebar.fullscreen" > <intent-filter> <action Android:name= "Android.intent.action.MAIN"/> <category android:name= "Android.intent.category.LAUNCHER         "/> </intent-filter> </activity>

After the configuration, we can find out the method of the corresponding API call according to the function point, we can know how to pass the parameter and callback the API method.


v. Run the test project

After we have integrated the SDK, we can run the test project and see what we want to test, such as login, payment, hover box, etc.




Here is just to show you the 91 Channel SDK Access, this is the test demo presentation of the effect, the specific display effect by the development of self-development.

About the SDK access, the author introduced here, the SDK access is not what the technology content is very high, as long as the corresponding programming foundation and related platform development experience can quickly familiar with the SDK access. But here does not mean to be able to play well, access channels have a lot of pits, not all channels like 91 have perfect development documentation and packaging of the better API, some channels may have a variety of strange and strange problems, sometimes we need to fill these pits in development, it is very challenging the developer's flexible response, When necessary, you need to find technical support for the corresponding channel and reflect the relevant issues to them.



The above is the author as a channel access to the developer's summary of some of the experience, there may be no perfect place, if there is any relevant questions can give the author message, the author can continue to supplement the relevant content in the blog. Hope this blog can help everyone, thank you.






Android Tutorial-Step into the SDK from scratch

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.