This article link: http://blog.csdn.net/kongxx/article/details/8176986
Tell me today how to create an Android application that is the simplest to receive urban airship notifications.
1. To create an Android application first, it is important to note that the package name of the Android application must match the package name of the application on the urban airsh
better platform for developers, enterprises and consumers ."
Developers can now download Android 2.2sdk, Android ndk, and revision 4 from the android developer website. Google will provide froyo to OEMs and open-source communities in the coming weeks.
1. Speed improvement
When G
://developer.baidu.com/wiki/index.php?title=docs/cplat/push) steps, First register a Baidu developer account, and then create their own application, according to the example of Baidu Cloud server will produce a client's demo, can run on Android mobile phone. Then push the experiment on the page. Of course, you can also download Baidu Cloud
As an Android developer, if you don't yet know genymotion, then you must be a beginner.As is known to all, Genymotion's operating efficiency seconds to kill Google to provide the simulator n many Queens Boulevard, so Genymotion became the world's hottest, the most popular Android simulator. The author of this article, the most detailed version has been to the 2.6
, corresponding Settingactivity.java
53-58 rows: Activity component declaration, corresponding Testactivity.java
62-71 rows: Activity component declaration, corresponding to the Pushactivity.java defined in the Jpush SDK package, I fully suspect that this is the activity that appears in the notification bar when a push message is received by the phone.
73-77 Line: The claim label for the service componen
is not a proper choice for developers.
Since this road is not easy to go, is there any other convenient choice? The answer is yes, and it is easy to implement. Let's look back. Since it is not easy for the server to find the client, but it is easy for the client to find the server, the message push process can be reversed. First, the client regularly accesses the server and establishes a connection (usually an HTTP request ). Then, the server can ea
Android Studio refactoring, let's get back to Google's official Android development tools
Remember my first blog is to write Android Studio, but now it seems a little rough, all refactoring a bit of thought, covering a
Google main push-
. modify assets/airshipconfig. in the properties file, modify the developmentappkey. On the app properties page, you can see developmentappsecret. On the app properties page, you can see transport = helium8. run AVD and test programs. Here I am using the android 4.1.2 Google APIs simulator. Find the apid in the log and remember its value. It will be used later. Select the "
servicethread = new thread (New runnable (){@ OverridePublic void run (){Intent intent = icationicationservice. getintent ();Context. startservice (intent );}});Servicethread. Start ();
Notificationservice class analysis, which is a subclass of a service, focuses on analyzing this service
Public notificationservice (){
/* Icationicationreceiver is a subclass of broadcastreceiver.* Used to receive
Android local push Implementation principle: Open a broadcastreceiver and a alarmmanager, alarm set the push wake-up time, Broadcastreceiver has been detecting whether should push.at present, a lot of mobile phone shutdown application service was killed, unable to accept the push
modifyThe developmentAppKey is displayed on the app properties page.The developmentAppSecret is displayed on the app properties page.Transport = helium
8. Run AVD and the test program. Here I am using the android 4.1.2 Google APIs simulator. Find the APID in the log and remember its value. It will be used later. Select the "Push Enabled" check box for "Preferenc
1. PushGCM Google Cloud messaging service. (Domestic situation)Long connection, a communication connection is always established between the client and the server. Called PushShort connection, pseudo push, called pollingInstant communication implemented by short connections is pseudo-instant communication,Push difficul
API javax. the websocket-related classes in the WebSocket package require JDK 7 and later, Tomcat 7.0.49 and later ):
2-2. start tomcat and use the Android client to connect to chat and receive and push messages.
Iii. Related:
1-1. Java Background:
1-2. Android client corresponding to the Java background
2-1. Java Web Background:
2-2.
connect 4, after the connection can send the message, send the message is also very simple, in addition to support string sent also support byte send, well, the client is so happy to write (detailed code see the following package of demo). Second, the creation of the service side:1-1,Java Application Server creation (using Java-websocket Library), in fact, is also very simple, inheriting a class Websocketserver: 1-2, and then in the main m
Today, I learned the message of server-side processing receipts for Android advanced courses on the Web.This course mainly introduces that when the server pushes the message to the client, the client needs to send a receipt to confirm that the push message was received before the complete push process.A detailed implementation method for the server pushes a messa
mediatypeformattercollection () {New protobufferformatter ()};VaR content = new objectcontent Content. headers. contenttype = new mediatypeheadervalue ("application/X-protobuf ");
Httpclient. postasync (serviceuri, content );
Even though Google protocol buffers is not as popular as XML/JSON, protobuf is undoubtedly a very effective hypermedia type in the use of restful services. I wish you a pleasant New Year!
Related Articles:
Data Exchange Protoc
Quanta Computer, a laptop manufacturer. This may be the helpless choice of Amazon.Lock developer, convenient APISimple is a few applications is certainly not enough to let those hardware manufacturers prostitution, then Google did what?The Play service is a big tool for Google against derivative versions of Android, a
-helium.xml renamed into Androidmanifest.xml.
7. Modify the Assets/airshipconfig.properties file and modify the Developmentappkey in the app properties page to see Developmentappsecret on the App properties page Transport = Helium
8. Run AVD and test program, here I use the Android4.1.2 Google APIs simulator. Note Look up the apid in the log, remember the value, and use it later. Then select the "Push Enabl
the required knowledge points: Notification, ServiceThird party Open source framework: Android-async-http-masterthe source of the push:Android projects, sometimes there is a need: customers every time, just like the server sends a request to get some important, real-time updated messages. such as the version update, whether the request is re-downloaded, etc.The key point is: How do you keep your app's implementation running in the background and send
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.