Android tutorial-step-by-step SDK access from scratch

Source: Internet
Author: User

Android tutorial-step-by-step SDK access from scratch

Access the SDK step by step from scratch


This blog will summarize some of my experiences and methods in accessing the mobile game channel SDK. It provides a reference for kids who want to access the mobile game channel or want to learn how to access the SDK. This blog is based on the Android platform. I will organize the IOS SDK access methods in the future.

First, let's explain what the SDK is? Its full name is "SoftWare Develop Kit", which refers to the SoftWare development Kit. It is a collection of documents, samples, and tools that can help us Develop certain types of SoftWare. About the SDK, here we recommend a service store named Devstore (http://www.devstore.cn/), which gathers a variety of service providers and provides a professional and detailed evaluation for each channel SDK, I am honored to be a special Reviewer of Devstore. In Devstore, I can also see my evaluation reports on some channels.

With the basic concepts of the SDK, you can learn how to access the SDK step by step from scratch. Each channel or service provider provides the corresponding SDK for developers, it contains the corresponding development documents, and the development Demo also has the resources required by the jar package or project.

Here I provide an example to illustrate how to access the SDK. The outline is as follows:

1. Go to the channel service official website to get the SDK we need

2. decompress the SDK package to obtain the development documentation, Demo, and jar packages.

3. view the development documentation and import the Demo to Eclipse.

4. Create a project. See the Demo integrated SDK.

5. Run the test target project


1. Go to the channel official website to obtain the SDK we need

The author takes 91 mobile open platform as an example. Our channel official website SDK: Alibaba.


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



2. decompress the SDK package to obtain development documents, demos, and jar packages.

91 the open platform is also a channel with a large audience, and its SDK provides a complete set of content:


We can see that 91SDK clearly divides different folders for us and provides complete information from development documents, client interface examples, and Operation Specifications. When we access other channels, we may need to know what the SDK provides for us and what we need for development.

Here, we mainly look at 01, 02, and 04. This is what we need to use to access the SDK.

Access process document:


Examples and development documents:


Configuration instructions and Development Kits



3. view the development documentation and import the Demo to Eclipse.

Our developers naturally want to quickly access the SDK without wasting too much time. The quickest way is to first browse the development documents provided by the SDK and then test the examples provided by the SDK, after understanding the entire integration process, we will understand how to configure relevant files. However, you still need to view the development documentation and examples in detail for specific API usage.

If you have read the 91 access document, you will find that it is very detailed, and you do not need to say it. You can also try it yourself and integrate the SDK.

View the document:


Import the Demo and Development Kit to Eclipse




Here, I would like to mention that there are two ways to integrate the SDK: 91, which is integrated by importing the project files into the database, another method is to integrate the SDK in the form of a jar package, but you may need to copy the corresponding assert resources to the target project. It mainly depends on whether the channel SDK is provided.


4. Create a project. See the Demo integrated SDK.

We can get a lot of information from the Demo. One is the project configuration, and the other is the API Interface Usage. We only need to view the Demo to figure out the entire channel access process. In this case, I have summarized the following experiences:

View the AndroidManifest. xml file to understand the required configuration of the project, such as permission 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-permission android: name =" android. permission. ACCESS_NETWORK_STATE "/> <uses-permission android: name =" android. permission. READ_PHONE_STATE "/> <uses-permission android: name =" android. permission. SEND_SMS "/> <uses-permission android: name =" android. permission. INTERNET "/> <uses-permission android: name =" android. p Ermission. ACCESS_WIFI_STATE "/> <uses-permission android: name =" android. permission. MOUNT_UNMOUNT_FILESYSTEMS "/> <uses-permission android: name =" android. permission. CALL_PHONE "/> <uses-permission android: 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-permission android: name = "com. android. launcher. permission. UNINSTALL_SHORTCUT"/> <! -- 91 community -->

Components to be configured:

<! -- 91 community --> <activity android: name = "com. nd. commplatform. activity. SNSControlCenterActivity "android: configChanges =" orientation | keyboardHidden | navigation | screenSize "android: launchMode =" singleTask "android: theme =" @ android: style/Theme. noTitleBar. fullscreen "android: windowBackground =" @ null "android: windowSoftInputMode =" adjustPan "> </activity> <activity android: name =" com. nd. commplatform. activity. SNSLog InActivity "android: configChanges =" orientation | keyboardHidden | navigation | screenSize "android: theme =" @ android: style/Theme. noTitleBar. fullscreen "android: windowBackground =" @ null "android: windowSoftInputMode =" adjustPan "/> <er android: name =" com. nd. commplatform. versionupdate. ND2VersionUpdateNotify "android: exported =" false "android: process =" android. intent. nd. sns. commplatform. versionupdate "/> <se Rvice 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: enabled =" true "android: exported =" false "/> <activity android: name =" com. nd. commplatform. activity. SNSAppPromotionActivity "android: configChange S = "orientation | keyboardHidden | navigation" android: launchMode = "singleTask" android: theme = "@ android: style/Theme. noTitleBar "android: windowBackground =" @ null "android: windowSoftInputMode =" adjustPan "/> <service android: name =" com. nd. commplatform. service. ndDownloadService "android: enabled =" true "android: exported =" false "android: process =": com. nd. commplatform. download "/> <activity android: name =" com. nd. co Mmplatform. gc. activity. forumActivity "android: configChanges =" orientation | keyboardHidden | navigation | screenSize "android: theme =" @ android: style/Theme. noTitleBar. fullscreen "android: windowSoftInputMode =" adjustPan "/> <! -- 91 community --> <activity android: name = "com. nd. complatform. stardemo. startActivity "android: configChanges =" orientation | navigation | screenSize "android: label =" @ string/app_name "android: screenOrientation =" landscape "android: 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 the corresponding API call Method Based on the function points, so that we can know how to pass the parameters and callback API methods.


5. Run the test project

After the SDK is integrated, we can run the test project to check the effect and test the functions we want to test, such as login, payment, and floating box functions.




Here we will only show you how to access the 91-channel SDK. This is the effect of the Demo. The specific display effect is developed and implemented by developers.

As for the SDK access, I will introduce it here. The SDK access is not very technical, as long as you have the corresponding programming basics and related platform development experience, you will soon be familiar with SDK access. However, this does not mean that channels can play well. There are many pitfalls in access channels. Not all channels have perfect development documents and encapsulated APIs, some channels may have a variety of inexplicable problems. Sometimes we need to fill in these pitfalls for development, which tests the flexibility of developers, if necessary, you need to find technical support from the corresponding channels and report the problems to them.



The above are some of the experiences I have summarized as a channel access developer, which may be incomplete. If you have any questions, please leave a message for me, I can continue to add relevant content in my blog. I hope this blog can help you. Thank you.







How To Connect C ++ games to the iOS SDK

C ++ developers, such as the cocos2dx engine, usually use C ++ and OC to access 91SDK. The specific method is Baidu, which is a mature technology.

For Android video tutorials, who recommended them ·····?

The visual tutorial of Mars is very detailed. I only learned java for two months. After reading his visual screen, I was able to develop my own android software. It is very good and I hope to adopt it.
Above
 

Related Article

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.