Code example for WebView

Methods: destroygetSettings

    * @param context     a context reference 
    * @param publisherId the publisher specific id as specified by Tapad 
    * @param propertyId  the app specific id as specified by Tapad 
    public static void init(Context context, String publisherId, String propertyId) {
        WebView wv = new WebView(context);
        String userAgent = wv.getSettings().getUserAgentString();
        Tracking.init(context, propertyId, null);
        AdResource resource = new AdResource(Tracking.getDeviceId(), publisherId, propertyId, userAgent);
        service = new AdServingServiceImpl(new AdRequestDispatcher(resource, 2));
     * Get a reference to the ad serving service. Please invoke AdServing.init() first to initialize the ad 
     * serving API. 
     * @return the ad serving service 
     * @throws IllegalStateException if the API has not been initialized.