[Aerogear-users] Testing push in Cordova

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

[Aerogear-users] Testing push in Cordova

Anton Hughes
Hello

I am trying to test the UPS and Cordova.

I have UPS setup, have setup a google account, have all the required pieces.

I have watched all the videos that demonstrate how it should work.

I am deploying the sample app via the android device emulator, and it does get deployed.

However the UPS never sees any devices as connected, and no push messages sent from UPS ever arrive.

What should I do to debug this? Are there any obvious things to look into?

Thanks

_______________________________________________
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] Testing push in Cordova

Erik Jan de Wit
Hi Anton,

So if the device doesn't show up in the UPS console it will never receive a message, so first thing to to check is if the register is performed in the android log (adb logcat). If that is not the case there might be a javascript problem, best way to determine that is by attaching a chrome debugger (type "chrome://inspect" in a location bar). Check the console log if there are any javascript or communication problems.

Hope this helps,


On Fri, Jan 22, 2016 at 8:29 AM, Anton Hughes <[hidden email]> wrote:
Hello

I am trying to test the UPS and Cordova.

I have UPS setup, have setup a google account, have all the required pieces.

I have watched all the videos that demonstrate how it should work.

I am deploying the sample app via the android device emulator, and it does get deployed.

However the UPS never sees any devices as connected, and no push messages sent from UPS ever arrive.

What should I do to debug this? Are there any obvious things to look into?

Thanks

_______________________________________________
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] Testing push in Cordova

Anton Hughes
Thanks Eric

Yes I did check in the chrome debugger, but there was no errors.

adb logcat - I am completely new to mobile development, so forgive me if my questions are very newbie-ish. 
I have found the following - https://developer.android.com/tools/debugging/debugging-log.html - which says:
You can run LogCat through ADB or from DDMS, which allows you to read the messages in real time.
What is adb and DDMS? Are these in JBDS? 
How do I write to the log? I can see some examples in the Aerogear samples, that write to what looks like the javascript console. Do this get transpiled to android java?


On Fri, Jan 22, 2016 at 9:58 AM, Erik Jan de Wit <[hidden email]> wrote:
Hi Anton,

So if the device doesn't show up in the UPS console it will never receive a message, so first thing to to check is if the register is performed in the android log (adb logcat). If that is not the case there might be a javascript problem, best way to determine that is by attaching a chrome debugger (type "chrome://inspect" in a location bar). Check the console log if there are any javascript or communication problems.

Hope this helps,


On Fri, Jan 22, 2016 at 8:29 AM, Anton Hughes <[hidden email]> wrote:
Hello

I am trying to test the UPS and Cordova.

I have UPS setup, have setup a google account, have all the required pieces.

I have watched all the videos that demonstrate how it should work.

I am deploying the sample app via the android device emulator, and it does get deployed.

However the UPS never sees any devices as connected, and no push messages sent from UPS ever arrive.

What should I do to debug this? Are there any obvious things to look into?

Thanks

_______________________________________________
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



_______________________________________________
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] Testing push in Cordova

Daniel Passos
I really recommend you don't use Android emulator to play around push/gcm.

On Fri, Jan 22, 2016 at 8:29 AM, Anton Hughes <[hidden email]> wrote:
Thanks Eric

Yes I did check in the chrome debugger, but there was no errors.

adb logcat - I am completely new to mobile development, so forgive me if my questions are very newbie-ish. 
I have found the following - https://developer.android.com/tools/debugging/debugging-log.html - which says:
You can run LogCat through ADB or from DDMS, which allows you to read the messages in real time.
What is adb and DDMS? Are these in JBDS? 
How do I write to the log? I can see some examples in the Aerogear samples, that write to what looks like the javascript console. Do this get transpiled to android java?


On Fri, Jan 22, 2016 at 9:58 AM, Erik Jan de Wit <[hidden email]> wrote:
Hi Anton,

So if the device doesn't show up in the UPS console it will never receive a message, so first thing to to check is if the register is performed in the android log (adb logcat). If that is not the case there might be a javascript problem, best way to determine that is by attaching a chrome debugger (type "chrome://inspect" in a location bar). Check the console log if there are any javascript or communication problems.

Hope this helps,


