Tiago Martins
Posts: 0
Joined: Fri Sep 05, 2014 12:41 am

how to use onesignal plugin push notificacions

Hi,

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

Galyna Abramovych
Site Admin
Posts: 84
Joined: Tue Mar 22, 2016 6:03 pm

how to use onesignal plugin push notificacions

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...

Bruce Stuart
Posts: 0
Joined: Fri Oct 24, 2014 4:42 am

how to use onesignal plugin push notificacions

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

Tiago Martins
Posts: 0
Joined: Fri Sep 05, 2014 12:41 am

how to use onesignal plugin push notificacions

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

Jeffry Reed
Posts: 0
Joined: Sun Aug 14, 2016 3:59 pm

how to use onesignal plugin push notificacions

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.

Bruce Stuart
Posts: 0
Joined: Fri Oct 24, 2014 4:42 am

how to use onesignal plugin push notificacions

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

Tiago Martins
Posts: 0
Joined: Fri Sep 05, 2014 12:41 am

how to use onesignal plugin push notificacions

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

Z. Rohan
Posts: 0
Joined: Mon Jun 19, 2017 2:13 am

how to use onesignal plugin push notificacions

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.

Tiago Martins
Posts: 0
Joined: Fri Sep 05, 2014 12:41 am

how to use onesignal plugin push notificacions

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

Z. Rohan
Posts: 0
Joined: Mon Jun 19, 2017 2:13 am

how to use onesignal plugin push notificacions

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!

Return to “Issues”