Unable to register android device using Liferay PushUnable to register android device using Liferay Pushhttps://liferay.dev/en/c/message_boards/find_thread?p_l_id=119785333&threadId=1142361412024-03-29T12:20:42Z2024-03-29T12:20:42ZRE: Unable to register android device using Liferay PushEhtisham Zahidhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1142423282019-07-10T11:13:53Z2019-07-10T11:13:53ZHi. <br />Its solved. I just maitained the PushService and now its displaying notifications<br />Thanks for your helpEhtisham Zahid2019-07-10T11:13:53ZRE: Unable to register android device using Liferay PushEhtisham Zahidhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1142420902019-07-10T08:43:33Z2019-07-10T08:43:33Z<html><head></head><body>Hi Victor,Thanks for your quick reply. it worked and device is registered.Now i am facing issue in recieving notification.i added the files for PushReceiver and PushService also declared them in manifest.xml <pre><code><uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.WAKE_LOCK" /></code></pre><pre><code><receiver android:name=".PushReceiver" android:permission="com.google.android.c2dm.permission.SEND"> <intent-filter> <action android:name="com.google.android.c2dm.intent.RECEIVE" /> <category android:name="com.liferay.mobile.push" /> </intent-filter> </receiver> <service android:name=".PushService" android:permission="android.permission.BIND_JOB_SERVICE" /></code></pre>There might be the issue with sending notification from portal.Facing this error by sending below message<br>{ "message": "Hello You have one new alert" }<br><pre><code>[liferay/push_notification_response-1][PushNotificationsResponseMessageListener:41] {"payload":"{\"message\":\"Hello You have one new alert\"}","javaClass":"com.liferay.push.notifications.sender.android.internal.AndroidResponse","id":null,"canonicalRegistrationId":null,"platform":"android","status":"InvalidRegistration","succeeded":false,"token":"XXXXXXX"}</code></pre><br><pre><code></code></pre><pre><code></code></pre>Can you please help me in this. Thank you<pre><code></code></pre><br><pre><code></code></pre></body></html>Ehtisham Zahid2019-07-10T08:43:33ZRE: Unable to register android device using Liferay PushVictor Galanhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1142378002019-07-09T15:01:34Z2019-07-09T15:01:34ZHey,<br /><br /><br />you have to indicate the 70 version like: Push.with(session2 ).withPortalVersion(70).register("xxxxxxxxxx");Victor Galan2019-07-09T15:01:34ZUnable to register android device using Liferay PushEhtisham Zahidhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1142361402019-07-09T10:30:47Z2019-07-09T10:30:47Z<html><head></head><body>Hi<br>I am using Liferay DXP 7.1<br>installed liferayPush.lpkg <br>followed the portal document for push notification in android. generated fcm key and added into portal<br>But unable to register device.Getting this exception :<br><pre><code>No JSON web service action with path /push-notifications-portlet.pushnotificationsdevice/add-push-notifications-device and method null for push-notifications-portlet</code></pre><br>but in portal/api/jsonws its displaying the service<br><pre><code>/pushnotifications.pushnotificationsdevice/add-push-notifications-device</code></pre><br>code for registering device i am using :<pre><code>Session session2 = SessionContext.createBasicSession("test@test.com", "test");
</code></pre><pre><code> UserService userService=new UserService(session2);
</code></pre><pre><code>JSONObject user= userService.getUserByEmailAddress(20100,"test@test.com");
</code></pre><pre><code>User userObject=new User(user);
</code></pre><pre><code> SessionContext.setCurrentUser(userObject);</code></pre><pre><code>Push.with(SessionContext.createSessionFromCurrentSession()).register("xxxxxxxxxx");</code></pre><pre><code>also tried with this&nbsp; &nbsp; &nbsp; &nbsp; Push.with(session2