On Fri, Jan 22, 2016 at 8:29 AM, Anton Hughes <[hidden email]> wrote:
Hello

I am trying to test the UPS and Cordova.

I have UPS setup, have setup a google account, have all the required pieces.

I have watched all the videos that demonstrate how it should work.

I am deploying the sample app via the android device emulator, and it does get deployed.

However the UPS never sees any devices as connected, and no push messages sent from UPS ever arrive.

What should I do to debug this? Are there any obvious things to look into?

Thanks

_______________________________________________
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



_______________________________________________
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] Testing push in Cordova

Anton Hughes

On Fri, Jan 22, 2016 at 12:30 PM, Daniel Passos <[hidden email]> wrote:
I really recommend you don't use Android emulator to play around push/gcm.

HI Daniel - I appreciate the feedback. I need all the help I can get right now as I am very green.
However, I have been told that push does not work when using the cordova 'emulator' (not sure if that is the right word). 

For now, I just need to see that UPS and cordova works - that I can push a message. That is the stage I am at. 

What are your reasons for advocating for not using 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] Testing push in Cordova

Daniel Passos
On Fri, Jan 22, 2016 at 9:34 AM, Anton Hughes <[hidden email]> wrote:

On Fri, Jan 22, 2016 at 12:30 PM, Daniel Passos <[hidden email]> wrote:
I really recommend you don't use Android emulator to play around push/gcm.

HI Daniel - I appreciate the feedback. I need all the help I can get right now as I am very green.
However, I have been told that push does not work when using the cordova 'emulator' (not sure if that is the right word). 

For now, I just need to see that UPS and cordova works - that I can push a message. That is the stage I am at. 

What are your reasons for advocating for not using Android emulator?

By default GCM/Push don't work on Google emulator, only in the last versions, but I always prefer test it in a real device to prevent problems.

Another tip you need to have and Gmail/Google valid account on the device.

Emulator and don't have a Google account on device made me too much problems in the past

_______________________________________________
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] Testing push in Cordova

Anton Hughes

On Fri, Jan 22, 2016 at 12:42 PM, Daniel Passos <[hidden email]> wrote:
By default GCM/Push don't work on Google emulator, only in the last versions, but I always prefer test it in a real device to prevent problems.

If I have to deploy to a real device to do basic testing I will go (more) insane.
There has to be away of testing push that doesnt involve deploying to an actual device.

_______________________________________________
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] Testing push in Cordova

Rob Willett
Just to throw my 2c in here.

We test push notifications on the Genymotion emulator. Out of the box
Genymotion does NOT support notifications but its pretty easy to get
notifications working on Genymotion.

We used this page

http://inthecheesefactory.com/blog/how-to-install-google-services-on-genymotion/en

to get it working. This works with all the commercial push providers we
have checked out.

We have not found a way to get Android 6 working with push on Genymotion
but since Android 6 is still preview on Genymotion its not an issue for
us.

However we haven’t found that deploying to a real device (Nexus 5) to
be much slower than Genymotion. We’re happy to deploy to any as its
pretty speedy either way.

Unclear as to why deploying to a real device is such a problem, we
develop on iPhone and Android using Cordova and even though I like the
iPhone, the development and debugging tools on a real Android device are
excellent and fast. When we have a real problem, we tend to ignore Xcode
and Safari and the iPhone and debug it on a real Android device. We
don’t have any real issues, though we always want things to be
quicker.

Rob

On 22 Jan 2016, at 11:47, Anton Hughes wrote:

> On Fri, Jan 22, 2016 at 12:42 PM, Daniel Passos <[hidden email]>
> wrote:
>
>> By default GCM/Push don't work on Google emulator, only in the last
>> versions, but I always prefer test it in a real device to prevent
>> problems.
>
>
> If I have to deploy to a real device to do basic testing I will go
> (more)
> insane.
> There has to be away of testing push that doesnt involve deploying to
> an
> actual device.
> _______________________________________________
> 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] Testing push in Cordova

Anton Hughes
Thanks Rob
On Fri, Jan 22, 2016 at 12:59 PM, Rob Willett <[hidden email]> wrote:
Unclear as to why deploying to a real device is such a problem, we
develop on iPhone and Android using Cordova and even though I like the
iPhone, the development and debugging tools on a real Android device are
excellent and fast. When we have a real problem, we tend to ignore Xcode
and Safari and the iPhone and debug it on a real Android device. We
don’t have any real issues, though we always want things to be
quicker.

