Goal of this project demonstrate how to write own SDK for Portum Ad Server API. This project contains two modules:
- sdk
- sample
SDK module implemented as android library which expose single activity com.portum.android.sdk.PortumAdActivity
and provide single point to work with SDK as developer com.portum.android.sdk.PortumFacade
. For more information about com.portum.android.sdk.PortumFacade
look in comments for methods.
Another classes puted in com.portum.android.sdk.internal
package and all classes in this package have final
modifier to exclude inproper usages
Packages description:
com.portum.android.sdk.internal.adapter
- json conversion adapterscom.portum.android.sdk.internal.helper
- helper classescom.portum.android.sdk.internal.model
- data modelscom.portum.android.sdk.internal.network
- ad server API client implementationcom.portum.android.sdk.internal.network
- listener related classes
Important note that sdk have configuration of server location in build.gradle
, so during debug it's point to stage server, and during release it's point to release server
For SDK user to be aknowledged about some events com.portum.android.sdk.PortumListener
can be implemented and installed in com.portum.android.sdk.PortumFacade
Sample module implemented as simple single activity android application. On this activity you can set Ad Unit Id
and show an ad related to this Ad Unit Id
, com.portum.android.sdk.PortumAdActivity
will be shown asynchronously
All third-party dependencies listed in sdk/build.gradle