Page 1 of 5

how to use onesignal plugin push notificacions

Posted: Sat May 27, 2017 10:51 am
by Tiago Martins

Hi,

Anyone know how to use ONESIGNAL push notificacions plugin with APPERY app?
An example would be appreciated. Thanks


how to use onesignal plugin push notificacions

Posted: Sat May 27, 2017 8:47 pm
by Galyna Abramovych

Hello Tiago,

You could try this (as an example): https://github.com/OneSignal/OneSigna...
Here, you can read on how to add custom plugins to Appery.io: https://docs.appery.io/docs/cordova-c...


how to use onesignal plugin push notificacions

Posted: Sun May 28, 2017 3:00 pm
by Bruce Stuart

Tiago,

When you get this working - if you get a chance - let us (or perhaps it's just me) know how or if it's working for you.

Looks like an interesting plugin. Understanding the use case that prompted you to go down this route would also be of interest.

Best wishes,
Bruce


how to use onesignal plugin push notificacions

Posted: Sun May 28, 2017 9:38 pm
by Tiago Martins

Hi Bruce,

Plugin from onesignal is now working fine with my appery app.
It's very easy to add it as cordova plugin in resources menu and use it in the app.

I'm using this plugin to send push notifications. With it you can send unlimited notifications for free. The plugin works very well.

If you need any more information let me know.

BR
Tiago


how to use onesignal plugin push notificacions

Posted: Mon May 29, 2017 1:01 pm
by Jeffry Reed

Interesting. After reading this initial post I briefly looked at it... particularly interesting that they support push to web. As Bruce had mentioned, topics like this would be a good topic for user group.


how to use onesignal plugin push notificacions

Posted: Tue May 30, 2017 12:48 am
by Bruce Stuart

Jeff - precisely.

Tiago,

Can you add some UI's screen prints - to show how the notifications look on IOS, Android, and Web?

How are the notifications targeted to the Web? UserID or ?? How are they targeted to a device - pushNotificationDeviceID or some other ID ??

Best,

Bruce


how to use onesignal plugin push notificacions

Posted: Tue May 30, 2017 11:18 pm
by Tiago Martins

Hi,
For now I'm sending notifications using onesignal site/account, but you can do it programmatically using their REST API.

First you must add the onesignal cordoba plugin in appery resources.
Image
after that enable the imported plugin in your appery project/app:
Image
then initialize the plugin in your app start page with following command:
window.plugins.OneSignal
.startInit("YOUR_APPID")
.endInit();
(more info here: https://documentation.onesignal.com/v...)
Image

When you run the app for the first time it will register your device in your onesignal account.

The tag command is for adding some tags to device (for example the username). With that you can send notifications to some target device/user.

This is the basic... but onesignal plugin has lots of potencial.

Push notifications example in Android:
Image

Image

BR
Tiago


how to use onesignal plugin push notificacions

Posted: Sat Jul 15, 2017 7:18 pm
by Z. Rohan

Hi Tiago,

I'm reviving this old thread since I'm curious if you got OneSignal working in iOS also or just Android? I've been trying in iOS and no success so far. Thanks.


how to use onesignal plugin push notificacions

Posted: Sun Jul 16, 2017 2:52 pm
by Tiago Martins

Hi Rohan, yes, my app is working on iOS and Android.
Did you activate "PushPlugin" in the "Project/App Settings"?


how to use onesignal plugin push notificacions

Posted: Sun Jul 16, 2017 4:30 pm
by Z. Rohan

Hi Tiago, yep I activated the plugin in the settings, and when I download the source code I see the plugin is there, but when I compile (after turning on push capabilities) and run on my device, it never returns from the startInit call. It just hangs there. I'll keep on trying. Thanks!