<div dir="ltr">Hi all,<div><br></div><div>After a massive 100+ comments, I've decided to merge the Android Core SDK Proposal</div><div><a href="https://github.com/aerogear/proposals/pull/9">https://github.com/aerogear/proposals/pull/9</a></div><div><br></div><div>* Android Core SDK is available from Maven: </div><div>* Repo: <a href="https://github.com/aerogear/aerogear-android-sdk">https://github.com/aerogear/aerogear-android-sdk</a></div><div>* Example Android App that uses the core SDK:</div><div><a href="https://github.com/secondsun/WipDemo/blob/master/app/src/main/java/org/feedhenry/mcp/prdemo/CoreActivity.java">https://github.com/secondsun/WipDemo/blob/master/app/src/main/java/org/feedhenry/mcp/prdemo/CoreActivity.java</a><br></div><div>* What you need to add to your gradle file: <a href="https://github.com/secondsun/WipDemo/blob/master/app/build.gradle#L29">https://github.com/secondsun/WipDemo/blob/master/app/build.gradle#L29</a></div><div><br></div><div><br></div><div>The amount of comments, calls and back&forth on irc has reached a reasonable level of agreement, with some remaining points of contention.<br></div><div>The contention is mainly around the level of complexity that a developer has to undertake to use the SDK.</div><div>After listening to the 3 main voices on this (Summers, Wojciech, Passos), I can see both points of view.</div><div><br></div><div>(WARNING: A lot of paraphrasing below :) )</div><div><br></div><div>From Passos & Wojciech's point of view, ease of use of the SDK is what's most important. There should be practically no setup/init required other than having a mobile-config.json file in the right place, and call a static method to get an instance of a service (similar to Firebase).</div><div><br></div><div>From Summers point of view, ease of use is also important, but something we can improve on iteratively. For example, the default use of a Service will be fine & possible to automate the setup for for 95% of cases. However, the other 5% is what we need to take into account from the beginning.</div><div><br></div><div><br></div><div>So, based on this, I would like if the following 2 things were follow up goals for the Core SDK.</div><div>I believe these changes will take whats currently there (and working), and move it towards something that is easier to use for developers.</div><div><br></div><div><br></div><div>Goal 1:</div><div><a href="https://issues.jboss.org/browse/AGDROID-712">https://issues.jboss.org/browse/AGDROID-712</a><br></div><div>Remove the need for static block initialisation/registration of service classes & their dependencies. i.e. this:</div><div><br></div><div><div>static {</div><div> ServiceModuleRegistry.registerServiceModule("keycloak", KeyCloakService.class, "http");</div><div> }</div><div><br></div><div>From chatting with Summers, this should be possible now that this PR is merged <a href="https://github.com/aerogear/proposals/pull/16">https://github.com/aerogear/proposals/pull/16</a> and the config file format is nailed down.</div><div><br></div><div><br></div><div>Goal 2:</div><div><a href="https://issues.jboss.org/browse/AGDROID-713">https://issues.jboss.org/browse/AGDROID-713</a><br></div><div>Allow a simpler way of getting an instance of a Service class other than below.</div><div><br></div><div><div> keycloakService = core.getService("keycloak", KeyCloakService.class);</div></div><div><br></div><div>If there are multiple instances registered for a particular Class, it may still be necessary to use the above to get a 'named' instance (much like in dependency injection libs like spring that use annotations).</div><div>However, in most cases, the below should be possible:</div><div><br></div><div>keycloakService = core.getService(KeyCloakService.class);<br></div><div><br></div><div><br></div><div><br></div><div><br></div><div>Thanks</div><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr">David Martin<div>Red Hat Mobile</div><div>Twitter: <span style="font-size:12.8px">@irldavem</span></div><div><span style="font-size:12.8px">IRC: @irldavem (#aerogear)</span></div></div></div></div></div></div></div>
</div></div>