[aerogear-dev] pushplugin release

Stefan Miklosovic smikloso at redhat.com
Wed May 14 07:54:49 EDT 2014


Update:

Matthias wanted to check out also Android version of that hellopush demo

(this https://github.com/aerogear/aerogear-push-helloworld/tree/master/android) with this https://github.com/aerogear/aerogear-android-push)

== Android version:

Android emulator 4.4.2 manually - works ok
Android emulator 2.3.3 manually - works ok

Android physical device 2.3.3 manually - ok

I gave up on automated test since the instrumentation of that package is because of some to me yet unknown reason unsuccessfull.

== Cordova version with this unmodified project as is https://github.com/aerogear/aerogear-push-helloworld/tree/master/cordova:

Android physical device 2.3.3 manually - does the same thing as with Matthias try http://pastebin.com/raw.php?i=CLrR07mH

Android emulator device 2.3.3 Google API manually - does not display that dialog, starts normally, gets stuck on "registering ..." and does nothing after it, log is following

I/ActivityManager(   60): Displayed org.jboss.aerogear.unifiedpush.HelloWorld/.AeroGearUnifiedPushHelloWorld: +991ms
D/CordovaActivity(  495): onMessage(onPageStarted,file:///android_asset/www/index.html)
D/CordovaLog(  495): file:///android_asset/www/cordova.js: Line 966 : Falling back on PROMPT mode since _cordovaNative is missing. Expected for Android 3.2 and lower only.
I/Web Console(  495): Falling back on PROMPT mode since _cordovaNative is missing. Expected for Android 3.2 and lower only. at file:///android_asset/www/cordova.js:966
D/CordovaActivity(  495): onMessage(spinner,stop)
D/CordovaWebViewClient(  495): onPageFinished(file:///android_asset/www/index.html)
D/CordovaActivity(  495): onMessage(onPageFinished,file:///android_asset/www/index.html)

this is funny

D/CordovaLog(  495): file:///android_asset/www/js/index.js: Line 39 : ReferenceError: Can't find variable: push
E/Web Console(  495): ReferenceError: Can't find variable: push at file:///android_asset/www/js/index.js:39

D/dalvikvm(  126): GC_EXPLICIT freed 123K, 47% free 3176K/5895K, external 6045K/7549K, paused 47ms
D/dalvikvm(  525): GC_EXPLICIT freed 1020K, 54% free 4027K/8711K, external 3024K/3370K, paused 94ms

It is the same thing with manual Android physical 4.1.2 and with emulator 4.4.2 manual

Android emulator device 2.3.3 automated test

shows that dialog as I posted as an image and fails - it seems that switching to webview from Selendroid does some weird stuff ...

I was basically not able to run Cordova project successfully by any way, not sure what happened from the last time, 2.3.3 cases crashe or got stuck, 4+ cases got stuck as well but havent crashed.

I am wondering what that Can't find variable: push at file:///android_asset/www/js/index.js:39 means, it behaved ok from the last time.

It becomes pretty chaotic to cover all cases, as I said I gave up automated tests from now on.

Stefan Miklosovic
Red Hat Brno - JBoss Mobile Platform

e-mail: smikloso at redhat.com
irc: smikloso

----- Original Message -----
> Hi Stefan,
> 
> few comments inline.
> 
> Karel
> 
> On Wed, 7 May 2014 10:38:36 -0400 (EDT)
> Stefan Miklosovic <smikloso at redhat.com> wrote:
> 
> > Hi,
> > 
> > regarding of a release, I looked at it little bit closer and these are my
> > findings.
> > 
> > I tried latest master with cordova plugin add
> > https://github.com/aerogear/aerogear-pushplugin-cordova and I tried it on
> > this demo (1)
> > 
> > 1) What does not work
> > 
> > a) Android 2.3.3 emulator with Google API + mentioned demo, whole app
> > crashes
> > upon its start like (2) b) Android 2.3.4 physical device (My Sony Ericsson
> > with Android 2.3.4) - it shows this weird dialog (3)
> 
> Is this error dialog present for both automated (Droidium) and manual
> (Cordova
> CLI) deployments on real device? If not, it might be caused by Selendroid.
> Same
> for c)
> 
> > c) Android 4.1.2
> > physical device (Samsung) - same as (3) however once it shows it and once
> > not ... it is not deterministic
> > 
> > Regarding of (3), even I cancel it, it just freezes and does nothing.
> > 
> > 2) What works by automatic test but not deterministically
> > 
> > Android 4.4.2 emulator + Google API
> > 
> > This is little bit more complicated. Droidium can test in a such way that
> > in
> > case AVD of your emulator is not present on your machine, that AVD is
> > automatically created in test execution itself and emulator is booted, APK
> > is
> > deployed there tests are carried out and emulator is dynamically deleted
> > when
> > test stops.
> > 
> > Even emulator is booted and APK is installed there and test proceeds, in
> > the
> > background Google GCM service seems to be not initialized in time we are
> > sending a message so it is kind of not delivered. By debugging it
> > step-by-step it seems it has enough time to initialize itself.
> 
> We need an element (with id) in app we can wait for to appear to signalize
> registration was finished. Valid feature request for all android/ios/cordova
> variants I believe.
> 
> > 
> > However, the same issue with a message being not delivered has occured at
> > fully prepared emulator as well.
> > 
> 
> This makes sense to me as registration happen after app is installed and
> opened.
> 
> > 3) What works manually
> > 
> > Android 4.4.2 emulator + Google API meaning without test but buy sending a
> > message from web admin of (4)
> > 
> > Issues:
> > 
> > 1) For testing purposes we have this UPS installation (4) and while I was
> > coping with this testing manually, when I sent some message from UPS web
> > admin, it appeared on emulator twice, so it was basically sent two times.
> > Any
> > explanation for this?
> > 
> > 2) Sometime that message was not delivered to emulator at all, meaning even
> > I
> > send it from test it has not appeared on emulator. By accident this was
> > resolved when I refreshed web admin in browser. I do not know if this is
> > somehow related but why not ...
> 
> Well, delivery is not guaranteed and can take some time. Might be just a
> coincidence :-)
> 
> > 
> > I used this test (5) which uses Arquillian Droidium. Test is pretty
> > straightforward and if you know some Selenium you are already done.
> > 
> > (1)
> > https://github.com/aerogear/aerogear-push-helloworld/tree/master/cordova
> > (2) http://pastebin.com/raw.php?i=CLrR07mH
> > (3) http://devio.us/~stewe/DSC_0164.JPG
> > (4) https://cordovaci-mobileqa.rhcloud.com
> > (5)
> > https://github.com/smiklosovic/cordova-pushplugin-test-/blob/master/src/test/java/org/jboss/aerogear/push/plugin/cordova/AeroGearPushPluginCordovaTestCase.java
> > 
> > Stefan Miklosovic
> > Red Hat Brno - JBoss Mobile Platform
> > 
> > e-mail: smikloso at redhat.com
> > irc: smikloso
> > 
> > ----- Original Message -----
> > > Hi,
> > > 
> > > I’ve announced it before, but didn’t came around to actually do it and we
> > > started discussing the version number. So end of the week I’ll release a
> > > new
> > > version of the aerogear-pushplugin-cordova (for real this time) with
> > > version
> > > 0.5.0 this will include the 64 bit support the new API and some small bug
> > > fixes.
> > > 
> > > Cheers,
> > > 	Erik Jan
> > > _______________________________________________
> > > aerogear-dev mailing list
> > > aerogear-dev at lists.jboss.org
> > > https://lists.jboss.org/mailman/listinfo/aerogear-dev
> > >
> > 
> > _______________________________________________
> > aerogear-dev mailing list
> > aerogear-dev at lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/aerogear-dev
> 
> _______________________________________________
> aerogear-dev mailing list
> aerogear-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/aerogear-dev



More information about the aerogear-dev mailing list