Its a problem for me as I dont have a cell phone - seriously. 
But, it just sounds odd, to have to deploy and install on a new piece of hardware each time you want to test. My usual workflow would be to develop locally, then when things are working, then deploy. 

And, for now, I am just doing a proof of concept - my goal is just to prove that it is possible to send a push notification from UPS to android using cordova. I'm surprised at how complicated it is. But I suppose my confusion and frustration is simply because I am new to this style of developing. 



_______________________________________________
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] Testing push in Cordova

Rob Willett
Anton,

Its difficult to do some things without a phone, you can certainly
develop on Cordova and get a long way on screens designs, controllers,
services, posting to and getting stuff from servers but somethings need
a hardware device.

Off the top of my head things that don’t work properly on
iPhone/Android simulators or at all.

1. Background processing. JavaScript timers continue to work in the
background but do not on a real phone. Sounds innocuous but its a
massive hassle for us.
2. GPS is very limited on the iPhone emulator. You can set simple GPS
routes up and thats it. The genymotion has a GPS on off switch to save a
position, useful for very, very limited uses.
3. No notifications on the iPhone emulator. Zilch. You can get them on
the Genymotion with the link I posted.
4. No In-App purchasing on the iPhone. No access to the sandbox, its a
nightmare even on a real phone. No idea on Android as we have up on the
iPhone.
5. Some weird effects of different versions of IOS and background
processing with geolocation and posting to servers with ATS. We can’t
work it out at all, so we use real phones.

You can get so far without a phone but at the end of the day you will
need one to develop and test. There is no getting away from it. Ups
cannot develop and simply deploy and hope it all works. Emulators will
work, but not with any success for at least the things I’ve quoted
above.

Rob

On 22 Jan 2016, at 12:10, Anton Hughes wrote:

> Thanks Rob
> On Fri, Jan 22, 2016 at 12:59 PM, Rob Willett <
> [hidden email]> wrote:
>
>> Unclear as to why deploying to a real device is such a problem, we
>> develop on iPhone and Android using Cordova and even though I like
>> the
>> iPhone, the development and debugging tools on a real Android device
>> are
>> excellent and fast. When we have a real problem, we tend to ignore
>> Xcode
>> and Safari and the iPhone and debug it on a real Android device. We
>> don’t have any real issues, though we always want things to be
>> quicker.
>>
>
> Its a problem for me as I dont have a cell phone - seriously.
> But, it just sounds odd, to have to deploy and install on a new piece
> of
> hardware each time you want to test. My usual workflow would be to
> develop
> locally, then when things are working, then deploy.
>
> And, for now, I am just doing a proof of concept - my goal is just to
> prove
> that it is possible to send a push notification from UPS to android
> using
> cordova. I'm surprised at how complicated it is. But I suppose my
> confusion
> and frustration is simply because I am new to this style of
> developing.
> _______________________________________________
> 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] Testing push in Cordova

Anton Hughes
Thanks Rob - really appreciate this.

May I recommend that this is published on the aerogear website. This kind of knowledge is gained through hard knocks. It can save many others the same pain.

On Fri, Jan 22, 2016 at 1:22 PM, Rob Willett <[hidden email]> wrote:
Anton,

Its difficult to do some things without a phone, you can certainly
develop on Cordova and get a long way on screens designs, controllers,
services, posting to and getting stuff from servers but somethings need
a hardware device.

Off the top of my head things that don’t work properly on
iPhone/Android simulators or at all.

1. Background processing. JavaScript timers continue to work in the
background but do not on a real phone. Sounds innocuous but its a
massive hassle for us.
2. GPS is very limited on the iPhone emulator. You can set simple GPS
routes up and thats it. The genymotion has a GPS on off switch to save a
position, useful for very, very limited uses.
3. No notifications on the iPhone emulator. Zilch. You can get them on
the Genymotion with the link I posted.
4. No In-App purchasing on the iPhone. No access to the sandbox, its a
nightmare even on a real phone. No idea on Android as we have up on the
iPhone.
5. Some weird effects of different versions of IOS and background
processing with geolocation and posting to servers with ATS. We can’t
work it out at all, so we use real phones.

