Code example for WebView

Methods: destroygetSettings

0
    * @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();
        wv.destroy();
 
        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. 
Experience pair programming with AI  Get Codota for Java