Android Software Development

Chewy509

Wotty wot wot.
Joined
Nov 8, 2006
Messages
3,327
Location
Gold Coast Hinterland, Australia
Hi Guys,

This is a question for those that actually develop Android apps.

Besides JUnit for underlying business logic code testing, what test harness/software do you use for UI testing? And can the UI test harness results be used/integrated with Hudson? (FYI. Hudson is running on a headless server (but can fire up xvfb as needed to get a virtual frame buffer for any Java application that needs a GUI)).

Quick story: Current Uni project requires using Google App Engine to host a web service (easy), but need to develop 2-3 different clients (Desktop, Web and/or Mobile). For mobile we've chosen Android 3.2+ (basically Tablet orientated), but need to find a tool that can be UI testing for the User Acceptance Test criteria of the assessment. (The recommendations we've received are basically non-existent).

While I've been able to pick Android development pretty quick, I do have some basic questions... The ones I can think off the top of my head are:
1. Quickest way to assign an event handler to button click? (is it either through the UI *.xml file, or via onCreate() method to add an eventListener for the UI element).
2. Best method to handle long clicks to bring up a context menu within a table (on a <tablerow>, so we can either delete the row or change to an Activity that will modify the rows contents, before switching back to the table view).
 

MaxBurn

Storage Is My Life
Joined
Jan 20, 2004
Messages
3,245
Location
SC
Don't think I heard anyone here is developing for android.
 

Mercutio

Fatwah on Western Digital
Joined
Jan 17, 2002
Messages
21,594
Location
I am omnipresent
Technically, it's not supposed to be that hard, but at the same time there really isn't anything I want to do with an Android device right now that I can't do. In the overwhelming majority of cases, I can do it for free. One of the biggest annoyances I have isn't the inability to develop applications, but the inability to access some things because of vendor-imposed limitations on devices. Even stuff that has full access to the Play Store is sometimes limited by manufacturer policies. I found something on the Amazon App store that wouldn't install on the Kindle Fire the other day, too.

This is the kind of crap that gets Richard Stallman's panties in a bunch, but I can see his point. There's no reason I should not be able to install the official Gmail app or Dropbox on a Fire.
 

Chewy509

Wotty wot wot.
Joined
Nov 8, 2006
Messages
3,327
Location
Gold Coast Hinterland, Australia
Thanks guys, I think Sol is the only one who does mobile development.

