[Slide sharing] Android message push implementation | umeng Xu xianming | Android devcamp

Source: Internet
Author: User

Technical implementation of Android app practical functions: Android message push implementation | Android devcamp

Topic Introduction: as an important demand for mobile application development, Microsoft and Apple provide good message push solutions for iOS and Windows Phone platform app developers. In fact, Google also provides c2dm solutions for Android platform for developers. However, due to various reasons, it is difficult for Android Developers to use c2dm in China. For this common problem, we will discuss with you possible alternatives, such as scheduled requests, SMS, third-party services, and self-built message servers. By analyzing and comparing the advantages and disadvantages of these methods, developers can provide some suggestions to help developers select solutions that suit their own needs and conditions.

Lecturer profile: Xu xianming, Senior Android Development Engineer of umeng, is mainly responsible for the development of umeng exchange product SDK. Interests include: Android Application Development, big data analysis and mining on the mobile Internet platform, machine learning, and mobile platform security.

Recommendation index: 3 stars

Recommendation reason: I am very interested in this topic. I am very careful about slide preparation, a summary of all the solutions, and a sincere discussion of the path.

Disadvantages: The content is slightly simplified.

Field score: 3.4

[Lecturer's on-site photo]

[Online slide viewing ]*:

Android message push implementation | umeng Xu xianmingFrom Shining @ devcamp

Note: * miss Hyun's preference for the slideshare platform allows her to upload and share images only with her tips, but Miss Hyun insisted on choosing a powerful, concise, and easy-to-use platform. I would like to pay tribute to foreign teams that have developed excellent tools and platforms for the benefit of the Internet and humanity, and I would like to express my position on domestic restrictions on these excellent tools and platforms. If you cannot browse normally, you need to use tips like Hyun's sister. For those readers who still don't know what Xuan Jie is talking about, you can go here to find the reason.

[Slide download page]: Android devcamp slide download: Android message push implementation | umeng Xu xianming-from csdn download channel (free download without points)

[Slide content is coming soon ]:
  • 1. Android devcampproduced by csdn
  • 2. Q: Xu xianming, Android message push
  • 3. What is it? Source: http://the-gadgeteer.com/2009/10/30/day-3-android-basics-on-verizons-droid/
  • 4 .? What is a message push example? • pull a Text Segment • users do not need to actively refresh • pull a design mode publish/subscribe • pull a command
  • 5. apple shortapns ("A" for "Apple", not "Android") Google • shortc2dm-> Google cloud messaging (GCM) Microsoft • shortdirect push, exchange ActiveSync, long lived HTTPS rim • pull push technology, Push Mail Nokia • pull Symbian, Push Mail
  • 6. Google solution-GCM for Android
  • 7. google cloud messagingl plugin evolved from c2dm (cloud to device messaging) l plugin reference: • Alibaba Google cloud messaging for Android http://developer.android.com/guide/google/gcm/index.html • Alibaba Google Io 2012: google cloud messaging for Android https://developers.google.com/events/io/sessions/gooio2012/100/ • drawing Google Io 2010: Building push applications for Android http://dl.google.com/googleio/2010/android-push-applications-androidmodules
  • 8. GCM case study -- Chrome to phone Source: Google Io chrome to phone
  • 9. Composition of mobile device applica tion server GCM servers sender ID application sender auth ID token credentials registration Google user ID accountreference: http://developer.android.com/guide/google/gcm/gcm.html
  • 10. GCM service your app Server 1.1. app_id, sender_id1.2. app_id, sender_id, device_id 2.1. reg_id 2.2. reg_id 3. reg_id 4. reg_id, API key, message 5.1. message 5.2. notification
  • 11. Steps to register the Android device to send the user account (such as the android.c2dm.demo@gmail.com) and app name that uses the c2dm feature to the c2dm server. When the receiving GCM server returns reg_id c2dm, the server returns the region registration_id value to the Android device. The device needs to save the registration_id value. Send the reg_id to the application server and send the registration_id and user ID to your server. The application server sends data to the GCM server. The application server sends the data to be sent, registration_id, and authentication to the c2dm server. GCM pushes data to Android devices. for Android devices, you only need to obtain data from the corresponding key in the format discussed with the server in the program.
  • 12. GCM is very good,... Google Play (Android Market) Google account • meizu, Huawei and many other domestic mobile phones> = froyo (2.2) • meizu 94.6%, as of the server is in the United States • the region service is not reliable • the region app server is best placed abroad
  • 13. Small dessert sending data server domain name SSL signature unreliable (as of) • Small https://android.apis.google.com/c2dm/send
  • 14. In addition to GCM http://www.push-notification.org/DIY http://www.pubnub.com/http://getsocialize.com/http://urbanairship.com/http://www.android-push.com/
  • 15. How complicated is DIY? Unstable network • hybrid GPRS, 3G High concurrency • Small 500 k battery capacity • hybrid 1400 mah http://developer.android.com/guide/google/gcm/adv.html#retry
  • 16. Source: http://dl.google.com/googleio/2010/android-push-applications-android.pdf
  • 17. Several DIY Methods • Persistent real-time SMS polling (polling) persistent connections (persistent TCP/IP) • Cost-effective • easy to implement • failover service processes? • Simple deployment architecture • failover concurrency? • Insufficient real-time failover • DDoS? • Renewal cycle? Mechanism? • Worker Power Consumption
  • 18. Self-Reliance mqtt androidpn rsmb/openfire masquitto wmqtt. Jar asmack mqtt XMPP
  • 19. mqtt -- an experiment by Anton lopyrev server: masquitto/rsmb client: the client has no wmqtt authentication. jar IBM connections limited protocol: mqtt persistent TCP • abort ping to keep topic: alive device ID • Keep wake lock/alarmmanagerreference: http://dalelane.co.uk/blog? P = 1599 http://tokudu.com/2010/how-to-implement-push-notifications-for-android/
  • 20. androidpnl release open-source project • Release http://sourceforge.net/projects/androidpn/l?openfire + spring + Mina + asmack + xmppl release XMPP • distributed • secure security: SASL and TLS • release open-source • Release cross platform
  • 21. androidpn server: openfire long client: polling asmack androidpn topic: Protocol: Device xmpp id mina: async Io
  • 22. c500k -- urban airship experiment implementation connections memory used Java pure NiO 512,000 + 2.5 GB Java w/netty 330,000 2.2 GB Scala w/netty 173,000 1.5 GB Source: http://urbanairship.com/blog/2010/08/24/c500k-in-action-at-urban-airship/
  • 23. c500k -- urban airship experiment L kernel Linux Kernel Tuning 64bit • Kernel FS. file-max = 999999 • mongonet. ipv4.tcp _ rmem = 4096 4096 16777216 • ipvnet. ipv4.tcp _ WMEM = 4096 4096 16777216l using Java NiO Source: http://urbanairship.com/blog/2010/08/24/c500k-in-action-at-urban-airship/
  • 24. However, there are no mature third-party message PUSH Service Providers in China
  • 25. Well, it seems that the codenon said that this is too complicated. It's not that simple. I can't decide whether to use the push function in this version. If it doesn't rain tomorrow, I will go to the garage and place a team for coffee.
  • 26. Thank you

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.