Current location - Quotes Website - Signature design - What is Taobao android client made of?
What is Taobao android client made of?

When I first started writing, I found that it was not available on the Internet, so I wrote it myself. However, I encountered some problems in the middle, so I sent the sample code and made some explanations to facilitate subsequent learning. or reduce study time.

The user experience of Taobao's user authorization is not bad. I have also asked Taobao's technical staff about this, and they said they will improve it in the future. When I was interviewing Taobao 3 times that day, the technical interviewer happened to be the boss of Taobao's wireless platform. I also asked him this question, and he said that these problems will be solved in the future. Taobao official does not have a complete document on the wireless platform, but there is one in a group. I also found the document on the wireless platform in this group. I will upload it in the attachment for your reference.

For the specific process, please refer to the documents in the wireless platform of Taobao Open Platform, as well as the "Third-party APP Login Authentication API V1.3 (beta).doc" document I uploaded in the attachment. It's very well written. Please read it carefully. If you have any questions that you don't understand, read it again and again. If you still don't understand, you can go to the group provided by Taobao and ask, or you can send me an email. I will reply to everyone when I see it. At the end I will leave my contact information.

After the application is run, this is the interface:

The first button: returns some information and the user authorization login page to guide the user to authorize. The specific information returned is as follows: /mtop/bind_app_result.htm?

sid=8b8101660406429abe4dd71313890a6e

&ac=1

&appkey=12344741

&callback_url=null

After completing this step, click the return button that comes with the simulator, and you can continue to jump to this page to perform the following operations.

As for what these things are used for, including what the return values ??of the following buttons are used for, you will naturally understand if you read the documentation. I am here to say, maybe It's a lot to say, but no one will understand it. It's easy to understand by reading the documentation.

Second button: Get the Session of the user session:

The specific return value is as follows: {

"api":"com.taobao.client.mtop .getUserSessionKey",

"v":"*",

"ret":["SUCCESS::Called successfully"],

"data" :

{

"topsession":"409233524d8dd1e5a8b534fd1648210c5d23796202iWx4496c6575881",

"sid":"8b8101660406429abe4dd71313890a6e ",

"time": "20110923",

"ecode":"wuPLf","nick":"lin_3354",

"token":"21eb29ea3a52303abb9d9f5d2087eaf532a24dde96617bb5f412744799f2dcc670306225862f9 5dd864992618fe5e0b5cbc931214f5fd87e36f7f52939b0477f16fd0e4897b32f30e08c6e0826e8e2c4262924356f60f7c63022886d63727a0fc587b305 24550d8e0e5736b5efd06a06e1a0d049dbab0dc85266a51d23edb675"

}< /p>

}

The third button: Automatic login (to realize automatic login of users)

The specific return information is as follows:

{

"api":"com.taobao.client.sys.autologin","v":"*",

"ret":["SUCCESS::The call was successful"],

"data":

{

"sid":"8b8101660406429abe4dd71313890a6e","ecode":"lFLFc","nick":"lin_3354",

"logintime":"1316777970",

"userId":"202657588",

"topSession":"409231424d8dd1e5a8b53dfU9pB064fd1648210c5d237962026575881"

p>

}

}

The fourth button: Get the personal information of the user in the current session

It will return the personal simple information of the currently logged-in user, see for details log output. I did not output it to the interface, only to the log.

Fifth button: Use Taobao API to obtain product information for sale for which the currently logged-in user is the seller

Use the API provided by Taobao to obtain data and display it on the interface . This is an example of how to use the API. Other API usage methods are similar.

During the learning process, the main problem was that there was something wrong with the signature. I misunderstood what the document meant. Later, when I asked Taobao's technical staff, I discovered that my signature method was wrong. Everyone has to register a Taobao Wireless application by themselves, I won’t give it to you. It just so happens that you can practice some basic things such as how to register.

There is another question. In fact, Taobao has provided an SDK developed by a third-party company, but I asked Taobao's technical staff and he said that the company has stopped the development and maintenance of this project.

I have also used the SDK developed by that company. I personally feel that the architecture is very good, but the encapsulated API is incomplete and much less.

So when the API you need is not encapsulated well, you may Don't know how to use it. Therefore, I suggest that everyone should write it themselves. According to the instructions in the document, write the request step by step and do some things by yourself. This way you will have a clear understanding of the underlying implementation. If you need to use the SDK in the future, you will be able to use it very easily. If there is a problem, you can also analyze the problem. However, if you use the SDK directly, there may be problems sometimes, and you can't even find the problem. Therefore, we strongly recommend that you write it yourself and try not to use the SDK.

Okay, that’s all. I hope I can help you. If you have any questions, please feel free to ask me. I will answer patiently. But don’t ask all questions. It’s best to try to solve it yourself for a day. If it still doesn’t work, ask me. I will definitely answer it as long as I have time. At the same time, I also hope that students who are new to Android development will have more contact with domestic or foreign open platforms, so that what you get is real massive data, and what you learn is not just as simple as technical development.

You will learn more about business issues. Technology is not the most rare thing, but familiarity with business is the most important. If you have a good idea, if you or your team can win the prize in the development competition held at home or abroad every year, the bonus will be very generous. At the same time, if you still have your own Android phone, it would be very pleasant to write an application and put it on your phone for your own use.

Finally, I wish everyone a happy study and be happy every day. Happiness is the most important thing in life!