The differences and connections between the Play Services ADS framework and the Google Admob in the Java class library

The differences and connections between the Play Services ADS framework and the Google Admob in the Java class library introduction: Play Services ADS framework and Google Admob are two advertising libraries provided by Google to display ads in mobile applications.Although they are all written in Java, they have differences and similarities in some aspects.This article will introduce the differences and connections between the Play Services ADS framework and Google Admob, and provide some Java code examples. difference: 1. Integrated method: Play Services ADS framework and Google Admob can integrate into applications by adding corresponding dependencies.However, the Play Services ADS framework needs to add the Google Play service library dependency item to the application's Build.gradle file, while Google Admob needs to add the Admob library dependencies to the same file. Example: For Play Services ADS framework: implementation 'com.google.android.gms:play-services-ads:19.4.0' For Google Admob: implementation 'com.google.android.gms:play-services-ads:20.4.0' 2. Function and advertising format: The Play Services ADS framework provides a variety of advertising formats, including banner advertisements, paging advertising and native advertisements.In addition, it also supports advertising services provided by Google Ad Manager.In contrast, Google Admob mainly focuses on banner advertisements and paging advertisements. 3. Advertising income: The advertising income of the Play Services ADS framework is managed by Google Ad Manager.Developers can use Google Ad Manager to manage advertising requests, fill rates and advertising revenue.Google Admob directly provides developers with advertising revenue reports and settlement. connect: 1. Sharing code library: Play Services ADS framework and Google Admob are both advertising libraries provided by Google. They have achieved many same functions through sharing code libraries.This allows developers to share code and advertising in different applications. 2. Advertising request and display: Whether it is Play Services ADS framework or Google Admob, developers can use similar Java code to request and display advertisements.For example, the following example demonstrates the code of using the Play Services ADS framework to use the Play Services ADS framework in Android applications: code: AdView adView = new AdView(context); adView.setAdSize(AdSize.BANNER); adView.setAdUnitId("your_ad_unit_id"); AdRequest adRequest = new AdRequest.Builder().build(); adView.loadAd(adRequest); 3. Performance and stability: Because the Play Services ADS framework and Google Admob are provided and maintained by Google, they all have high performance and stability.Developers can use them with confidence to display advertisements without worrying about technical support and maintenance issues. in conclusion: Play Services ADS framework and Google Admob are two Java libraries provided by Google to display advertising.They have some differences in the aspects of integration methods, functions and advertising formats, advertising income, etc., but there are some common points in the usage methods and principles.Developers can choose suitable libraries according to their needs to achieve advertising functions.