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

Daniel Passos daniel at passos.me
Fri Jun 6 11:22:43 EDT 2014


Answer inline

On Fri, Jun 6, 2014 at 7:05 AM, Karel Piwko <kpiwko at redhat.com> wrote:

> 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.
>

Not sure why it's so bad. parent-pom is releases in maven central so, the
community can use it. I think a notice in the README explaining why we are
using it is good.

parent-pom has some nice plugins like formatter, license header, etc...
Should we do it manually or put this plugins in the project pom?


> 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.
>

Always use the same of targetSdkVersion. So, it's correctly ;)


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

+1 Good catch.


> 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.
>

+1


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

+1 Maybe is a good ideia copy the cookbook .gitignore
https://github.com/aerogear/aerogear-android-cookbook/blob/master/.gitignore

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


Not sure what is going on, but I'll take a look at it next week. Could you
fire a jira for me?


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

I just run it in Android Studio and IntelliJ. I don't know how, but all
still working :P

Thanks,
>
> Karel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/aerogear-dev/attachments/20140606/f12c6757/attachment-0001.html 


More information about the aerogear-dev mailing list