[aerogear-dev] Improving Android HelloPush demo experience in Eclipse - PR

Karel Piwko kpiwko at redhat.com
Fri Jun 6 06:05:28 EDT 2014


Hi All,

I went through Android demo (and JBDS) and created following PR:

https://github.com/aerogear/aerogear-push-helloworld/pull/18

Let me know if you want to have separate PRs per commit. Goal was to have
example working in Eclipse/JBDS + ADT. There is still manual steps to do and
an error I was not able to fix it completely, investigating.

As per commit:

1/ Fixes Eclipse error marker for maven-android-plugin. AAR is not used, so it
is fine.

2/ Quickstart/demos should not have any parent, Maven best practice. Check JDF
quickstarts. Quickstart is an example and it is used to by user to scaffold
their own apps. We don't want them to use ag-parent but just ag-bom.

3/ If project.properties is missing, Eclipse is not able to add Android SDK to
build path. I've set it to API 19. This means that user has to point ADT to
Android SDK with API 19 installed. This is also version Eclipse will use for
code suggestion/autocompletion/build in IDE. Should have been API 10, I'm not
sure here.

4/ Dependencies in <dependencyManagement> should not define any scope with
exception of *import*. Maven best practice.

5/ If user don't provide UNIFIED_PUSH_URL, application fails due to
RuntimeException. I've added catch for IAE and Toast, however I believe there
should be a better way how to indicate that to user. IAE is quite generic and
fired from URLUtils in GCM registar. I'll file an issue to improve that.

6/ /bin directory is used by default by Eclipse to host temporary build

After these steps, I needed to follow these manual steps:

a/ Import android-support-v7-appcompat from Android SDK into workspace as
Android project
b/ Import hellopush/android as Maven project
c/ Add android-support-v7-appcompat as library in Android tab of project
properties

Now, I can edit the code. However, I can't use Run As/Android
Application still, likely due to http://tinypic.com/r/260ejpl/8

I'd appreciate if somebody could verify it is still working with AndroidStudio.

Thanks,

Karel


More information about the aerogear-dev mailing list