The AppyAds Android library is easily integrated into any Android application. Once included, the application author/owner is able to control advertising within their app. Advertisements can be dynamically changed at any time, introducing new advertising campaigns when desired, without any code changes. Several options allow the application author/owner to release in-home developed advertisements, or subscribe to external sources. Options are dynamically controlled through the AppyAds.com website after an account has been set up for the application.
Library Build Notes
targetSdkVersion 16 // Should be 16 or higher.
The application’s manifest should allow the following permissions:
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
Include/Compile the AppyAds Library
The easiest way to include the AppyAds library into a project is to include the following in the dependencies section of the build.gradle file:
So the final edit of the application’s dependencies section of the build.gradle file might look something like:
implementation fileTree(dir: 'libs', include: ['*.jar'])
Implement AppyAds Service Functionality
The AppyAds library consists of a sub MVC framework, which controls the advertising campaigns visible to users of the Android application. Where these ads are placed within the application depends on the desires of the app designer/author/owner. For example, if the author wishes to have ads in a specific Activity within the Android application all that is required is to place a code snippet similar to the following in the layout xml file for that activity:
Please note that the AppyAdManager view has custom attributes. Because of this, at the top of the layout xml file, the appyadmgr name space must be defined as follows:
Class Reference Documentation
Of course, there are further options available, and initial views can even be embedded within the AppyAdManager view. Please see the AppyAds Android developer pages (especially the AppyAdManager section) for more information.
Setting up Account IDs and Campaign IDs
All advertising campaigns are initiated through an AppyAds account at AppyAds.com. From there, you can sign up for an account and begin to create your own ads, or sign up for ads to be delivered to your app.