The example explains in detail how Android studio imports. So files

The following is a demo written by myself, which is definitely not an official demo, to tell you how to import. So files in Android studio. You are welcome to leave a message below for discussion and correction.

1. How Android studio loads the jar package and. So library file pushed by Aurora

2. How to get the value corresponding to the key in the additional field

3. How to click the notification bar to enter the WebView loading page

4. How to store the pushed messages and display them in listview to view the push history

5. How to click the item of listview to jump to the web page and enter the WebView loading page again

6. How to set an undisturbed period for push. (copy official demo)

7. Attribute animation effect

I was pushed and abused by the aurora many times when I was able to write this article. When I was about to give up, I finally found the problem. To put it bluntly, it was my carelessness. As for what problem, I'll talk about it later

At the end of this article, there is a demo written by myself. You can download it. There are a lot of download points. It is definitely not an official automatically generated demo. The only thing in common is that the setting of disturbance free period is copied directly. When I was tortured by the aurora, I also found a lot of demos to see, but those demos are either the official original or slightly changed, I still change the soup without changing the dressing. It also cost me a lot of points, and the title said that I wrote the demo myself, so I ha ha. I really have no conscience. My demo can't say how good it is, but at least it's not an official demo, and the interface is OK, at least I think so. Another point, my demo or this article is almost suitable for novices who want to push with Aurora but don't know where to start, Or for a person who has been abused many times like me, if you want to ask how to write on the server, this article and demo are not suitable for you. It is estimated that your level has exceeded me. This article mainly says to use ordinary push, finish the nonsense and get to the point

First of all, make it clear to what extent can I receive or not report an error if I want to receive the push of Aurora. Some people say that I need to copy all the classes in the official demo, or do I need to copy several? Now I tell you that you can receive none of the classes in the official demo without copying them, but the premise is to configure the manifest.xml manifest file. Here is the first point:

1. How Android studio loads the jar package and. So library file pushed by Aurora

Download and unzip the Android version push SDK on the official website of Aurora push, as shown in the following figure:

In the liibs directory, there are pushed jar packages and library files supporting mobile phone architecture with suffix. So. In the res directory, there are some XML files and pictures. These files are used to receive rich media messages. The files in the res directory can be directly copied to the corresponding directory. The files in the LIBS directory are mainly about

By default, various versions of the arm architecture are included. If the system architecture of your mobile phone or simulator is x86 or MIP, you can download the corresponding version from the aurora official website, and there is a jar package of the aurora push SDK. How to integrate jar files with Android studio has been mentioned in my previous blog. You can turn to my previous blog. Now only how to load the. So library file is left, I have found many methods before, but in the end, there is only one useful method, that is, the method provided by the official website of Aurora, as shown in the following figure:

Complete the above two steps to configure the jar package and. So library file, which can be used by my personal test

2. How to obtain the value corresponding to the key in the additional field. Open the aurora push official document. As shown in the following figure:

The above two actions and three constants can complete 80% of the push part received by the client, and my demo is based on these two actions and three constants. The following is a screenshot of how to use these actions and constants:

3,3. How to click the notification bar to enter the WebView loading page

Click the notification bar to notify you to enter the WebView loading page. First, listen to the action of clicking the notification, and you have to have a WebView interface, as shown in the following figure

4. It is convenient to view the push history

Finally, the item displayed by listview is in this style:

5. Enter the WebView loading page again

This is simple. Just listen to the onItemClick event directly, as shown in the following figure:

6. How to set an undisturbed period for push

Directly copy the official demo. There's nothing to say. See the official demo

7. Attribute animation effect

This is also what I said in my last blog. You can read it. I directly take the example of my last blog as the main interface of my demo. It looks good

When I mentioned that I was abused, it was actually caused by carelessness. When I configured the manifest.xml file, I did not configure a package name, and always reported null pointer errors to me. Later, I found that it was changed, and everything was OK. The key is to be careful. Here is a complete list file that I have repaired

Again, I only use ordinary messages to send messages on the server interface, and neither custom messages nor rich media messages are useful. Finally, I sent ordinary messages on the previous server:

The above is the whole content of this tutorial. If you need a friend to test it, you can feed back the results to our programming tips. You are also welcome to contribute enthusiastically.

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>