Add Friends League stats _php Tutorial in Android app

Source: Internet
Author: User
Tags macbook

Add Friend League stats in Android apps


Hardware and Software Environment

    • Macbook Pro MGX 72
    • Android Studio 1.3.2
    • Genymotion Simulator

Objective

Friends Alliance is a mobile application statistical analysis platform. It helps mobile app operators to count and analyze traffic sources, product retention data, user attributes, and behavioral data, so that product developers and operators can leverage data to make decisions about product, operations, and marketing strategies.

Integrated Friends League SDK

First to the Friend Union official website http://www.umeng.com/Register an account, completes to the management backstage to add the need to integrate the friend Alliance statistic application, as follows

After submission, assign a key to your app, as follows

Next to the Http://dev.umeng.com/analytics/android-doc/sdk-download Download SDK, copy the jar file from the Libs in the downloaded folder to the Libs in the project, on Android In studio, right-click the jar file and select Add as library to complete the import.

Configure Androidmanifest.xml

Add the appropriate permissions, as follows

 
    
    
    
    
    Uses-permission android:name= "Android.permission.INTERNET" >  
    
     

Then fill in the key and channel ID, a package can only add a channel, as follows


  
   
  
   

Integration Code

The Mobclickagent.onresume (context) is called in the Onresume method of each activity, and mobclickagent.onpause (context) is called in the OnPause method. If there is an inheritance relationship between the activity, do not repeat the addition of Onresume and OnPause methods, otherwise there will be repeated statistics, affecting the statistical results. If the app has a method called Process.kill or System.exit to kill the process, be sure to call the Mobclickagent.onkillprocess (Context) method before this to save the statistics.

At this point, the basic functionality has been integrated, or very simple. Some of the following advanced features, can be added according to their own needs, the official documents have been written in detail, here is no longer written, interested in the friends of the league's official website to view.

Reference documents

1, http://www.umeng.com/
2, Http://dev.umeng.com/analytics/android-doc/integration

http://www.bkjia.com/PHPjc/1077806.html www.bkjia.com true http://www.bkjia.com/PHPjc/1077806.html techarticle Add Friend League statistics software and hardware environment in Android app Macbook Pro MGX Android Studio 1.3.2 genymotion simulator The Friend League is a mobile application statistical analysis platform. It can help move ...

  • 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.