[Aerogear-users] Qustions about Push and Cordova

classic Classic list List threaded Threaded
20 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Aerogear-users] Qustions about Push and Cordova

Anton Hughes
Hello

I am trying to get started with Cordova and Aerogear push.

When I try to run a simple cordova app I get the following:
!JavaScript ERROR: Plugin PushPlugin.messageChannel is not supported 
!JavaScript ERROR: Plugin PushPlugin.register is not supported 

How then do you test that the push is working?

Second question - apologies if this sounds dumb - am completely new to mobile. Can a push message contain json or xml, or does it have to be simple text?

Thanks
Anton

_______________________________________________
Aerogear-users mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Aerogear-users] Qustions about Push and Cordova

Luke Holmquist

Hello

On Thu, Jan 21, 2016 at 1:52 PM, Anton Hughes <[hidden email]> wrote:
Hello

I am trying to get started with Cordova and Aerogear push.

When I try to run a simple cordova app I get the following:
 Are you following along on the Aerogear.org tutorials or something else?
!JavaScript ERROR: Plugin PushPlugin.messageChannel is not supported 
!JavaScript ERROR: Plugin PushPlugin.register is not supported 

How then do you test that the push is working?

Second question - apologies if this sounds dumb - am completely new to mobile. Can a push message contain json or xml, or does it have to be simple text?

Thanks
Anton

_______________________________________________
Aerogear-users mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-users



_______________________________________________
Aerogear-users mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Aerogear-users] Qustions about Push and Cordova

Anton Hughes

On Thu, Jan 21, 2016 at 7:55 PM, Luke Holmquist <[hidden email]> wrote:
 Are you following along on the Aerogear.org tutorials or something else?

Yes sir. 
Unfortunately the sample for the aerodoc cordova project is now a broken link - https://aerogear.org/getstarted/demos/

_______________________________________________
Aerogear-users mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Aerogear-users] Qustions about Push and Cordova

Luke Holmquist


On Thu, Jan 21, 2016 at 2:05 PM, Anton Hughes <[hidden email]> wrote:

On Thu, Jan 21, 2016 at 7:55 PM, Luke Holmquist <[hidden email]> wrote:
 Are you following along on the Aerogear.org tutorials or something else?

Yes sir. 
Unfortunately the sample for the aerodoc cordova project is now a broken link - https://aerogear.org/getstarted/demos/
that is odd.


perhaps try this example. should be less involved than aerodoc,  just focusing on push


_______________________________________________
Aerogear-users mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-users



_______________________________________________
Aerogear-users mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Aerogear-users] Qustions about Push and Cordova

Daniel Passos

On Thu, Jan 21, 2016 at 5:12 PM, Luke Holmquist <[hidden email]> wrote:


On Thu, Jan 21, 2016 at 2:05 PM, Anton Hughes <[hidden email]> wrote:

On Thu, Jan 21, 2016 at 7:55 PM, Luke Holmquist <[hidden email]> wrote:
 Are you following along on the Aerogear.org tutorials or something else?

Yes sir. 
Unfortunately the sample for the aerodoc cordova project is now a broken link - https://aerogear.org/getstarted/demos/
that is odd.


perhaps try this example. should be less involved than aerodoc,  just focusing on push


_______________________________________________
Aerogear-users mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-users



_______________________________________________
Aerogear-users mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-users




--
-- Passos

_______________________________________________
Aerogear-users mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Aerogear-users] Qustions about Push and Cordova

Anton Hughes
In reply to this post by Luke Holmquist

On Thu, Jan 21, 2016 at 8:12 PM, Luke Holmquist <[hidden email]> wrote:
perhaps try this example. should be less involved than aerodoc,  just focusing on push


Thank you. That helped. The error is now gone. But, I still do not get any notifications.

When I run the sample app, I notice that the deviceready event never seems to be called, even when I call it from the cordova ui.

Inline image 1

Where do I find an example of the config.xml?

Thanks for your help!!

_______________________________________________
Aerogear-users mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Aerogear-users] Qustions about Push and Cordova

Luke Holmquist
i believe you will need to be on a real device to receive a push message.



On Thu, Jan 21, 2016 at 2:39 PM, Anton Hughes <[hidden email]> wrote:

On Thu, Jan 21, 2016 at 8:12 PM, Luke Holmquist <[hidden email]> wrote:
perhaps try this example. should be less involved than aerodoc,  just focusing on push


Thank you. That helped. The error is now gone. But, I still do not get any notifications.

When I run the sample app, I notice that the deviceready event never seems to be called, even when I call it from the cordova ui.

Inline image 1

Where do I find an example of the config.xml?

Thanks for your help!!

_______________________________________________
Aerogear-users mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-users



_______________________________________________
Aerogear-users mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Aerogear-users] Qustions about Push and Cordova

Anton Hughes