You can get so far without a phone but at the end of the day you will
need one to develop and test. There is no getting away from it. Ups
cannot develop and simply deploy and hope it all works. Emulators will
work, but not with any success for at least the things I’ve quoted
above.

Rob

On 22 Jan 2016, at 12:10, Anton Hughes wrote:

> Thanks Rob
> On Fri, Jan 22, 2016 at 12:59 PM, Rob Willett <
> [hidden email]> wrote:
>
>> Unclear as to why deploying to a real device is such a problem, we
>> develop on iPhone and Android using Cordova and even though I like
>> the
>> iPhone, the development and debugging tools on a real Android device
>> are
>> excellent and fast. When we have a real problem, we tend to ignore
>> Xcode
>> and Safari and the iPhone and debug it on a real Android device. We
>> don’t have any real issues, though we always want things to be
>> quicker.
>>
>
> Its a problem for me as I dont have a cell phone - seriously.
> But, it just sounds odd, to have to deploy and install on a new piece
> of
> hardware each time you want to test. My usual workflow would be to
> develop
> locally, then when things are working, then deploy.
>
> And, for now, I am just doing a proof of concept - my goal is just to
> prove
> that it is possible to send a push notification from UPS to android
> using
> cordova. I'm surprised at how complicated it is. But I suppose my
> confusion
> and frustration is simply because I am new to this style of
> developing.
> _______________________________________________
> 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] Testing push in Cordova

Rob Willett
They are welcome to use it as they see fit, though the only things that
should be there is the push notification stuff, the rest is my problem
:)

On 22 Jan 2016, at 12:51, Anton Hughes wrote:

> Thanks Rob - really appreciate this.
>
> May I recommend that this is published on the aerogear website. This
> kind
> of knowledge is gained through hard knocks. It can save many others
> the
> same pain.
>
> On Fri, Jan 22, 2016 at 1:22 PM, Rob Willett
> <[hidden email]
>> wrote:
>
>> Anton,
>>
>> Its difficult to do some things without a phone, you can certainly
>> develop on Cordova and get a long way on screens designs,
>> controllers,
>> services, posting to and getting stuff from servers but somethings
>> need
>> a hardware device.
>>
>> Off the top of my head things that don’t work properly on
>> iPhone/Android simulators or at all.
>>
>> 1. Background processing. JavaScript timers continue to work in the
>> background but do not on a real phone. Sounds innocuous but its a
>> massive hassle for us.
>> 2. GPS is very limited on the iPhone emulator. You can set simple GPS
>> routes up and thats it. The genymotion has a GPS on off switch to
>> save a
>> position, useful for very, very limited uses.
>> 3. No notifications on the iPhone emulator. Zilch. You can get them
>> on
>> the Genymotion with the link I posted.
>> 4. No In-App purchasing on the iPhone. No access to the sandbox, its
>> a
>> nightmare even on a real phone. No idea on Android as we have up on
>> the
>> iPhone.
>> 5. Some weird effects of different versions of IOS and background
>> processing with geolocation and posting to servers with ATS. We
>> can’t
>> work it out at all, so we use real phones.
>>
>> You can get so far without a phone but at the end of the day you will
>> need one to develop and test. There is no getting away from it. Ups
>> cannot develop and simply deploy and hope it all works. Emulators
>> will
>> work, but not with any success for at least the things I’ve quoted
>> above.
>>
>> Rob
>>
>> On 22 Jan 2016, at 12:10, Anton Hughes wrote:
>>
>>> Thanks Rob
>>> On Fri, Jan 22, 2016 at 12:59 PM, Rob Willett <
>>> [hidden email]> wrote:
>>>
>>>> Unclear as to why deploying to a real device is such a problem, we
>>>> develop on iPhone and Android using Cordova and even though I like
>>>> the
>>>> iPhone, the development and debugging tools on a real Android
>>>> device
>>>> are
>>>> excellent and fast. When we have a real problem, we tend to ignore
>>>> Xcode
>>>> and Safari and the iPhone and debug it on a real Android device. We
>>>> don’t have any real issues, though we always want things to be
>>>> quicker.
>>>>
>>>
>>> Its a problem for me as I dont have a cell phone - seriously.
>>> But, it just sounds odd, to have to deploy and install on a new
>>> piece
>>> of
>>> hardware each time you want to test. My usual workflow would be to
>>> develop
>>> locally, then when things are working, then deploy.
>>>
>>> And, for now, I am just doing a proof of concept - my goal is just
>>> to
>>> prove
>>> that it is possible to send a push notification from UPS to android
>>> using
>>> cordova. I'm surprised at how complicated it is. But I suppose my
>>> confusion
>>> and frustration is simply because I am new to this style of
>>> developing.
>>> _______________________________________________
>>> 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] Testing push in Cordova

