{"_id":"59560afbadad04004946dd74","project":"5540ce1b31827a0d007ab1cc","version":{"_id":"5540ce1c31827a0d007ab1cf","project":"5540ce1b31827a0d007ab1cc","__v":31,"createdAt":"2015-04-29T12:27:08.390Z","releaseDate":"2015-04-29T12:27:08.390Z","categories":["5540ce1c31827a0d007ab1d0","5540d91bbb9e762d00f594ad","5540e5f131827a0d007ab212","5540e5febb9e762d00f594d3","5540e61331827a0d007ab213","5540e6195cf9682100d61afa","5540e62631827a0d007ab214","5540e63031827a0d007ab215","5540e63531827a0d007ab216","5540e63e5cf9682100d61afc","5540e6445cf9682100d61afd","5540e64a5cf9682100d61afe","55a4ff5b2e70c0250038050f","55acb28318eefd0d0071d504","55ae1abe8576b92300291c80","55ae453ef302af23000ac109","55af586d555b900d0036d296","55af91dac8a85321007a53c3","55b9fee204775a2f00628071","55b9ff0e04775a2f00628072","55b9ff4604775a2f00628073","55b9ff5fd72d1e1900276a38","55b9ff7f04775a2f00628074","55b9ff90eb08801900f833e5","55b9ffa5d72d1e1900276a39","55b9ffca04775a2f00628075","55b9fffdd72d1e1900276a3a","56bc2f033ee9e70d008b46af","56c2f6efbbf9ec2d00e0fe4f","57595bbb18760817001e8bbe","57d8d9793916800e003dde53"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"category":{"_id":"5540e5f131827a0d007ab212","__v":15,"project":"5540ce1b31827a0d007ab1cc","pages":["5540e66b31827a0d007ab217","5540e67731827a0d007ab219","55ac917b5863b817008ae3b4","55acaa4c6b4ff90d00784a92","55acb96418eefd0d0071d553","55acc8aa18eefd0d0071d596","55accd2818eefd0d0071d5a8","55acd06518eefd0d0071d5b6","55acddd7fb7b3c19003739cc","55ace14bfb7b3c19003739d3","55ace3a9fb7b3c19003739d7","55acea24f93f0c0d005b880f","55acf15bf93f0c0d005b8821","55acf3cd18eefd0d0071d5fb","55d1f1c0486de50d00326f17"],"version":"5540ce1c31827a0d007ab1cf","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-04-29T14:08:49.271Z","from_sync":false,"order":4,"slug":"android","title":"Android"},"user":"55b8b82fdec1c9210013cfa1","__v":0,"parentDoc":null,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2017-06-30T08:25:31.286Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":6,"body":"* [In App Purchase Tracking](http://docs.pushwoosh.com/docs/customising-android-sdk-50#in-app-purchase-tracking)\n* [Deep Linking](http://docs.pushwoosh.com/docs/customising-android-sdk-50#deep-linking)\n* [Geozones push notifications](http://docs.pushwoosh.com/docs/customising-android-sdk-50#geozones-push-notification)\n* [Using Local Notifications](http://docs.pushwoosh.com/docs/customising-android-sdk-50#using-local-notifications-with-pushwoosh)\n* [Using Badge Number](http://docs.pushwoosh.com/docs/customising-android-sdk-50#using-badge-number-on-android)\n* [Opening custom activity](http://docs.pushwoosh.com/docs/customising-android-sdk-50#opening-custom-activity)\n* [Controlling log level](http://docs.pushwoosh.com/docs/customising-android-sdk-50#controlling-log-level)\n* [Using Proguard](http://docs.pushwoosh.com/docs/customising-android-sdk-50#using-proguard)\n* [Customizing notifications open behavior](http://docs.pushwoosh.com/docs/customising-android-sdk-50#customising-notification-open-behaviour)\n* [Customizing push notifications](http://docs.pushwoosh.com/docs/customising-android-sdk-50#customizing-push-notifications)\n[block:api-header]\n{\n  \"title\": \"In App Purchase tracking\"\n}\n[/block]\nIn order to track in-app purchases you should call the `sendInappPurchase` method of the `Pushwoosh` class when a user buys a product:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"public void sendInappPurchase(java.lang.String sku,\\n                              java.math.BigDecimal price,\\n                              java.lang.String currency)\",\n      \"language\": \"java\"\n    }\n  ]\n}\n[/block]\n * `sku` – purchased product ID\n * `price` – price of the product\n * `currency` – currency of the price (ex: “USD”)\n\nExample:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"pushManager.trackInAppRequest(context, \\\"com.example.inapp1\\\", \\\"1.99\\\", \\\"USD\\\", new Date());\",\n      \"language\": \"java\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"title\": \"Deep linking\"\n}\n[/block]\nIn your activity that will handle the deep link add <data> tag with the scheme, host and pathPrefix parameters.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<activity\\n          android:name=\\\".PromoActivity\\\"\\n          android:label=\\\"PromoActivity\\\">\\n    <intent-filter>\\n        <action android:name=\\\"android.intent.action.VIEW\\\" />\\n        <category android:name=\\\"android.intent.category.DEFAULT\\\" />\\n        <category android:name=\\\"android.intent.category.BROWSABLE\\\" />\\n\\n        <data android:scheme=\\\"com.pushwoosh\\\"\\n          android:host=\\\"promotion\\\"\\n          android:pathPrefix=\\\"\\\" />\\n    </intent-filter>\\n</activity>\\n\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"Note that deep link page name (*promotion* in the example) goes to the **host** field, **not** **pathPrefix**.\"\n}\n[/block]\nIn the example above the deep link will open PromoActivity. The basic implementation below  displays alert with promo id value for the sake of simplicity. In your application it could definitely do something useful!\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"public class PromoActivity extends Activity\\n{\\n\\t\\t:::at:::Override\\n\\t\\tprotected void onCreate(Bundle savedInstanceState)\\n\\t\\t{\\n\\t\\t\\t\\tsuper.onCreate(savedInstanceState);\\n\\n\\t\\t\\t\\tsetContentView(R.layout.deep_link);\\n\\t\\t\\t\\tsetTitle(\\\"Deep link activity\\\");\\n\\t\\t\\n\\t\\t\\t\\tIntent intent = getIntent();\\n\\t  \\t  String action = intent.getAction();\\n\\t    \\tUri data = intent.getData();\\n\\t    \\n\\t\\t    if (TextUtils.equals(action, Intent.ACTION_VIEW))\\n\\t\\t    {\\n\\t  \\t\\t  \\topenUrl(data);\\n\\t\\t    }\\n\\t\\t}\\n\\t\\n\\t\\tprivate void openUrl(Uri uri) \\n\\t\\t{\\n\\t\\t\\t\\tString promoId = uri.getQueryParameter(\\\"id\\\");\\n\\t\\t\\t\\tToast.makeText(getApplicationContext(), promoId, Toast.LENGTH_LONG).show();\\n\\t\\t}\\n}\",\n      \"language\": \"java\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"title\": \"Geozones push notification\"\n}\n[/block]\nTo use geozone pushes simply add `com.pushwoosh:pushwoosh-location` library and call\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"PushwooshLocation.startLocationTracking();\",\n      \"language\": \"java\"\n    }\n  ]\n}\n[/block]\nIt is recommended to check dynamic permissions `android.Manifest.permission.ACCESS_FINE_LOCATION` and `android.Manifest.permission.ACCESS_COARSE_LOCATION` before invoking this method\n[block:api-header]\n{\n  \"title\": \"Using Local Notifications with Pushwoosh\"\n}\n[/block]\nIf you use Pushwoosh Local Notifications API add RECEIVE_BOOT_COMPLETED permission to your AndroidManifest.xml:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<uses-permission android:name=\\\"android.permission.RECEIVE_BOOT_COMPLETED\\\"/>\",\n      \"language\": \"xml\",\n      \"name\": \"AndroidManifest.xml\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"title\": \"Using Badge Number on Android\"\n}\n[/block]\nPushwoosh supports setting badge number on the app icon shortcut for the following Android launchers:\nSony, Samsung, LG, HTC, Xiaomi, ASUS, ADW, APEX, NOVA, HUAWEI, ZUK, OPPO.\nTo use this functionality simply add `com.pushwoosh:pushwoosh-badge` library to your application.\n[block:api-header]\n{\n  \"title\": \"Opening custom activity\"\n}\n[/block]\nIf you want to start particular activity in response to push notifications add the following intent-filter to that activity.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<activity android:name=\\\"YourActivity\\\">\\n    <intent-filter>\\n        <action android:name=\\\"${applicationId}.MESSAGE\\\"/>\\n        <category android:name=\\\"android.intent.category.DEFAULT\\\"/>\\n    </intent-filter>\\n</activity>\",\n      \"language\": \"xml\",\n      \"name\": \"AndroidManifest.xml\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"title\": \"Controlling Log Level\"\n}\n[/block]\nIn order to assist with debugging and integration, SDK will print all the requests to the console by default. When you ready for the production build, add \"PW_LOG_LEVEL\" meta-data with value \"ERROR\" to the AndroidManifest.xml. This way only information about errors will go to the console. Other option could be one of the following:\n\n*NONE* - No logs from the SDK\n*ERROR* - Display only errors in the console\n*WARN* - Display also a warnings\n*INFO* - Display informational messages\n*DEBUG* - Even debug information is displayed now\n*NOISE* - Everything SDK can print and more\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"\\n<meta-data android:name=\\\"com.pushwoosh.log_level\\\" android:value=\\\"ERROR\\\" />\",\n      \"language\": \"xml\",\n      \"name\": \"AndroidManifest.xml\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"title\": \"Using Proguard\"\n}\n[/block]\nWhen using Proguard add the following options:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"-keep class com.pushwoosh.** { *; }\\n-dontwarn com.pushwoosh.**\",\n      \"language\": \"text\",\n      \"name\": \"proguard-rules.pro\"\n    }\n  ]\n}\n[/block]\nAlso see **Google Play Services** library requirements regarding Proguard here:\nhttps://developers.google.com/android/guides/setup\n[block:api-header]\n{\n  \"title\": \"Customising Notification open behaviour\"\n}\n[/block]\nIf you need to programmatically select which activity to display as a result of push notification, you can create custom [NotificationServiceExtension](https://rawgit.com/Pushwoosh/pushwoosh-android-sdk/master/Documentation/com/pushwoosh/notification/NotificationServiceExtension.html) and include fully qualified class name of your NotificationServiceExtension in metadata under “com.pushwoosh.notification_service_extension” value.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<meta-data\\n    android:name=\\\"com.pushwoosh.notification_service_extension\\\"\\n    android:value=\\\"com.your.package.YourNotificationServiceExtension\\\" / >\",\n      \"language\": \"xml\",\n      \"name\": \"AndroidManifest.xml\"\n    }\n  ]\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"public class YourNotificationServiceExtension extends NotificationServiceExtension {\\n    @Override\\n    protected void startActivityForPushMessage(PushMessage message) {\\n      // super.startActivityForPushMessage() starts default launcher activity \\n      // or activity marked with ${applicationId}.MESSAGE action.\\n      // Simply do not call it to override this behaviour.\\n        // super.startActivityForPushMessage(message);\\n\\n        // start your activity instead:\\n        Intent launchIntent  = new Intent(getApplicationContext(), YourActivity.class);             \\n        launchIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED);\\n \\n        // (Optional) pass notification data to Activity\\n        launchIntent.putExtra(Pushwoosh.PUSH_RECEIVE_EVENT, message.toJson().toString());\\n \\n        context.startActivity(launchIntent);\\n    }\\n}\",\n      \"language\": \"java\",\n      \"name\": \"YourNotificationServiceExtension.java\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"title\": \"Customizing push notifications\"\n}\n[/block]\nTo customize the view of push notifications you need to create a custom Factory, you can create custom [NotificationFactory](https://rawgit.com/Pushwoosh/pushwoosh-android-sdk/master/Documentation/com/pushwoosh/notification/NotificationFactory.html) and include fully qualified class name of your NotificationFactory in metadata under “com.pushwoosh.notification_factory” value.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<meta-data\\n    android:name=\\\"com.pushwoosh.notification_factory\\\"\\n    android:value=\\\"com.your.package.YourNotificationFactory\\\" / >\",\n      \"language\": \"xml\",\n      \"name\": \"AndroidManifest.xml\"\n    }\n  ]\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"public class YourNotificationFactory extends PushwooshNotificationFactory {\\n\\t@Override\\n\\tpublic Notification onGenerateNotification(@NonNull PushMessage pushMessage) {\\n\\t\\tif (customNotification) {\\n       // TODO: generate and return custom notification\\n    }\\n    \\n    // return default Pushwoosh notification\\n\\t\\treturn super.onGenerateNotification(pushMessage);\\n\\t}\\n}\",\n      \"language\": \"java\",\n      \"name\": \"YourNotificationFactory\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"title\": \"Private Endpoint URL\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"success\",\n  \"body\": \"Enterprise only.\"\n}\n[/block]\nPushwoosh provides Private endpoints for Enterprise customers. To set up Private endpoint for iOS SDK you need to add the following to your **AndroidManifest.xml** file\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<meta-data android:name=\\\"com.pushwoosh.base_url\\\" android:value=\\\"PUSHWOOSH_PRIVATE_ENDPOINT_URL_PROVIDED\\\" />\",\n      \"language\": \"xml\",\n      \"name\": \"AndroidManifest.xml\"\n    }\n  ]\n}\n[/block]","excerpt":"","slug":"customising-android-sdk-50","type":"basic","title":"Customising Android SDK 5.0"}

Customising Android SDK 5.0


* [In App Purchase Tracking](http://docs.pushwoosh.com/docs/customising-android-sdk-50#in-app-purchase-tracking) * [Deep Linking](http://docs.pushwoosh.com/docs/customising-android-sdk-50#deep-linking) * [Geozones push notifications](http://docs.pushwoosh.com/docs/customising-android-sdk-50#geozones-push-notification) * [Using Local Notifications](http://docs.pushwoosh.com/docs/customising-android-sdk-50#using-local-notifications-with-pushwoosh) * [Using Badge Number](http://docs.pushwoosh.com/docs/customising-android-sdk-50#using-badge-number-on-android) * [Opening custom activity](http://docs.pushwoosh.com/docs/customising-android-sdk-50#opening-custom-activity) * [Controlling log level](http://docs.pushwoosh.com/docs/customising-android-sdk-50#controlling-log-level) * [Using Proguard](http://docs.pushwoosh.com/docs/customising-android-sdk-50#using-proguard) * [Customizing notifications open behavior](http://docs.pushwoosh.com/docs/customising-android-sdk-50#customising-notification-open-behaviour) * [Customizing push notifications](http://docs.pushwoosh.com/docs/customising-android-sdk-50#customizing-push-notifications) [block:api-header] { "title": "In App Purchase tracking" } [/block] In order to track in-app purchases you should call the `sendInappPurchase` method of the `Pushwoosh` class when a user buys a product: [block:code] { "codes": [ { "code": "public void sendInappPurchase(java.lang.String sku,\n java.math.BigDecimal price,\n java.lang.String currency)", "language": "java" } ] } [/block] * `sku` – purchased product ID * `price` – price of the product * `currency` – currency of the price (ex: “USD”) Example: [block:code] { "codes": [ { "code": "pushManager.trackInAppRequest(context, \"com.example.inapp1\", \"1.99\", \"USD\", new Date());", "language": "java" } ] } [/block] [block:api-header] { "title": "Deep linking" } [/block] In your activity that will handle the deep link add <data> tag with the scheme, host and pathPrefix parameters. [block:code] { "codes": [ { "code": "<activity\n android:name=\".PromoActivity\"\n android:label=\"PromoActivity\">\n <intent-filter>\n <action android:name=\"android.intent.action.VIEW\" />\n <category android:name=\"android.intent.category.DEFAULT\" />\n <category android:name=\"android.intent.category.BROWSABLE\" />\n\n <data android:scheme=\"com.pushwoosh\"\n android:host=\"promotion\"\n android:pathPrefix=\"\" />\n </intent-filter>\n</activity>\n", "language": "xml" } ] } [/block] [block:callout] { "type": "info", "body": "Note that deep link page name (*promotion* in the example) goes to the **host** field, **not** **pathPrefix**." } [/block] In the example above the deep link will open PromoActivity. The basic implementation below displays alert with promo id value for the sake of simplicity. In your application it could definitely do something useful! [block:code] { "codes": [ { "code": "public class PromoActivity extends Activity\n{\n\t\t@Override\n\t\tprotected void onCreate(Bundle savedInstanceState)\n\t\t{\n\t\t\t\tsuper.onCreate(savedInstanceState);\n\n\t\t\t\tsetContentView(R.layout.deep_link);\n\t\t\t\tsetTitle(\"Deep link activity\");\n\t\t\n\t\t\t\tIntent intent = getIntent();\n\t \t String action = intent.getAction();\n\t \tUri data = intent.getData();\n\t \n\t\t if (TextUtils.equals(action, Intent.ACTION_VIEW))\n\t\t {\n\t \t\t \topenUrl(data);\n\t\t }\n\t\t}\n\t\n\t\tprivate void openUrl(Uri uri) \n\t\t{\n\t\t\t\tString promoId = uri.getQueryParameter(\"id\");\n\t\t\t\tToast.makeText(getApplicationContext(), promoId, Toast.LENGTH_LONG).show();\n\t\t}\n}", "language": "java" } ] } [/block] [block:api-header] { "title": "Geozones push notification" } [/block] To use geozone pushes simply add `com.pushwoosh:pushwoosh-location` library and call [block:code] { "codes": [ { "code": "PushwooshLocation.startLocationTracking();", "language": "java" } ] } [/block] It is recommended to check dynamic permissions `android.Manifest.permission.ACCESS_FINE_LOCATION` and `android.Manifest.permission.ACCESS_COARSE_LOCATION` before invoking this method [block:api-header] { "title": "Using Local Notifications with Pushwoosh" } [/block] If you use Pushwoosh Local Notifications API add RECEIVE_BOOT_COMPLETED permission to your AndroidManifest.xml: [block:code] { "codes": [ { "code": "<uses-permission android:name=\"android.permission.RECEIVE_BOOT_COMPLETED\"/>", "language": "xml", "name": "AndroidManifest.xml" } ] } [/block] [block:api-header] { "title": "Using Badge Number on Android" } [/block] Pushwoosh supports setting badge number on the app icon shortcut for the following Android launchers: Sony, Samsung, LG, HTC, Xiaomi, ASUS, ADW, APEX, NOVA, HUAWEI, ZUK, OPPO. To use this functionality simply add `com.pushwoosh:pushwoosh-badge` library to your application. [block:api-header] { "title": "Opening custom activity" } [/block] If you want to start particular activity in response to push notifications add the following intent-filter to that activity. [block:code] { "codes": [ { "code": "<activity android:name=\"YourActivity\">\n <intent-filter>\n <action android:name=\"${applicationId}.MESSAGE\"/>\n <category android:name=\"android.intent.category.DEFAULT\"/>\n </intent-filter>\n</activity>", "language": "xml", "name": "AndroidManifest.xml" } ] } [/block] [block:api-header] { "title": "Controlling Log Level" } [/block] In order to assist with debugging and integration, SDK will print all the requests to the console by default. When you ready for the production build, add "PW_LOG_LEVEL" meta-data with value "ERROR" to the AndroidManifest.xml. This way only information about errors will go to the console. Other option could be one of the following: *NONE* - No logs from the SDK *ERROR* - Display only errors in the console *WARN* - Display also a warnings *INFO* - Display informational messages *DEBUG* - Even debug information is displayed now *NOISE* - Everything SDK can print and more [block:code] { "codes": [ { "code": "\n<meta-data android:name=\"com.pushwoosh.log_level\" android:value=\"ERROR\" />", "language": "xml", "name": "AndroidManifest.xml" } ] } [/block] [block:api-header] { "title": "Using Proguard" } [/block] When using Proguard add the following options: [block:code] { "codes": [ { "code": "-keep class com.pushwoosh.** { *; }\n-dontwarn com.pushwoosh.**", "language": "text", "name": "proguard-rules.pro" } ] } [/block] Also see **Google Play Services** library requirements regarding Proguard here: https://developers.google.com/android/guides/setup [block:api-header] { "title": "Customising Notification open behaviour" } [/block] If you need to programmatically select which activity to display as a result of push notification, you can create custom [NotificationServiceExtension](https://rawgit.com/Pushwoosh/pushwoosh-android-sdk/master/Documentation/com/pushwoosh/notification/NotificationServiceExtension.html) and include fully qualified class name of your NotificationServiceExtension in metadata under “com.pushwoosh.notification_service_extension” value. [block:code] { "codes": [ { "code": "<meta-data\n android:name=\"com.pushwoosh.notification_service_extension\"\n android:value=\"com.your.package.YourNotificationServiceExtension\" / >", "language": "xml", "name": "AndroidManifest.xml" } ] } [/block] [block:code] { "codes": [ { "code": "public class YourNotificationServiceExtension extends NotificationServiceExtension {\n @Override\n protected void startActivityForPushMessage(PushMessage message) {\n // super.startActivityForPushMessage() starts default launcher activity \n // or activity marked with ${applicationId}.MESSAGE action.\n // Simply do not call it to override this behaviour.\n // super.startActivityForPushMessage(message);\n\n // start your activity instead:\n Intent launchIntent = new Intent(getApplicationContext(), YourActivity.class); \n launchIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED);\n \n // (Optional) pass notification data to Activity\n launchIntent.putExtra(Pushwoosh.PUSH_RECEIVE_EVENT, message.toJson().toString());\n \n context.startActivity(launchIntent);\n }\n}", "language": "java", "name": "YourNotificationServiceExtension.java" } ] } [/block] [block:api-header] { "title": "Customizing push notifications" } [/block] To customize the view of push notifications you need to create a custom Factory, you can create custom [NotificationFactory](https://rawgit.com/Pushwoosh/pushwoosh-android-sdk/master/Documentation/com/pushwoosh/notification/NotificationFactory.html) and include fully qualified class name of your NotificationFactory in metadata under “com.pushwoosh.notification_factory” value. [block:code] { "codes": [ { "code": "<meta-data\n android:name=\"com.pushwoosh.notification_factory\"\n android:value=\"com.your.package.YourNotificationFactory\" / >", "language": "xml", "name": "AndroidManifest.xml" } ] } [/block] [block:code] { "codes": [ { "code": "public class YourNotificationFactory extends PushwooshNotificationFactory {\n\t@Override\n\tpublic Notification onGenerateNotification(@NonNull PushMessage pushMessage) {\n\t\tif (customNotification) {\n // TODO: generate and return custom notification\n }\n \n // return default Pushwoosh notification\n\t\treturn super.onGenerateNotification(pushMessage);\n\t}\n}", "language": "java", "name": "YourNotificationFactory" } ] } [/block] [block:api-header] { "title": "Private Endpoint URL" } [/block] [block:callout] { "type": "success", "body": "Enterprise only." } [/block] Pushwoosh provides Private endpoints for Enterprise customers. To set up Private endpoint for iOS SDK you need to add the following to your **AndroidManifest.xml** file [block:code] { "codes": [ { "code": "<meta-data android:name=\"com.pushwoosh.base_url\" android:value=\"PUSHWOOSH_PRIVATE_ENDPOINT_URL_PROVIDED\" />", "language": "xml", "name": "AndroidManifest.xml" } ] } [/block]