But anyway, Google App Engine is turning out to be painful (no native SOAP//REST support for web services), the default datastore requires special considerations on what you are storing, etc. I haven't touched Android since posting, but have been reading in my very limited spare time. (I have the answers, sort of, just need to try it out). I should get some more time to play with it soon.
 

timwhit

Hairy Aussie
Joined
Jan 23, 2002
Messages
5,278
Location
Chicago, IL
But anyway, Google App Engine is turning out to be painful (no native SOAP//REST support for web services), the default datastore requires special considerations on what you are storing, etc. I haven't touched Android since posting, but have been reading in my very limited spare time. (I have the answers, sort of, just need to try it out). I should get some more time to play with it soon.

How about this?
 

Chewy509

Wotty wot wot.
Joined
Nov 8, 2006
Messages
3,327
Location
Gold Coast Hinterland, Australia

Chewy509

Wotty wot wot.
Joined
Nov 8, 2006
Messages
3,327
Location
Gold Coast Hinterland, Australia
The thing with Android is, it's great on the consumer side, but once you start having to develop for or with, it get's downright painful. (Considering the MTP stack in Android 3.x has known issues, which were fixed in 4.1, but that sucks for people whose manufacturers haven't pushed 4.0, let alone 4.1 to their device).
 

MaxBurn

Storage Is My Life
Joined
Jan 20, 2004
Messages
3,245
Location
SC
The thing with Android is, it's great on the consumer side, but once you start having to develop for or with, it get's downright painful. (Considering the MTP stack in Android 3.x has known issues, which were fixed in 4.1, but that sucks for people whose manufacturers haven't pushed 4.0, let alone 4.1 to their device).


I hear this from multiple sources. I follow some developers here and there because they leak news but their gripes or comments on what is good and not I find interesting as well. For android I think the only reason it is so hard is because of the stagnant adoption of newer versions, 4 and 4.1 seems to make them happy but they are forced to go older because no one has it. Very different from the apple side where they apparently feel comfortable dropping support for 4 already or very soon, they seem really happy to take advantage of whatever they put in 5. Blackberry seems to be making an effort to reach out to developers on the QNX BB10 platform but I haven't heard anyone at all talking about it or the development device that is out there, must not be much interest?
 

timwhit

Hairy Aussie
Joined
Jan 23, 2002
Messages
5,278
Location
Chicago, IL
Thanks, but we followed this: https://developers.google.com/appengine/articles/soap to get SOAP working. It's works, but the amount of work compared to say using Glassfish, Tomcat or even WCF (in the windows world) is a little off-putting. I personally expected something a lot more streamlined, considering AppEngine is a competitor to EC2 and Azure.

I skipped over SOAP in your original post, probably unconsciously.
 

CityK

Storage Freak Apprentice
Joined
Sep 2, 2002
Messages
1,719
Besides JUnit for underlying business logic code testing, what test harness/software do you use for UI testing? And can the UI test harness results be used/integrated with Hudson? (FYI. Hudson is running on a headless server (but can fire up xvfb as needed to get a virtual frame buffer for any Java application that needs a GUI)).
Don't know if this would affect your plans in any way, but regarding Xvfb ... (I didn't follow the discussion, so I'm not sure what decision was made on this)
 

Mercutio

Fatwah on Western Digital
Joined
Jan 17, 2002
Messages
21,594
Location
I am omnipresent
I hear this from multiple sources. I follow some developers here and there because they leak news but their gripes or comments on what is good and not I find interesting as well. For android I think the only reason it is so hard is because of the stagnant adoption of newer versions, 4 and 4.1 seems to make them happy but they are forced to go older because no one has it.

There's also an issue with the staggering array of hardware configurations on Android, particularly for differing screen resolutions. Apparently developers are regularly surprised by tiny differences that make their software unusable on some device or other.
 

Chewy509

Wotty wot wot.
Joined
Nov 8, 2006
Messages
3,327
Location
Gold Coast Hinterland, Australia
Don't know if this would affect your plans in any way, but regarding Xvfb ... (I didn't follow the discussion, so I'm not sure what decision was made on this)

Ouch, that's cool as we only need it for another 8 weeks! We decided on using uispec4j for the UI testing framework, as all test code can be scripted as normal JUnit tests. uisepc4j does have some limits, like it only works with Java6, but that's not an issue since both Google App Engine and Android are only have Java6 compliant JVMs.
 

Mercutio

Fatwah on Western Digital
Joined
Jan 17, 2002
Messages
21,594
Location
I am omnipresent
Android x86 is monumentally painful to work with. I've tried running it in a VM, but it doesn't like any of the virtualized NICs available to VMware or VirtualBox.
I tried the LiveCD on an older Thinkpad with a Pro/1000 NIC and 802.11. Nope.
Crappy HP Pavilion with Realtek NICs? Not happening.
I finally got a specific build to run on a Thinkpad X120 with NIC support so that the browser works, but that turned out to be a Gingerbread build rather than ICS.

Even better, the Play Store isn't included with Android x86 ever. Some people install it with various hacks, but with cautions like "Will only run for about 30 seconds before it crashes. That's long enough to find and download an app if you're fast."

I want to demo a uniform Android configuration in my classroom and I realize that's asking a lot from Android-anything, but apparently if I'm really serious about it, I'm going to have to do a great deal more work than I anticipated.
 

Mercutio

Fatwah on Western Digital
Joined
Jan 17, 2002
Messages
21,594
Location
I am omnipresent
Not quite, but it's the closest on-topic thread that already existed. What I was really trying to do was demonstrate some of the differences and limitations of mobile OSes compared to full-featured desktop ones.

Performance in that VM was drastically, visibly better in VMware than in Virtualbox.

Ironically, the entire time I was talking about android stuff, my students kept asking why they couldn't run "ipad" on their computers, or it is was just because they didn't have Macs.
Needless to say this was Apple's fault.
 

Chewy509

Wotty wot wot.
Joined
Nov 8, 2006
Messages
3,327
Location
Gold Coast Hinterland, Australia
Well, I can tell you the official Android emulator that you can you use for development is sssssslllloooowwwww...

Over the past 5 weeks I've been doing Android development for, there is a lot to not like about it. (Mainly around the testing frameworks). Overall the development model is very easy, but when you need to debug something or even need to communicate with the rest of the world (using something like SOAP based web services), it feels that it lacks polish.

But I will say, I've enjoyed the experience (overall).
 
Top