Anton Hughes
So, to be clear, if I do the steps on http://inthecheesefactory.com/blog/how-to-install-google-services-on-genymotion/en then I should be able to test push without having to find borrow my girlfriends phone?

Is there any free alternatives to genymotion that work with push (even if some hacks are required)?

As mentioned previously, at this stage it is just a PoC - so would like to avoid having to buy any hardware or software, if possible.


On Fri, Jan 22, 2016 at 1:54 PM, Rob Willett <[hidden email]> wrote:
They are welcome to use it as they see fit, though the only things that
should be there is the push notification stuff, the rest is my problem
:)

On 22 Jan 2016, at 12:51, Anton Hughes wrote:

> Thanks Rob - really appreciate this.
>
> May I recommend that this is published on the aerogear website. This
> kind
> of knowledge is gained through hard knocks. It can save many others
> the
> same pain.
>
> On Fri, Jan 22, 2016 at 1:22 PM, Rob Willett
> <[hidden email]
>> wrote:
>
>> Anton,
>>
>> Its difficult to do some things without a phone, you can certainly
>> develop on Cordova and get a long way on screens designs,
>> controllers,
>> services, posting to and getting stuff from servers but somethings
>> need
>> a hardware device.
>>
>> Off the top of my head things that don’t work properly on
>> iPhone/Android simulators or at all.
>>
>> 1. Background processing. JavaScript timers continue to work in the
>> background but do not on a real phone. Sounds innocuous but its a
>> massive hassle for us.
>> 2. GPS is very limited on the iPhone emulator. You can set simple GPS
>> routes up and thats it. The genymotion has a GPS on off switch to
>> save a
>> position, useful for very, very limited uses.
>> 3. No notifications on the iPhone emulator. Zilch. You can get them
>> on
>> the Genymotion with the link I posted.
>> 4. No In-App purchasing on the iPhone. No access to the sandbox, its
>> a
>> nightmare even on a real phone. No idea on Android as we have up on
>> the
>> iPhone.
>> 5. Some weird effects of different versions of IOS and background
>> processing with geolocation and posting to servers with ATS. We
>> can’t
>> work it out at all, so we use real phones.
>>
>> You can get so far without a phone but at the end of the day you will
>> need one to develop and test. There is no getting away from it. Ups
>> cannot develop and simply deploy and hope it all works. Emulators
>> will
>> work, but not with any success for at least the things I’ve quoted
>> above.
>>
>> Rob
>>
>> On 22 Jan 2016, at 12:10, Anton Hughes wrote:
>>
>>> Thanks Rob
>>> On Fri, Jan 22, 2016 at 12:59 PM, Rob Willett <
>>> [hidden email]> wrote:
>>>
>>>> Unclear as to why deploying to a real device is such a problem, we
>>>> develop on iPhone and Android using Cordova and even though I like
>>>> the
>>>> iPhone, the development and debugging tools on a real Android
>>>> device
>>>> are
>>>> excellent and fast. When we have a real problem, we tend to ignore
>>>> Xcode
>>>> and Safari and the iPhone and debug it on a real Android device. We
>>>> don’t have any real issues, though we always want things to be
>>>> quicker.
>>>>
>>>
>>> Its a problem for me as I dont have a cell phone - seriously.
>>> But, it just sounds odd, to have to deploy and install on a new
>>> piece
>>> of
>>> hardware each time you want to test. My usual workflow would be to
>>> develop
>>> locally, then when things are working, then deploy.
>>>
>>> And, for now, I am just doing a proof of concept - my goal is just
>>> to
>>> prove
>>> that it is possible to send a push notification from UPS to android
>>> using
>>> cordova. I'm surprised at how complicated it is. But I suppose my
>>> confusion
>>> and frustration is simply because I am new to this style of
>>> developing.
>>> _______________________________________________
>>> 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


