PDA

View Full Version : Android help: Getting ST app to work on Android. Source code available.



phillipadsmith
10 Mar 2011, 10:47 AM
Greetings Sencha Touchers,

Hoping that you might be able to spare a few moments to help with a pesky Android issue. The incentive is that you can feel free to steal any code that you find useful (see link to Github below) from a soon-to-be launched Sencha Touch app. :)

In summary: The app is a simple news app. It's being developed for TheTyee.ca, an award-winning online news site based in Vancouver, BC. We're hoping to launch it later this month to Tyee users.

It's been fun to develop. We started back on Sencha 0.95 and we're now on 1.0.1a and it's been great to watch the progress. However, getting the app working on Android has not been fun. Now that we're done with the iOS side of things -- and are relatively happy with functionality & performance there -- it's time to come back to that pesky Android.

So, here are the issues:

* Sometimes the app starts in the Android simulator; Sometimes not (see attached screenshots).
* The app never starts on the actual devices that we've tested (Nexus One; Nexus S). It just sits at the first screen, either green or grey. It almost appears that the index.html page is sitting _in front_ of the application and hiding it, as the sliders do appear when you try to slide up/down, but just not the content.

The above is the most pressing issue.

Also:

* If it does start in the simulator, it's virtually non-functional -- any attempts to swipe down/up are quite unresponsive (perhaps that's just the simulator, however, as it's quite slow in general.)
* Also, buttons often don't appear (like the "Back" button), which makes in-app navigation almost impossible.

You can check out a version of the app without caching/offline storage here:
http://preview.app.thetyee.ca

Or with caching and offline storage here:
http://app.thetyee.ca

And the source code is on Github here:
https://github.com/phillipadsmith/A-Slippery-Fish

I've attached some screenshots of how the application _should_ look on Android here, but I've never been able to actually see this on a physical device, only -- if I'm lucky -- in the simulator.

Any help appreciated. I'd be quite indebted for pointers, ideas, or simply saying "you *****, you forgot to X." :)

Phillip.

P.S. I've noticed that if I strip out _all_ of the CSS, that the raw data seems to come through (un-styled, obviously), which leads me to believe it's related to the CSS, but that's just a guess at this point.

phillipadsmith
15 Mar 2011, 7:38 AM
Going once, going twice...

MrRoyce
22 Mar 2011, 6:45 AM
I feel your pain and wish I could help! I found this thread searching for help with the Phonegap/MVC tutorial on Android. It was torture getting it to work with XCode and Mac, but the Android platform is even less promising.

phillipadsmith
22 Mar 2011, 7:27 AM
Thanks, MrRoyce.

I've just signed-up for "premium support," so we'll see where that goes.

Phillip.

sudheer.polavarapu
27 May 2011, 4:38 AM
Thanks, MrRoyce.

I've just signed-up for "premium support," so we'll see where that goes.

Phillip.


Are you able find the root cause of the issue/s? I am facing probelms running the sample given by the sencha team for phonegap+sencha touch+android. There is no much help/documentation on the combination. I am wondering whether combination of phonegap+sencha touch really works for real time apps?

~Sudheer

phillipadsmith
6 Jun 2011, 7:43 AM
I enabled the Android Javascript debugger (http://stackoverflow.com/questions/2314886/how-can-i-debug-javascript-on-android ) and was able to see the error. Basically, there was a function that was returning null vs. an empty list, which was causing the whole app to stop working on the Nexus One. Returning an empty list instead fixed the issue. Hope that helps a bit.

nausherwan644
20 Jun 2011, 6:59 AM
dear,
i want to know how we can configure sencha touch with eclipse, because it is difficult to code without code asist or code intelllicence, any body help me in this regard ?

thanks,