{"__v":1,"_id":"55ae5a2c826d210d00041bf8","category":{"__v":1,"_id":"5540e62631827a0d007ab214","project":"5540ce1b31827a0d007ab1cc","version":"5540ce1c31827a0d007ab1cf","pages":["55ae5a2c826d210d00041bf8"],"reference":false,"createdAt":"2015-04-29T14:09:42.490Z","from_sync":false,"order":8,"slug":"nokia","title":"Nokia"},"project":"5540ce1b31827a0d007ab1cc","user":"55a79a4d4a33f92b00b7a111","version":{"__v":27,"_id":"5540ce1c31827a0d007ab1cf","project":"5540ce1b31827a0d007ab1cc","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"],"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"updates":[],"createdAt":"2015-07-21T14:41:48.940Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"order":0,"body":"[**Download SDK**](https://github.com/Pushwoosh/pushwoosh-nokia-asha-j2me)\n[**Download Sample**](https://github.com/Pushwoosh/pushwoosh-native-samples/tree/master/Nokia-Asha) \n[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"You should get your **NOKIA_SERVICE_ID** and **NOKIA_APP_ID** in [Notifications API Developer Console](https://account.nnapi.ovi.com/cm/Web/services.jsp)\"\n}\n[/block]\nTo integrate Pushwoosh into your NOKIA application you need to do the following:\n\n**1.** Download [Pushwoosh.jar](https://github.com/Pushwoosh/pushwoosh-nokia-asha-j2me) and add it to your project.\n\n**2.** Add the code below to your midlet:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"mPushManager = new PushManager(midlet, \\\"PW_APP_ID\\\", \\\"NOKIA_SERVICE_ID\\\", \\\"NOKIA_APP_ID\\\", this);\\n\",\n      \"language\": \"java\"\n    }\n  ]\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"midlet – Midlet for the app\\nPW_APP_ID – Pushwoosh App Id\\nNOKIA_SERVICE_ID and NOKIA_APP_ID – the values from Nokia Dev Console \\n(Ex: “com.pushwoosh.nokia.test” and “test.nokia.pushwoosh.com”)\\nthis – PushNotificationsListener implementation (see below)\"\n}\n[/block]\nThe class to which you have added the code above should implement PushNotificationsListener.\n\n**3.** The next step is to override following methods:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"public void onRegistered(String pushToken) {\\n  // execute after successful registration\\n}\\npublic void onPushNotificationReceived(String pushPayload) {\\n   // execute when a push notification is received\\n}\\npublic void onUnregistered() {\\n   // execute after the device has been successfully unregistered\\n}\\npublic void onErrorRegistering(Exception e) {\\n   // execute if the registration failed \\n}\\npublic void onErrorUnregistering(Exception e) {\\n    // execute this code if unregistration is not successful\\n }\",\n      \"language\": \"java\"\n    }\n  ]\n}\n[/block]\n**4.** Currently the PushManager provides the functionality enlisted below. You can see the information about these methods using your IDE.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"//push notifications registration and unregistration\\nvoid registerForPushNotifications();\\nvoid unregisterFromPushNotifications();\\n \\n//Get push notification user data\\nString getCustomData(String payload);\\n \\n//Send tags asynchronously\\nstatic void sendTags(final Hashtable tags, final SetTagsListener callBack);\\n \\n//Get tags from Pushwoosh service synchronously. Do not call on the main thread as this will block the UI.\\nstatic Hashtable getTagsSync();\\n \\n//Get tags from Pushwoosh service asynchronously\\nstatic void getTags(final GetTagsListener listener);\\n \\n//Function to create incremental integer tag value\\nstatic Hashtable incrementalTag(Integer intValue);\\n\",\n      \"language\": \"java\"\n    }\n  ]\n}\n[/block]","excerpt":"","slug":"nokia-asha-sdk","type":"basic","title":"Nokia Asha SDK"}
[**Download SDK**](https://github.com/Pushwoosh/pushwoosh-nokia-asha-j2me) [**Download Sample**](https://github.com/Pushwoosh/pushwoosh-native-samples/tree/master/Nokia-Asha) [block:callout] { "type": "info", "body": "You should get your **NOKIA_SERVICE_ID** and **NOKIA_APP_ID** in [Notifications API Developer Console](https://account.nnapi.ovi.com/cm/Web/services.jsp)" } [/block] To integrate Pushwoosh into your NOKIA application you need to do the following: **1.** Download [Pushwoosh.jar](https://github.com/Pushwoosh/pushwoosh-nokia-asha-j2me) and add it to your project. **2.** Add the code below to your midlet: [block:code] { "codes": [ { "code": "mPushManager = new PushManager(midlet, \"PW_APP_ID\", \"NOKIA_SERVICE_ID\", \"NOKIA_APP_ID\", this);\n", "language": "java" } ] } [/block] [block:callout] { "type": "info", "body": "midlet – Midlet for the app\nPW_APP_ID – Pushwoosh App Id\nNOKIA_SERVICE_ID and NOKIA_APP_ID – the values from Nokia Dev Console \n(Ex: “com.pushwoosh.nokia.test” and “test.nokia.pushwoosh.com”)\nthis – PushNotificationsListener implementation (see below)" } [/block] The class to which you have added the code above should implement PushNotificationsListener. **3.** The next step is to override following methods: [block:code] { "codes": [ { "code": "public void onRegistered(String pushToken) {\n // execute after successful registration\n}\npublic void onPushNotificationReceived(String pushPayload) {\n // execute when a push notification is received\n}\npublic void onUnregistered() {\n // execute after the device has been successfully unregistered\n}\npublic void onErrorRegistering(Exception e) {\n // execute if the registration failed \n}\npublic void onErrorUnregistering(Exception e) {\n // execute this code if unregistration is not successful\n }", "language": "java" } ] } [/block] **4.** Currently the PushManager provides the functionality enlisted below. You can see the information about these methods using your IDE. [block:code] { "codes": [ { "code": "//push notifications registration and unregistration\nvoid registerForPushNotifications();\nvoid unregisterFromPushNotifications();\n \n//Get push notification user data\nString getCustomData(String payload);\n \n//Send tags asynchronously\nstatic void sendTags(final Hashtable tags, final SetTagsListener callBack);\n \n//Get tags from Pushwoosh service synchronously. Do not call on the main thread as this will block the UI.\nstatic Hashtable getTagsSync();\n \n//Get tags from Pushwoosh service asynchronously\nstatic void getTags(final GetTagsListener listener);\n \n//Function to create incremental integer tag value\nstatic Hashtable incrementalTag(Integer intValue);\n", "language": "java" } ] } [/block]