_______________________________________________
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] Testing push in Cordova

Luke Holmquist
In reply to this post by Anton Hughes


On Fri, Jan 22, 2016 at 2:29 AM, Anton Hughes <[hidden email]> wrote:
Hello

I am trying to test the UPS and Cordova.

I have UPS setup, have setup a google account, have all the required pieces.

I have watched all the videos that demonstrate how it should work.

I am deploying the sample app via the android device emulator, and it does get deployed.

However the UPS never sees any devices as connected, and no push messages sent from UPS ever arrive.
just a thought that popped into my head.   The url pointing to your UPS server shouldn't be localhost, since there is no localhost on the device.  not sure if thats how you have it configured, though. but this always bites me 

What should I do to debug this? Are there any obvious things to look into?

Thanks

_______________________________________________
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] Testing push in Cordova

Anton Hughes

On Fri, Jan 22, 2016 at 2:25 PM, Luke Holmquist <[hidden email]> wrote:
just a thought that popped into my head.   The url pointing to your UPS server shouldn't be localhost, since there is no localhost on the device.  not sure if thats how you have it configured, though. but this always bites me 

The wise expression of Homer Simpson comes rushing into mind!
I'm away from my dev environment, so cannot test - but, yes I am using localhost in the cordova project.

So if not localhost, then what? 

_______________________________________________
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] Testing push in Cordova

Luke Holmquist


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

On Fri, Jan 22, 2016 at 2:25 PM, Luke Holmquist <[hidden email]> wrote:
just a thought that popped into my head.   The url pointing to your UPS server shouldn't be localhost, since there is no localhost on the device.  not sure if thats how you have it configured, though. but this always bites me 

The wise expression of Homer Simpson comes rushing into mind!
I'm away from my dev environment, so cannot test - but, yes I am using localhost in the cordova project.

So if not localhost, then what? 
if you are running the UPS server on your local machine, then it would be your IP instead of localhost.  The device just needs to "see" it, so that means you need to be on the same network.   unless you are running it in the cloud 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] Testing push in Cordova

Anton Hughes
Thanks Luke. I will try this. 

On Fri, Jan 22, 2016 at 2:31 PM, Luke Holmquist <[hidden email]> wrote:


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

On Fri, Jan 22, 2016 at 2:25 PM, Luke Holmquist <[hidden email]> wrote:
just a thought that popped into my head.   The url pointing to your UPS server shouldn't be localhost, since there is no localhost on the device.  not sure if thats how you have it configured, though. but this always bites me 

The wise expression of Homer Simpson comes rushing into mind!
I'm away from my dev environment, so cannot test - but, yes I am using localhost in the cordova project.

So if not localhost, then what? 
if you are running the UPS server on your local machine, then it would be your IP instead of localhost.  The device just needs to "see" it, so that means you need to be on the same network.   unless you are running it in the cloud 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



_______________________________________________
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] Testing push in Cordova

Anton Hughes
Ok, I have managed to get setup with Genymotion, and have the google tools installed.

How, then, can I deploy the cordova project to the genymotion vm? Is there a way to do that from within Eclipse?

Thanks

On Fri, Jan 22, 2016 at 2:35 PM, Anton Hughes <[hidden email]> wrote:
Thanks Luke. I will try this. 

On Fri, Jan 22, 2016 at 2:31 PM, Luke Holmquist <[hidden email]> wrote:


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

On Fri, Jan 22, 2016 at 2:25 PM, Luke Holmquist <[hidden email]> wrote:
just a thought that popped into my head.   The url pointing to your UPS server shouldn't be localhost, since there is no localhost on the device.  not sure if thats how you have it configured, though. but this always bites me 

The wise expression of Homer Simpson comes rushing into mind!
I'm away from my dev environment, so cannot test - but, yes I am using localhost in the cordova project.

So if not localhost, then what? 
if you are running the UPS server on your local machine, then it would be your IP instead of localhost.  The device just needs to "see" it, so that means you need to be on the same network.   unless you are running it in the cloud 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




