[Plugin] Cordova Push Notifications with OneSignal service

Post your completed addons to share with the community

Post » Thu Jun 30, 2016 1:21 am

I've just completed the installation and it worked for Android via intel xdk. Great to see it working properly, nice job!

Could you make a sample capx file showing the plugin in action? That would be helpful.

Also, regarding the 'tags' feature, the website says pushes with 'tags' require the REST api key with the request. Then it also warns about having the api key stored on the client device. Is there a workaround for this?

Thanks
B
17
S
2
Posts: 88
Reputation: 1,503

Post » Thu Jun 30, 2016 11:01 am

hmott wrote:I've just completed the installation and it worked for Android via intel xdk. Great to see it working properly, nice job!

Could you make a sample capx file showing the plugin in action? That would be helpful.

Also, regarding the 'tags' feature, the website says pushes with 'tags' require the REST api key with the request. Then it also warns about having the api key stored on the client device. Is there a workaround for this?

Thanks


Thanks for your feedback, glad to read all works fine.

What kind of examples do you wanna see in the capx file?

What do you mean with the rest api key? The one you insert in the plugin properties? Or the unique one the device has to make push by itself?
B
19
S
6
G
2
Posts: 256
Reputation: 2,640

Post » Thu Jun 30, 2016 4:20 pm

Josek5494 wrote:
What kind of examples do you wanna see in the capx file?

What do you mean with the rest api key? The one you insert in the plugin properties? Or the unique one the device has to make push by itself?


The plugin properties uses the app id provided by OneSignal. They also provide an api key, which they recommend be stored and used on a server instead of an app user's device. In the app, I can add tags to a user through your plugin, but if I want to send out a push from a client's device to target other users based on their tags, that request needs to include the api key on top of the app id.

Maybe the api key can be added to the plugin properties like the app id and google project # in a safe way?

As for the example capx, maybe something simple that shows how the conditions/actions/expressions are used in context of a simple app that relies on notifications. See rex's plugins and their examples for inspiration...
B
17
S
2
Posts: 88
Reputation: 1,503

Post » Thu Jun 30, 2016 6:09 pm

hmott wrote:
Josek5494 wrote:
What kind of examples do you wanna see in the capx file?

What do you mean with the rest api key? The one you insert in the plugin properties? Or the unique one the device has to make push by itself?


The plugin properties uses the app id provided by OneSignal. They also provide an api key, which they recommend be stored and used on a server instead of an app user's device. In the app, I can add tags to a user through your plugin, but if I want to send out a push from a client's device to target other users based on their tags, that request needs to include the api key on top of the app id.

Maybe the api key can be added to the plugin properties like the app id and google project # in a safe way?

As for the example capx, maybe something simple that shows how the conditions/actions/expressions are used in context of a simple app that relies on notifications. See rex's plugins and their examples for inspiration...


I think you mean the app key you can retrieve with GETID expression, which is unique for each device and neccesary to make push. You can retrieve the device id with the expression everytime you want, the plugin get it from one signal server every time the app opens and it is stored like a property inside the code safely i think.
Sorry if i don't understand you properly, my english is not that good :(
B
19
S
6
G
2
Posts: 256
Reputation: 2,640

Post » Sun Jul 03, 2016 6:23 am

Here's where I read about it, starting in the "Documentation" section in this link:

https://documentation.onesignal.com/v2. ... tification

The rest API key when logged in is here:
App Settings > Keys & ID's.

Hope that helps.
B
17
S
2
Posts: 88
Reputation: 1,503

Post » Sun Jul 03, 2016 10:09 am

hmott wrote:Here's where I read about it, starting in the "Documentation" section in this link:

https://documentation.onesignal.com/v2. ... tification

The rest API key when logged in is here:
App Settings > Keys & ID's.

Hope that helps.


Yes you can obtain that key with the expression getUserId in the plugin everytime you want, and it's stored like a intern property in your code for each user registered/device, but only when the device is running the app. This means this id can't be accesed via reading the app code by other people, only by you the developer and admin of your one signal's account. I think is safe :D
B
19
S
6
G
2
Posts: 256
Reputation: 2,640

Post » Mon Jul 04, 2016 3:07 pm

Hi @Josek5494 , I will buy the plugin, and then let you know. Regards
B
11
S
2
Posts: 12
Reputation: 964

Post » Mon Jul 04, 2016 3:37 pm

gberenst wrote:Hi @Josek5494 , I will buy the plugin, and then let you know. Regards


Thanks mate! i've just sent the plugin to your payment e-mail. If you need support post it here or in my blog. Stay tuned to my blog and my youtube channel if you want more C2 plugins! :D

https://hermitsdevelopment.blogspot.com.es/

https://www.youtube.com/user/josek5494
B
19
S
6
G
2
Posts: 256
Reputation: 2,640

Post » Mon Jul 11, 2016 4:44 pm

B
19
S
6
G
2
Posts: 256
Reputation: 2,640

Post » Sun Aug 07, 2016 5:25 pm

please make some video tutorial
B
17
S
6
G
2
Posts: 37
Reputation: 1,857

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: Phacanu and 1 guest