On Thu, Jan 21, 2016 at 8:43 PM, Luke Holmquist <[hidden email]> wrote:
i believe you will need to be on a real device to receive a push message.

Really? That will make development very slow if you need to deploy to a real device to test push.

_______________________________________________
Aerogear-users mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Aerogear-users] Qustions about Push and Cordova

Luke Holmquist


On Thu, Jan 21, 2016 at 2:48 PM, Anton Hughes <[hidden email]> wrote:

On Thu, Jan 21, 2016 at 8:43 PM, Luke Holmquist <[hidden email]> wrote:
i believe you will need to be on a real device to receive a push message.

Really? That will make development very slow if you need to deploy to a real device to test push.
yea,  it kind of sucks,  but that is the reality  

_______________________________________________
Aerogear-users mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-users



_______________________________________________
Aerogear-users mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Aerogear-users] Qustions about Push and Cordova

Anton Hughes
Ok. And is a push notification only meant to be a string?

If I want to push a complex message to a specific client, is push the right approach - or is there something else I should look at?

On Thu, Jan 21, 2016 at 8:50 PM, Luke Holmquist <[hidden email]> wrote:


On Thu, Jan 21, 2016 at 2:48 PM, Anton Hughes <[hidden email]> wrote:

On Thu, Jan 21, 2016 at 8:43 PM, Luke Holmquist <[hidden email]> wrote:
i believe you will need to be on a real device to receive a push message.

Really? That will make development very slow if you need to deploy to a real device to test push.
yea,  it kind of sucks,  but that is the reality  

_______________________________________________
Aerogear-users mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-users



_______________________________________________
Aerogear-users mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-users



_______________________________________________
Aerogear-users mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Aerogear-users] Qustions about Push and Cordova

Luke Holmquist
both android and iOS have limitations on the message payload,  so the message is usually just a string.  

On Thu, Jan 21, 2016 at 3:01 PM, Anton Hughes <[hidden email]> wrote:
Ok. And is a push notification only meant to be a string?

If I want to push a complex message to a specific client, is push the right approach - or is there something else I should look at?

On Thu, Jan 21, 2016 at 8:50 PM, Luke Holmquist <[hidden email]> wrote:


On Thu, Jan 21, 2016 at 2:48 PM, Anton Hughes <[hidden email]> wrote:

On Thu, Jan 21, 2016 at 8:43 PM, Luke Holmquist <[hidden email]> wrote:
i believe you will need to be on a real device to receive a push message.

Really? That will make development very slow if you need to deploy to a real device to test push.
yea,  it kind of sucks,  but that is the reality  

_______________________________________________
Aerogear-users mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-users



_______________________________________________
Aerogear-users mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-users



_______________________________________________
Aerogear-users mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-users



_______________________________________________
Aerogear-users mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Aerogear-users] Qustions about Push and Cordova

Luke Holmquist


On Thu, Jan 21, 2016 at 3:03 PM, Luke Holmquist <[hidden email]> wrote:
both android and iOS have limitations on the message payload,  so the message is usually just a string.  
message payload size that should be 

On Thu, Jan 21, 2016 at 3:01 PM, Anton Hughes <[hidden email]> wrote:
Ok. And is a push notification only meant to be a string?

If I want to push a complex message to a specific client, is push the right approach - or is there something else I should look at?

On Thu, Jan 21, 2016 at 8:50 PM, Luke Holmquist <[hidden email]> wrote:


On Thu, Jan 21, 2016 at 2:48 PM, Anton Hughes <[hidden email]> wrote:

On Thu, Jan 21, 2016 at 8:43 PM, Luke Holmquist <[hidden email]> wrote:
i believe you will need to be on a real device to receive a push message.

Really? That will make development very slow if you need to deploy to a real device to test push.
yea,  it kind of sucks,  but that is the reality  

_______________________________________________
Aerogear-users mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-users



_______________________________________________
Aerogear-users mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-users



_______________________________________________
Aerogear-users mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-users




_______________________________________________
Aerogear-users mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Aerogear-users] Qustions about Push and Cordova

Anton Hughes
In reply to this post by Luke Holmquist

On Thu, Jan 21, 2016 at 9:03 PM, Luke Holmquist <[hidden email]> wrote:
both android and iOS have limitations on the message payload,  so the message is usually just a string.  

Ok, so is there another convention for sending json data?

My use-case is, I want to send a notification to a specific user say "that item you have been watching is now available" - and when the click on it, the app opens, and they see a screen with price, currency, etc - a domain model. 

Is 'push' the right/normal way to do that? Or is there another convention?

Or would it be a combination of push, then do a rest request?


_______________________________________________
Aerogear-users mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Aerogear-users] Qustions about Push and Cordova

Luke Holmquist


On Thu, Jan 21, 2016 at 3:30 PM, Anton Hughes <[hidden email]> wrote:

On Thu, Jan 21, 2016 at 9:03 PM, Luke Holmquist <[hidden email]> wrote:
both android and iOS have limitations on the message payload,  so the message is usually just a string.  

Ok, so is there another convention for sending json data?

My use-case is, I want to send a notification to a specific user say "that item you have been watching is now available" - and when the click on it, the app opens, and they see a screen with price, currency, etc - a domain model. 

Is 'push' the right/normal way to do that? Or is there another convention?

Or would it be a combination of push, then do a rest request?
i believe this is usually the practice,  you have the message plus some meta-data in the payload.  then your app goes and fetches the info from a REST endpoint or something.   


_______________________________________________
Aerogear-users mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-users



_______________________________________________
Aerogear-users mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Aerogear-users] Qustions about Push and Cordova

Anton Hughes
In reply to this post by Luke Holmquist

On Thu, Jan 21, 2016 at 8:50 PM, Luke Holmquist <[hidden email]> wrote:
yea,  it kind of sucks,  but that is the reality  

Is it just with Cordova that push does not work in development?
I saw in this video - https://youtu.be/-hh-sEesocs - it works in ios.

_______________________________________________
Aerogear-users mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Aerogear-users] Qustions about Push and Cordova

Erik Jan de Wit
In reply to this post by Anton Hughes
You can add meta data like that directly into the message [1] see "user-data"



On Thu, Jan 21, 2016 at 9:30 PM, Anton Hughes <[hidden email]> wrote:

On Thu, Jan 21, 2016 at 9:03 PM, Luke Holmquist <[hidden email]> wrote:
both android and iOS have limitations on the message payload,  so the message is usually just a string.  

Ok, so is there another convention for sending json data?

My use-case is, I want to send a notification to a specific user say "that item you have been watching is now available" - and when the click on it, the app opens, and they see a screen with price, currency, etc - a domain model. 

Is 'push' the right/normal way to do that? Or is there another convention?

Or would it be a combination of push, then do a rest request?


_______________________________________________
Aerogear-users mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-users




--
Cheers,
       Erik Jan

_______________________________________________
Aerogear-users mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Aerogear-users] Qustions about Push and Cordova

Erik Jan de Wit
In reply to this post by Anton Hughes
That video is using a real device as well, and a program to "project" the screen of the device onto the desktop. If you don't have a device you could use genymotion or the android emulator 

On Thu, Jan 21, 2016 at 10:03 PM, Anton Hughes <[hidden email]> wrote:

On Thu, Jan 21, 2016 at 8:50 PM, Luke Holmquist <[hidden email]> wrote:
yea,  it kind of sucks,  but that is the reality  

Is it just with Cordova that push does not work in development?
I saw in this video - https://youtu.be/-hh-sEesocs - it works in ios.

_______________________________________________
Aerogear-users mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-users




--
Cheers,
       Erik Jan

_______________________________________________
Aerogear-users mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Aerogear-users] Qustions about Push and Cordova

Anton Hughes

On Fri, Jan 22, 2016 at 10:13 AM, Erik Jan de Wit <[hidden email]> wrote:
If you don't have a device you could use genymotion or the android emulator 

Ok, so to confirm, I should be able to send push, and have the device registered in UPS, if I use the android emulator?

_______________________________________________
Aerogear-users mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Aerogear-users] Qustions about Push and Cordova

Sebastien Blanc
Yes I was able to test push with the latest version of the emulator. But, as Erik said, you could also try genymotion, it is pretty amazing stuff. 

On Fri, Jan 22, 2016 at 11:12 AM, Anton Hughes <[hidden email]> wrote:

On Fri, Jan 22, 2016 at 10:13 AM, Erik Jan de Wit <[hidden email]> wrote:
If you don't have a device you could use genymotion or the android emulator 

Ok, so to confirm, I should be able to send push, and have the device registered in UPS, if I use the android emulator?

_______________________________________________
Aerogear-users mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-users



_______________________________________________
Aerogear-users mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Aerogear-users] Qustions about Push and Cordova

Daniel Passos
Just to be clear Genymotion don't support GCM/Push notification by default.

On Fri, Jan 22, 2016 at 8:17 AM, Sebastien Blanc <[hidden email]> wrote:
Yes I was able to test push with the latest version of the emulator. But, as Erik said, you could also try genymotion, it is pretty amazing stuff. 

On Fri, Jan 22, 2016 at 11:12 AM, Anton Hughes <[hidden email]> wrote:

On Fri, Jan 22, 2016 at 10:13 AM, Erik Jan de Wit <[hidden email]> wrote:
If you don't have a device you could use genymotion or the android emulator 

Ok, so to confirm, I should be able to send push, and have the device registered in UPS, if I use the android emulator?

_______________________________________________
Aerogear-users mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-users



_______________________________________________
Aerogear-users mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-users




--
-- Passos

_______________________________________________
Aerogear-users mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-users
Loading...