_______________________________________________
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] Testing push in Cordova

Anton Hughes
Ok so I managed to deploy my cordova app onto genymotion. Actually that wasnt too difficult. 
But, alas, it still does not connect to the UPS.

I have updated the pushServerURL value to use my hosts ip.

My index.html looks like this - I notice it is referencing cordova.js, but this file is missing in the eclipse project. I assume eclipse automagically adds it when the project is built.
Ive removed the send, variant and variant secret - to protect the identity of the innocent.

<!DOCTYPE HTML>
<html>
<head>
  <title>Demo</title>
</head>
<body>

<script type="text/javascript" charset="utf-8" src="cordova.js"></script>
<script type="text/javascript" charset="utf-8" src="jquery_1.5.2.min.js"></script>

<script type="text/javascript">

var app = {
 // Application Constructor
 initialize: function() {
   this.bindEvents();
 },
 // Bind Event Listeners
 //
 // Bind any events that are required on startup. Common events are:
 // 'load', 'deviceready', 'offline', and 'online'.
 bindEvents: function() {
   document.addEventListener('deviceready', this.onDeviceReady, false);
 },
 // deviceready Event Handler
 //
 // The scope of 'this' is the event. In order to call the 'receivedEvent'
 // function, we must explicitly call 'app.receivedEvent(...);'
 onDeviceReady: function() {
   app.receivedEvent('deviceready');
   var pushConfig = {
     pushServerURL: "http://192.168.1.40:8080/ag-push/",
     android: { 
       senderID: "",
       variantID: "",
       variantSecret: ""
     }
   };
push.register(app.onNotification, successHandler, errorHandler, pushConfig);

function successHandler() {
 console.log('success')
}

function errorHandler(message) {
 console.log('error ' + message);
}
},
onNotification: function(event) {
 alert(event.alert);
},
// Update DOM on a Received Event
receivedEvent: function(id) {
 var parentElement = document.getElementById(id);
 var listeningElement = parentElement.querySelector('.listening');
 var receivedElement = parentElement.querySelector('.received');

 listeningElement.setAttribute('style', 'display:none;');
 receivedElement.setAttribute('style', 'display:block;');

 console.log('Received Event: ' + id);
}
};

app.initialize();

  document.addEventListener('deviceready', onDeviceReady, true);

</script>
<div id="home">
  <div id="app-status-div">
    <ul id="app-status-ul">
      <li>AeroGear PushPlugin Unified Push Demo</li>
    </ul>
  </div>
</div>
</body>
</html>

Can anyone see anything obviously wrong?

How does one debug in such a situation?

Thanks


On Sat, Jan 23, 2016 at 12:21 AM, Anton Hughes <[hidden email]> wrote:
Ok, I have managed to get setup with Genymotion, and have the google tools installed.

How, then, can I deploy the cordova project to the genymotion vm? Is there a way to do that from within Eclipse?

Thanks

On Fri, Jan 22, 2016 at 2:35 PM, Anton Hughes <[hidden email]> wrote:
Thanks Luke. I will try this. 

On Fri, Jan 22, 2016 at 2:31 PM, Luke Holmquist <[hidden email]> wrote:


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

On Fri, Jan 22, 2016 at 2:25 PM, Luke Holmquist <[hidden email]> wrote:
just a thought that popped into my head.   The url pointing to your UPS server shouldn't be localhost, since there is no localhost on the device.  not sure if thats how you have it configured, though. but this always bites me 

The wise expression of Homer Simpson comes rushing into mind!
I'm away from my dev environment, so cannot test - but, yes I am using localhost in the cordova project.

So if not localhost, then what? 
if you are running the UPS server on your local machine, then it would be your IP instead of localhost.  The device just needs to "see" it, so that means you need to be on the same network.   unless you are running it in the cloud 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





_______________________________________________
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] Testing push in Cordova

Anton Hughes
Ok, I found the problem (see below) - but not the solution.

