getBaseUrl

open fun getBaseUrl(): String

Returns the Pushwoosh API base URL the SDK currently sends requests to.

This is the effective endpoint, not necessarily the value the app passed: it reflects an explicit URL from setAppId or the com.pushwoosh.base_url manifest metadata, the default URL derived from the application code, and any later server-side rotation (a base_url in a response or the set_base_url push command). A configured reverse proxy is deliberately not reflected here: it is a transport in front of the endpoint, not the endpoint itself. Example:


  String baseUrl = Pushwoosh.getInstance().getBaseUrl();
  Log.d("App", "Pushwoosh API endpoint: " + baseUrl);

Return

current Pushwoosh API endpoint, e.g. https://XXXXX-XXXXX.api.pushwoosh.com/json/1.3/, or null if it is not computed yet (no application code configured or SDK not initialized)

See also