file:///android_asset/www/plugins/aerogear-cordova-push/www/aerogear.ajax.js Failed to load resource: net::ERR_FILE_NOT_FOUND
file:///android_asset/www/plugins/aerogear-cordova-push/www/aerogear-push.js Failed to load resource: net::ERR_FILE_NOT_FOUND
cordova.js:1418 Uncaught Error: Module aerogear-cordova-push.AeroGear.ajax does not exist.
cordova.js:1183 deviceready has not fired after 5 seconds.
cordova.js:1176 Channel not fired: onPluginsReady
cordova.js:1176 Channel not fired: onCordovaReady

The resources that failed to load are present in the project.
Inline image 1

On Sat, Jan 23, 2016 at 12:51 AM, Anton Hughes <[hidden email]> wrote:
Ok so I managed to deploy my cordova app onto genymotion. Actually that wasnt too difficult. 
But, alas, it still does not connect to the UPS.

I have updated the pushServerURL value to use my hosts ip.

My index.html looks like this - I notice it is referencing cordova.js, but this file is missing in the eclipse project. I assume eclipse automagically adds it when the project is built.
Ive removed the send, variant and variant secret - to protect the identity of the innocent.

<!DOCTYPE HTML>
<html>
<head>
  <title>Demo</title>
</head>
<body>

<script type="text/javascript" charset="utf-8" src="cordova.js"></script>
<script type="text/javascript" charset="utf-8" src="jquery_1.5.2.min.js"></script>

<script type="text/javascript">

var app = {
 // Application Constructor
 initialize: function() {
   this.bindEvents();
 },
 // Bind Event Listeners
 //
 // Bind any events that are required on startup. Common events are:
 // 'load', 'deviceready', 'offline', and 'online'.
 bindEvents: function() {
   document.addEventListener('deviceready', this.onDeviceReady, false);
 },
 // deviceready Event Handler
 //
 // The scope of 'this' is the event. In order to call the 'receivedEvent'
 // function, we must explicitly call 'app.receivedEvent(...);'
 onDeviceReady: function() {
   app.receivedEvent('deviceready');
   var pushConfig = {
     pushServerURL: "http://192.168.1.40:8080/ag-push/",
     android: { 
       senderID: "",
       variantID: "",
       variantSecret: ""
     }
   };
push.register(app.onNotification, successHandler, errorHandler, pushConfig);

function successHandler() {
 console.log('success')
}

function errorHandler(message) {
 console.log('error ' + message);
}
},
onNotification: function(event) {
 alert(event.alert);
},
// Update DOM on a Received Event
receivedEvent: function(id) {
 var parentElement = document.getElementById(id);
 var listeningElement = parentElement.querySelector('.listening');
 var receivedElement = parentElement.querySelector('.received');

 listeningElement.setAttribute('style', 'display:none;');
 receivedElement.setAttribute('style', 'display:block;');

 console.log('Received Event: ' + id);
}
};

app.initialize();

  document.addEventListener('deviceready', onDeviceReady, true);

</script>
<div id="home">
  <div id="app-status-div">
    <ul id="app-status-ul">
      <li>AeroGear PushPlugin Unified Push Demo</li>
    </ul>
  </div>
</div>
</body>
</html>

Can anyone see anything obviously wrong?

How does one debug in such a situation?

Thanks


On Sat, Jan 23, 2016 at 12:21 AM, Anton Hughes <[hidden email]> wrote:
Ok, I have managed to get setup with Genymotion, and have the google tools installed.

How, then, can I deploy the cordova project to the genymotion vm? Is there a way to do that from within Eclipse?

Thanks

On Fri, Jan 22, 2016 at 2:35 PM, Anton Hughes <[hidden email]> wrote:
Thanks Luke. I will try this. 

On Fri, Jan 22, 2016 at 2:31 PM, Luke Holmquist <[hidden email]> wrote:


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

On Fri, Jan 22, 2016 at 2:25 PM, Luke Holmquist <[hidden email]> wrote:
just a thought that popped into my head.   The url pointing to your UPS server shouldn't be localhost, since there is no localhost on the device.  not sure if thats how you have it configured, though. but this always bites me 

The wise expression of Homer Simpson comes rushing into mind!
I'm away from my dev environment, so cannot test - but, yes I am using localhost in the cordova project.

So if not localhost, then what? 
if you are running the UPS server on your local machine, then it would be your IP instead of localhost.  The device just needs to "see" it, so that means you need to be on the same network.   unless you are running it in the cloud 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






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